diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2019-11-06 20:46:44 -0500 |
---|---|---|
committer | worldofpeace <worldofpeace@protonmail.ch> | 2019-11-25 09:31:19 -0500 |
commit | 87f32247658c0e2cd5b5dffbd70d7adae3d941d3 (patch) | |
tree | 8c6143b19a2ee4523aa94e8da121e2180b371d9d /nixos | |
parent | e4962aa6a7ef1c6c4fe00740b6e818905f3e7f96 (diff) | |
download | nixpkgs-87f32247658c0e2cd5b5dffbd70d7adae3d941d3.tar nixpkgs-87f32247658c0e2cd5b5dffbd70d7adae3d941d3.tar.gz nixpkgs-87f32247658c0e2cd5b5dffbd70d7adae3d941d3.tar.bz2 nixpkgs-87f32247658c0e2cd5b5dffbd70d7adae3d941d3.tar.lz nixpkgs-87f32247658c0e2cd5b5dffbd70d7adae3d941d3.tar.xz nixpkgs-87f32247658c0e2cd5b5dffbd70d7adae3d941d3.tar.zst nixpkgs-87f32247658c0e2cd5b5dffbd70d7adae3d941d3.zip |
nixosTests.plasma5: port to python
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/plasma5.nix | 51 |
1 files changed, 29 insertions, 22 deletions
diff --git a/nixos/tests/plasma5.nix b/nixos/tests/plasma5.nix index c0c2a86b41c..6884f17aabb 100644 --- a/nixos/tests/plasma5.nix +++ b/nixos/tests/plasma5.nix @@ -26,27 +26,34 @@ import ./make-test-python.nix ({ pkgs, ...} : user = nodes.machine.config.users.users.alice; xdo = "${pkgs.xdotool}/bin/xdotool"; in '' - startAll; - # wait for log in - $machine->waitForFile("/home/alice/.Xauthority"); - $machine->succeed("xauth merge ~alice/.Xauthority"); - - $machine->waitUntilSucceeds("pgrep plasmashell"); - $machine->waitForWindow("^Desktop "); - - # Check that logging in has given the user ownership of devices. - $machine->succeed("getfacl -p /dev/snd/timer | grep -q alice"); - - $machine->execute("su - alice -c 'DISPLAY=:0.0 dolphin &'"); - $machine->waitForWindow(" Dolphin"); - - $machine->execute("su - alice -c 'DISPLAY=:0.0 konsole &'"); - $machine->waitForWindow("Konsole"); - - $machine->execute("su - alice -c 'DISPLAY=:0.0 systemsettings5 &'"); - $machine->waitForWindow("Settings"); - - $machine->execute("${xdo} key Alt+F1 sleep 10"); - $machine->screenshot("screen"); + with subtest("Wait for login"): + start_all() + machine.wait_for_file("${user.home}/.Xauthority") + machine.succeed("xauth merge ${user.home}/.Xauthority") + + with subtest("Check plasmashell started"): + machine.wait_until_succeeds("pgrep plasmashell") + machine.wait_for_window("^Desktop ") + + with subtest("Check that logging in has given the user ownership of devices"): + machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") + + with subtest("Run Dolphin"): + machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 dolphin &'") + machine.wait_for_window(" Dolphin") + + with subtest("Run Konsole"): + machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 konsole &'") + machine.wait_for_window("Konsole") + + with subtest("Run systemsettings"): + machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 systemsettings5 &'") + machine.wait_for_window("Settings") + + with subtest("Wait to get a screenshot"): + machine.execute( + "${xdo} key Alt+F1 sleep 10" + ) + machine.screenshot("screen") ''; }) |