Skip to content

Commit

Permalink
Merge pull request #250 from nix-community/vm-timeouts
Browse files Browse the repository at this point in the history
tests: add 5 minutes default timeout
  • Loading branch information
nikstur authored Oct 30, 2023
2 parents 8edc9ef + 1859491 commit 781303a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nix/tests/lanzaboote.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

let
inherit (pkgs) lib system;
defaultTimeout = 5 * 60; # = 5 minutes

mkSecureBootTest = { name, machine ? { }, useSecureBoot ? true, useTPM2 ? false, readEfiVariables ? false, testScript }:
let
Expand Down Expand Up @@ -79,6 +80,7 @@ let
in
pkgs.nixosTest {
inherit name;
globalTimeout = defaultTimeout;

testScript = ''
${lib.optionalString useTPM2 tpm2Initialization}
Expand Down
5 changes: 5 additions & 0 deletions nix/tests/stub.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ pkgs, runTest, ukiModule }:

let
defaultTimeout = 5 * 60; # = 5 minutes
common = _: {
imports = [ ukiModule ];

Expand All @@ -21,6 +22,8 @@ in
# this test fails something is very wrong.
systemd-stub = runTest {
name = "systemd-stub";
globalTimeout = defaultTimeout;

nodes.machine = _: {
imports = [ common ];
boot.loader.uki.stub = "${pkgs.systemd}/lib/systemd/boot/efi/linuxx64.efi.stub";
Expand All @@ -33,6 +36,8 @@ in

fatStub = runTest {
name = "fat-stub";
globalTimeout = defaultTimeout;

nodes.machine = _: {
imports = [ common ];
};
Expand Down

0 comments on commit 781303a

Please sign in to comment.