aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-28 00:08:47 +0900
committerOphestra <cat@gensokyo.uk>2025-03-28 00:08:47 +0900
commitfaf59e12c09348de3fe6a6f491efcdc820ef93d1 (patch)
treee08eb10c23b03fc9bad2da3a4343a7860ca990d1 /test
parentd97a03c7c6d723587b6c35c8cbd8b69101d7e93f (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'test')
-rw-r--r--test/sandbox/case/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/sandbox/case/default.nix b/test/sandbox/case/default.nix
index c4bfb401..01395ff0 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;
}