0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

nixos/tests/nixos-test-driver: test timeout failures

We test that the test framework timeouts are working as expected.
This commit is contained in:
Raito Bezarius 2023-10-27 13:32:04 +02:00
parent a0dc17bd57
commit c90219633c
2 changed files with 23 additions and 0 deletions

View file

@ -90,6 +90,14 @@ in {
lib-extend = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./nixos-test-driver/lib-extend.nix {};
node-name = runTest ./nixos-test-driver/node-name.nix;
busybox = runTest ./nixos-test-driver/busybox.nix;
driver-timeout = pkgs.runCommand "ensure-timeout-induced-failure" {
failed = pkgs.testers.testBuildFailure ((runTest ./nixos-test-driver/timeout.nix).config.rawTestDerivation);
} ''
grep -F "timeout reached; test terminating" $failed/testBuildFailure.log
# The program will always be terminated by SIGTERM (143) if it waits for the deadline thread.
[[ 143 = $(cat $failed/testBuildFailure.exit) ]]
touch $out
'';
};
# NixOS vm tests and non-vm unit tests