From faf59e12c09348de3fe6a6f491efcdc820ef93d1 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 28 Mar 2025 00:08:47 +0900 Subject: [PATCH] test/sandbox: expose test tool Some test elements implemented in the test tool might need to run outside the sandbox. This change allows that to happen. Signed-off-by: Ophestra --- test/sandbox/case/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/sandbox/case/default.nix b/test/sandbox/case/default.nix index c4bfb40..01395ff 100644 --- a/test/sandbox/case/default.nix +++ b/test/sandbox/case/default.nix @@ -46,6 +46,10 @@ let go mod init git.gensokyo.uk/security/fortify/test >& /dev/null cp ${./main.go} main.go ''; + + postInstall = '' + mv $out/bin/test $out/bin/fortify-test + ''; }; callTestCase = @@ -65,7 +69,7 @@ let inherit (tc) tty mapRealUid; share = foot; packages = [ ]; - path = "${checkSandbox}/bin/test"; + path = "${checkSandbox}/bin/fortify-test"; args = [ "test" (toString (writeText "fortify-${tc.name}-want.json" (builtins.toJSON tc.want))) @@ -76,4 +80,6 @@ in preset = callTestCase ./preset.nix; tty = callTestCase ./tty.nix; mapuid = callTestCase ./mapuid.nix; + + _testProgram = checkSandbox; }