Merge pull request #249561 from bobby285271/fix/fail-test-when-coredump

nixosTests.pantheon, nixosTests.budgie: Fail the test when coredump happens
This commit is contained in:
Bobby Rong 2023-08-17 15:33:25 +08:00 committed by GitHub
commit 888d0bb9fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -52,10 +52,16 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
machine.wait_for_window("budgie-daemon")
machine.wait_until_succeeds("pgrep budgie-panel")
machine.wait_for_window("budgie-panel")
# We don't check xwininfo for this one.
# See https://github.com/NixOS/nixpkgs/pull/216737#discussion_r1155312754
machine.wait_until_succeeds("pgrep budgie-wm")
with subtest("Open MATE terminal"):
machine.succeed("su - ${user.name} -c 'DISPLAY=:0 mate-terminal >&2 &'")
machine.wait_for_window("Terminal")
with subtest("Check if budgie-wm has ever coredumped"):
machine.fail("coredumpctl --json=short | grep budgie-wm")
machine.sleep(20)
machine.screenshot("screen")
'';

View file

@ -60,6 +60,9 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
with subtest("Open elementary terminal"):
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.terminal >&2 &'")
machine.wait_for_window("io.elementary.terminal")
with subtest("Check if gala has ever coredumped"):
machine.fail("coredumpctl --json=short | grep gala")
machine.sleep(20)
machine.screenshot("screen")
'';