aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sandbox
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-05-25 20:12:30 +0900
committerOphestra <cat@gensokyo.uk>2025-05-25 20:12:30 +0900
commit2ffca6984a03b2daa3bb114f70ea84e71439559a (patch)
tree8d536414115917e5c6d95e7e9e5aaa4151a0d71f /test/sandbox
parentdde2516304ac6b0edc1dfc6650f37d32fa62642c (diff)
nix: use reverse-DNS style id as unique identifier
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test/sandbox')
-rw-r--r--test/sandbox/case/default.nix13
-rw-r--r--test/sandbox/configuration.nix8
2 files changed, 9 insertions, 12 deletions
diff --git a/test/sandbox/case/default.nix b/test/sandbox/case/default.nix
index d860b1e5..21bdd4a0 100644
--- a/test/sandbox/case/default.nix
+++ b/test/sandbox/case/default.nix
@@ -24,7 +24,7 @@ let
};
callTestCase =
- path:
+ path: identity:
let
tc = import path {
inherit
@@ -36,6 +36,7 @@ let
in
{
name = "check-sandbox-${tc.name}";
+ inherit identity;
verbose = true;
inherit (tc)
tty
@@ -51,10 +52,12 @@ let
(toString (builtins.toFile "fortify-${tc.name}-want.json" (builtins.toJSON tc.want)))
];
};
+
+ testCaseName = name: "cat.gensokyo.fortify.test." + name;
in
{
- preset = callTestCase ./preset.nix;
- tty = callTestCase ./tty.nix;
- mapuid = callTestCase ./mapuid.nix;
- device = callTestCase ./device.nix;
+ ${testCaseName "preset"} = callTestCase ./preset.nix 1;
+ ${testCaseName "tty"} = callTestCase ./tty.nix 2;
+ ${testCaseName "mapuid"} = callTestCase ./mapuid.nix 3;
+ ${testCaseName "device"} = callTestCase ./device.nix 4;
}
diff --git a/test/sandbox/configuration.nix b/test/sandbox/configuration.nix
index 903b99a3..473e9d3c 100644
--- a/test/sandbox/configuration.nix
+++ b/test/sandbox/configuration.nix
@@ -6,7 +6,6 @@
}:
let
testProgram = pkgs.callPackage ./tool/package.nix { inherit (config.environment.fortify.package) version; };
- testCases = import ./case lib testProgram;
in
{
users.users = {
@@ -76,11 +75,6 @@ in
}
];
- apps = with testCases; [
- preset
- tty
- mapuid
- device
- ];
+ apps = import ./case lib testProgram;
};
}