Merge pull request #250 from nix-community/vm-timeouts

tests: add 5 minutes default timeout
This commit is contained in:
nikstur 2023-10-30 13:45:22 +01:00 committed by GitHub
commit 781303ad7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,7 @@
let let
inherit (pkgs) lib system; inherit (pkgs) lib system;
defaultTimeout = 5 * 60; # = 5 minutes
mkSecureBootTest = { name, machine ? { }, useSecureBoot ? true, useTPM2 ? false, readEfiVariables ? false, testScript }: mkSecureBootTest = { name, machine ? { }, useSecureBoot ? true, useTPM2 ? false, readEfiVariables ? false, testScript }:
let let
@ -79,6 +80,7 @@ let
in in
pkgs.nixosTest { pkgs.nixosTest {
inherit name; inherit name;
globalTimeout = defaultTimeout;
testScript = '' testScript = ''
${lib.optionalString useTPM2 tpm2Initialization} ${lib.optionalString useTPM2 tpm2Initialization}

View File

@ -1,6 +1,7 @@
{ pkgs, runTest, ukiModule }: { pkgs, runTest, ukiModule }:
let let
defaultTimeout = 5 * 60; # = 5 minutes
common = _: { common = _: {
imports = [ ukiModule ]; imports = [ ukiModule ];
@ -21,6 +22,8 @@ in
# this test fails something is very wrong. # this test fails something is very wrong.
systemd-stub = runTest { systemd-stub = runTest {
name = "systemd-stub"; name = "systemd-stub";
globalTimeout = defaultTimeout;
nodes.machine = _: { nodes.machine = _: {
imports = [ common ]; imports = [ common ];
boot.loader.uki.stub = "${pkgs.systemd}/lib/systemd/boot/efi/linuxx64.efi.stub"; boot.loader.uki.stub = "${pkgs.systemd}/lib/systemd/boot/efi/linuxx64.efi.stub";
@ -33,6 +36,8 @@ in
fatStub = runTest { fatStub = runTest {
name = "fat-stub"; name = "fat-stub";
globalTimeout = defaultTimeout;
nodes.machine = _: { nodes.machine = _: {
imports = [ common ]; imports = [ common ];
}; };