From b466ca434636693d382e1982b6473fad5693fd3d Mon Sep 17 00:00:00 2001 From: ibizaman Date: Tue, 13 Aug 2024 16:11:03 +0200 Subject: [PATCH] make extraScript appear as its own subtest --- test/common.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/common.nix b/test/common.nix index 1eff79b..adccefb 100644 --- a/test/common.nix +++ b/test/common.nix @@ -82,7 +82,14 @@ raise Exception(f"auth query should be rd=${proto_fqdn}/ but is {response['auth_query']}") '' ) - + extraScript args; + + (let + script = extraScript args; + indent = indent: str: lib.concatMapStringsSep "\n" (x: (lib. replicate indent " ") + x) (lib.splitString "\n" script); + in + lib.optionalString (script != "") '' + with subtest("extraScript"): + ${indent 4 script} + ''); base = pkgs: additionalModules: { imports = [