forked from rosa/hakurei
test: synchronise before copying from vm
The swaymsg calls do not wait for process to terminate. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -46,8 +46,10 @@ def wait_for_window(pattern):
|
|||||||
|
|
||||||
def collect_state_ui(name):
|
def collect_state_ui(name):
|
||||||
swaymsg(f"exec hakurei ps > '/tmp/{name}.ps'")
|
swaymsg(f"exec hakurei ps > '/tmp/{name}.ps'")
|
||||||
|
machine.wait_for_file(f"/tmp/{name}.ps")
|
||||||
machine.copy_from_vm(f"/tmp/{name}.ps", "")
|
machine.copy_from_vm(f"/tmp/{name}.ps", "")
|
||||||
swaymsg(f"exec hakurei --json ps > '/tmp/{name}.json'")
|
swaymsg(f"exec hakurei --json ps > '/tmp/{name}.json'")
|
||||||
|
machine.wait_for_file(f"/tmp/{name}.json")
|
||||||
machine.copy_from_vm(f"/tmp/{name}.json", "")
|
machine.copy_from_vm(f"/tmp/{name}.json", "")
|
||||||
machine.screenshot(name)
|
machine.screenshot(name)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user