fortify/test/sandbox/case/default.nix
Ophestra b71d2bf534
All checks were successful
Test / Create distribution (push) Successful in 25s
Test / Fpkg (push) Successful in 34s
Test / Fortify (push) Successful in 2m21s
Test / Data race detector (push) Successful in 2m48s
Test / Flake checks (push) Successful in 54s
test/sandbox: check tty outcome
This makes no difference currently but has different behaviour in the native sandbox.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-23 17:28:57 +09:00

59 lines
894 B
Nix

{
lib,
callPackage,
foot,
version,
}:
let
fs = mode: dir: data: {
mode = lib.fromHexString mode;
inherit
dir
data
;
};
ent = fsname: dir: type: opts: freq: passno: {
inherit
fsname
dir
type
opts
freq
passno
;
};
checkSandbox = callPackage ../. { inherit version; };
callTestCase =
path:
let
tc = import path {
inherit
fs
ent
;
};
in
{
name = "check-sandbox-${tc.name}";
verbose = true;
inherit (tc) tty;
share = foot;
packages = [ ];
command = "${checkSandbox tc.name tc.want} > /dev/console";
extraPaths = [
{
src = "/proc/mounts";
dst = "/.fortify/mounts";
}
];
};
in
{
preset = callTestCase ./preset.nix;
tty = callTestCase ./tty.nix;
}