diff options
author | SomeoneSerge <else@someonex.net> | 2024-08-16 16:28:09 +0000 |
---|---|---|
committer | SomeoneSerge <else@someonex.net> | 2024-08-16 16:28:20 +0000 |
commit | 59b1063ec5174bc0848f4bea37c8b603e23aa967 (patch) | |
tree | 1f454cc87ecc54b2f0dceea7933231ab3d305001 | |
parent | 838f0e7effc9f49afd7585997b16ca5531def2e0 (diff) |
nixosTests: allow extending testScript without overriding it
-rw-r--r-- | nixos/tests/all-tests.nix | 19 |
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" + ] ) ) { |