From 987981df7313d0a121121be36f5c8cf86ffeacd1 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 1 Aug 2025 02:11:19 +0900 Subject: test/sandbox: check pd behaviour Signed-off-by: Ophestra --- test/sandbox/configuration.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test/sandbox/configuration.nix') diff --git a/test/sandbox/configuration.nix b/test/sandbox/configuration.nix index cfc1364e..77af45a4 100644 --- a/test/sandbox/configuration.nix +++ b/test/sandbox/configuration.nix @@ -6,6 +6,7 @@ }: let testProgram = pkgs.callPackage ./tool/package.nix { inherit (config.environment.hakurei.package) version; }; + testCases = import ./case pkgs.system lib testProgram; in { users.users = { @@ -26,6 +27,13 @@ in systemPackages = [ # For checking seccomp outcome: testProgram + + # For checking pd outcome: + (pkgs.writeShellScriptBin "check-sandbox-pd" '' + hakurei -v run hakurei-test \ + -t ${toString (builtins.toFile "hakurei-pd-want.json" (builtins.toJSON testCases.pd.want))} \ + -s ${testCases.pd.expectedFilter.${pkgs.system}} "$@" + '') ]; variables = { @@ -75,6 +83,6 @@ in } ]; - apps = import ./case pkgs.system lib testProgram; + inherit (testCases) apps; }; } -- cgit v1.3.1