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>
This commit is contained in:
parent
d97a03c7c6
commit
faf59e12c0
@ -46,6 +46,10 @@ let
|
|||||||
go mod init git.gensokyo.uk/security/fortify/test >& /dev/null
|
go mod init git.gensokyo.uk/security/fortify/test >& /dev/null
|
||||||
cp ${./main.go} main.go
|
cp ${./main.go} main.go
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mv $out/bin/test $out/bin/fortify-test
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
callTestCase =
|
callTestCase =
|
||||||
@ -65,7 +69,7 @@ let
|
|||||||
inherit (tc) tty mapRealUid;
|
inherit (tc) tty mapRealUid;
|
||||||
share = foot;
|
share = foot;
|
||||||
packages = [ ];
|
packages = [ ];
|
||||||
path = "${checkSandbox}/bin/test";
|
path = "${checkSandbox}/bin/fortify-test";
|
||||||
args = [
|
args = [
|
||||||
"test"
|
"test"
|
||||||
(toString (writeText "fortify-${tc.name}-want.json" (builtins.toJSON tc.want)))
|
(toString (writeText "fortify-${tc.name}-want.json" (builtins.toJSON tc.want)))
|
||||||
@ -76,4 +80,6 @@ in
|
|||||||
preset = callTestCase ./preset.nix;
|
preset = callTestCase ./preset.nix;
|
||||||
tty = callTestCase ./tty.nix;
|
tty = callTestCase ./tty.nix;
|
||||||
mapuid = callTestCase ./mapuid.nix;
|
mapuid = callTestCase ./mapuid.nix;
|
||||||
|
|
||||||
|
_testProgram = checkSandbox;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user