Implement private KDE integration and optional release-cycle path
This commit is contained in:
parent
08b92fa4f4
commit
94d1990563
2 changed files with 47 additions and 23 deletions
|
|
@ -22,20 +22,22 @@ p.add_argument('--ovmf-code', required=True)
|
|||
p.add_argument('--ovmf-vars', required=True)
|
||||
p.add_argument('--ssh-port', type=int, default=22296)
|
||||
p.add_argument('--unit', default='archipelago-native-gnome-vm')
|
||||
p.add_argument('--variant', choices=('gnome', 'kde'), default='gnome')
|
||||
p.add_argument('--ui-actions', type=Path, help='Reviewed KDE QMP action list for the selected package/input profile')
|
||||
p.add_argument('--rtc-base')
|
||||
p.add_argument('--require-time-sync', action='store_true')
|
||||
args = p.parse_args()
|
||||
scripts = Path(__file__).resolve().parent
|
||||
args.workdir.mkdir(parents=True, exist_ok=True)
|
||||
result = {'passed': False, 'scope': 'native-gis-and-extension-baseline'}
|
||||
result = {'passed': False, 'scope': 'native-' + args.variant + '-and-extension-baseline'}
|
||||
vm = None
|
||||
try:
|
||||
with (args.workdir / 'prepare.log').open('w') as log:
|
||||
subprocess.run(['python3', str(scripts / 'gnome_vm_prepare.py'), '--iso', str(args.iso),
|
||||
'--workdir', str(args.workdir), '--vm-unit', args.unit, '--ovmf-code', args.ovmf_code,
|
||||
'--ovmf-vars', args.ovmf_vars] + (['--rtc-base', args.rtc_base] if args.rtc_base else []),
|
||||
'--ovmf-vars', args.ovmf_vars, '--variant', args.variant] + (['--rtc-base', args.rtc_base] if args.rtc_base else []),
|
||||
check=True, stdout=log, stderr=subprocess.STDOUT, timeout=1800)
|
||||
prepared = list(args.workdir.glob('gnome-*/preparation.json'))
|
||||
prepared = list(args.workdir.glob(args.variant + '-*/preparation.json'))
|
||||
if len(prepared) != 1: raise RuntimeError('Ambiguous VM preparation')
|
||||
vm = prepared[0].parent
|
||||
result.update(vm=str(vm), ssh_port=args.ssh_port,
|
||||
|
|
@ -50,24 +52,37 @@ try:
|
|||
'--screen', label + '.png'], check=True)
|
||||
time.sleep(10)
|
||||
time.sleep(30)
|
||||
ui('01-language', '--click', '500', '388')
|
||||
ui('02-typing', '--click', '1095', '55')
|
||||
# This locale has no suggested layout; expand the native XKB selector and
|
||||
# explicitly choose English (US), rather than clicking a disabled Next.
|
||||
ui('02a-layouts', '--click', '640', '383')
|
||||
ui('02b-us-search', '--click', '500', '330', '--text', 'english us')
|
||||
ui('02c-us-selected', '--click', '500', '478')
|
||||
ui('03-privacy', '--click', '1095', '55')
|
||||
ui('04-timezone', '--click', '1095', '55')
|
||||
ui('05-city', '--click', '500', '326', '--text', 'moscow')
|
||||
ui('06-city-selected', '--click', '500', '362')
|
||||
ui('07-account', '--click', '1095', '55')
|
||||
ui('08-name', '--text', 'coretest')
|
||||
ui('09-password', '--click', '1095', '55')
|
||||
ui('10-password-entered', '--text-file', str(vm / 'credential'))
|
||||
ui('11-confirmed', '--click', '550', '492', '--text-file', str(vm / 'credential'))
|
||||
ui('12-complete', '--click', '1095', '55')
|
||||
ui('13-session', '--click', '640', '572')
|
||||
if args.variant == 'kde':
|
||||
ui('00-plasma-setup')
|
||||
if not args.ui_actions:
|
||||
raise RuntimeError('KDE UI action profile is required; initial Plasma Setup screenshot retained for calibration')
|
||||
import hashlib
|
||||
actions = json.loads(args.ui_actions.read_text())
|
||||
if actions.get('version') != 1 or actions.get('variant') != 'kde':
|
||||
raise RuntimeError('Unsupported KDE UI action profile')
|
||||
result['ui_actions_sha256'] = hashlib.sha256(args.ui_actions.read_bytes()).hexdigest()
|
||||
for index, action in enumerate(actions['actions']):
|
||||
command = list(action)
|
||||
command = [str(vm / 'credential') if part == '@credential@' else part for part in command]
|
||||
ui(f'kde-{index:02d}', *command)
|
||||
else:
|
||||
ui('01-language', '--click', '500', '388')
|
||||
ui('02-typing', '--click', '1095', '55')
|
||||
# Explicitly choose English (US) in the native XKB selector.
|
||||
ui('02a-layouts', '--click', '640', '383')
|
||||
ui('02b-us-search', '--click', '500', '330', '--text', 'english us')
|
||||
ui('02c-us-selected', '--click', '500', '478')
|
||||
ui('03-privacy', '--click', '1095', '55')
|
||||
ui('04-timezone', '--click', '1095', '55')
|
||||
ui('05-city', '--click', '500', '326', '--text', 'moscow')
|
||||
ui('06-city-selected', '--click', '500', '362')
|
||||
ui('07-account', '--click', '1095', '55')
|
||||
ui('08-name', '--text', 'coretest')
|
||||
ui('09-password', '--click', '1095', '55')
|
||||
ui('10-password-entered', '--text-file', str(vm / 'credential'))
|
||||
ui('11-confirmed', '--click', '550', '492', '--text-file', str(vm / 'credential'))
|
||||
ui('12-complete', '--click', '1095', '55')
|
||||
ui('13-session', '--click', '640', '572')
|
||||
def guest(script, timeout=300, disconnect=False):
|
||||
c = pexpect.spawn('ssh', ['-tt', '-o', 'ConnectTimeout=5', '-o', 'StrictHostKeyChecking=accept-new', '-o',
|
||||
'UserKnownHostsFile=' + str(vm / 'known_hosts'), '-p', str(args.ssh_port),
|
||||
|
|
@ -103,11 +118,19 @@ timeout 180 bash -c 'until [ "$(timedatectl show -p NTPSynchronized --value)" =
|
|||
timeout 90 bash -c 'until systemctl is-active --quiet archipelago-keyring.service; do sleep 3; done'
|
||||
''', timeout=290)
|
||||
result['clock_regression'] = {'rtc_base': args.rtc_base, 'synchronized': True}
|
||||
if args.variant == 'kde':
|
||||
guest('''set -e
|
||||
test -f /etc/plasma-setup-done
|
||||
test "$(cat /usr/lib/archipelago/purpose)" = purpose/desktop/kde
|
||||
systemctl is-active sddm NetworkManager
|
||||
test -f /usr/lib/qt6/plugins/discover/archipelago-backend.so
|
||||
! ldd /usr/lib/qt6/plugins/discover/archipelago-backend.so | grep 'not found'
|
||||
''')
|
||||
guest('''set -e
|
||||
timeout 180 sh -c 'until test -f /etc/archipelago/provisioned; do sleep 2; done'
|
||||
test "$(cat /etc/archipelago/provisioned)" = coretest
|
||||
archipelago self-check
|
||||
systemctl is-active gdm NetworkManager ostree-finalize-staged.service
|
||||
systemctl is-active display-manager NetworkManager ostree-finalize-staged.service
|
||||
runuser -u coretest -- sh -c 'echo "clean dropin candidate" > /var/home/coretest/.archipelago-clean-persistence'
|
||||
archipelago extension add nano
|
||||
''', timeout=1800)
|
||||
|
|
|
|||
|
|
@ -21,12 +21,13 @@ def main():
|
|||
parser.add_argument('--iso', required=True, type=Path)
|
||||
parser.add_argument('--workdir', required=True, type=Path)
|
||||
parser.add_argument('--vm-unit', help='Run the installed VM in a separate host systemd service')
|
||||
parser.add_argument('--variant', choices=('gnome', 'kde'), default='gnome')
|
||||
parser.add_argument('--ovmf-code', default='/usr/share/OVMF/OVMF_CODE_4M.fd')
|
||||
parser.add_argument('--ovmf-vars', default='/usr/share/OVMF/OVMF_VARS_4M.fd')
|
||||
parser.add_argument('--rtc-base', help='Explicit QEMU RTC base for clock-regression probes')
|
||||
args = parser.parse_args()
|
||||
args.workdir.mkdir(parents=True, exist_ok=True)
|
||||
run = Path(tempfile.mkdtemp(prefix='gnome-', dir=args.workdir)).resolve()
|
||||
run = Path(tempfile.mkdtemp(prefix=args.variant + '-', dir=args.workdir)).resolve()
|
||||
iso = args.iso.resolve(strict=True)
|
||||
state = {'run': str(run), 'iso': str(iso), 'state': 'preparing',
|
||||
'acceptance_passed': False}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue