summaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorSomeoneSerge <else@someonex.net>2024-08-16 16:28:09 +0000
committerSomeoneSerge <else@someonex.net>2024-08-16 16:28:20 +0000
commit59b1063ec5174bc0848f4bea37c8b603e23aa967 (patch)
tree1f454cc87ecc54b2f0dceea7933231ab3d305001 /nixos
parent838f0e7effc9f49afd7585997b16ca5531def2e0 (diff)
nixosTests: allow extending testScript without overriding it
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/all-tests.nix19
1 files changed, 13 insertions, 6 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index adeaf65..b79b198 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -42,13 +42,20 @@ builtins.mapAttrs
{
inherit name;
imports = value.imports ++ [ dsl ];
- testScript = ''
- start_all()
- substituter.wait_for_unit("nix-serve.service")
- builder.succeed("dag-test")
- '';
+ testScript =
+ value.testScriptPre or ""
+ + ''
+ start_all()
+ substituter.wait_for_unit("nix-serve.service")
+ builder.succeed("dag-test")
+ ''
+ + value.testScriptPost or "";
}
- // builtins.removeAttrs value [ "imports" ]
+ // builtins.removeAttrs value [
+ "imports"
+ "testScriptPre"
+ "testScriptPost"
+ ]
)
)
{