diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2018-04-04 12:17:19 +0200 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2018-04-09 13:21:53 +0200 |
commit | c78c7645478ba95f8c654ed79e63a6e7f715c82d (patch) | |
tree | e054126c0b188cc31cd438f49390268257791773 | |
parent | 3458776bb1f5b5cf645428cd8ab35f70fd43199e (diff) |
nixos/tests.chromium: actually notice the tab crash
Argh, debugging NixOS tests takes forever…
(cherry picked from commit 1afb6e790a6a28a4fc5f310a2b0e5e012eb416fd)
-rw-r--r-- | nixos/tests/chromium.nix | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/nixos/tests/chromium.nix b/nixos/tests/chromium.nix index 3a2c65164766..65c314e22e1d 100644 --- a/nixos/tests/chromium.nix +++ b/nixos/tests/chromium.nix @@ -151,11 +151,11 @@ mapAttrs (channel: chromiumPkg: makeTest rec { $machine->screenshot("sandbox_info"); - $machine->succeed(ru "${xdo "submit-url" '' + $machine->succeed(ru "${xdo "find-window" '' search --sync --onlyvisible --name "sandbox status" windowfocus --sync ''}"); - $machine->succeed(ru "${xdo "submit-url" '' + $machine->succeed(ru "${xdo "copy-sandbox-info" '' key --delay 1000 Ctrl+a Ctrl+c ''}"); @@ -166,6 +166,26 @@ mapAttrs (channel: chromiumPkg: makeTest rec { && $clipboard =~ /network namespaces.*yes/mi && $clipboard =~ /seccomp.*sandbox.*yes/mi && $clipboard =~ /you are adequately sandboxed/mi; + + $machine->sleep(1); + $machine->succeed(ru "${xdo "find-window-after-copy" '' + search --onlyvisible --name "sandbox status" + ''}"); + + my $clipboard = $machine->succeed(ru "echo void | ${pkgs.xclip}/bin/xclip -i"); + $machine->succeed(ru "${xdo "copy-sandbox-info" '' + key --delay 1000 Ctrl+a Ctrl+c + ''}"); + + my $clipboard = $machine->succeed(ru "${pkgs.xclip}/bin/xclip -o"); + die "copying twice in a row does not work properly: $clipboard" + unless $clipboard =~ /namespace sandbox.*yes/mi + && $clipboard =~ /pid namespaces.*yes/mi + && $clipboard =~ /network namespaces.*yes/mi + && $clipboard =~ /seccomp.*sandbox.*yes/mi + && $clipboard =~ /you are adequately sandboxed/mi; + + $machine->screenshot("afer_copy_from_chromium"); }; $machine->shutdown; |