Skip to content

Commit

Permalink
test: detect finished install via DEVICE_TRAY_MOVED event
Browse files Browse the repository at this point in the history
The old images code would auto-reboot after an ISO install so
the test code triggered on qmp:RESET. However with the change
to not auto-reboot [0] this is no longer feasible and we
need to detect `DEVICE_TRAY_MOVED` events that are emited
when kickstart calls `halt --eject`.

[0] osbuild#230
  • Loading branch information
mvo5 committed May 27, 2024
1 parent 12d249b commit e0d9157
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ def test_iso_installs(image_type):
fp.truncate(10_1000_1000_1000)
# install to test disk
with QEMU(test_disk_path, cdrom=installer_iso_path) as vm:
vm.start(wait_event="qmp:RESET", snapshot=False, use_ovmf=True)
vm.start(wait_event="qmp:DEVICE_TRAY_MOVED", snapshot=False, use_ovmf=True)
vm.run("sync", user="root", keyfile=image_type.ssh_keyfile_private_path)
vm.force_stop()
# boot test disk and do extremly simple check
with QEMU(test_disk_path) as vm:
Expand Down

0 comments on commit e0d9157

Please sign in to comment.