From 60c10c3f4ae9b3093e75a22d03d6a1d0862a2f25 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 16 Feb 2025 20:58:08 +0900 Subject: nix: run integration tests with race detector Signed-off-by: Ophestra --- test.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test.nix') diff --git a/test.nix b/test.nix index f71d906d..6fdb249b 100644 --- a/test.nix +++ b/test.nix @@ -3,6 +3,7 @@ self, home-manager, nixosTest, + fortify, }: nixosTest { @@ -110,6 +111,18 @@ nixosTest { environment.fortify = { enable = true; + package = fortify.overrideAttrs (previousAttrs: { + GOFLAGS = previousAttrs.GOFLAGS ++ [ "-race" ]; + + # fsu does not like cgo + disallowedReferences = previousAttrs.disallowedReferences ++ [ fortify ]; + postInstall = + previousAttrs.postInstall + + '' + cp -a "${fortify}/libexec/fsu" "$out/libexec/fsu" + sed -i 's:${fortify}:${placeholder "out"}:' "$out/libexec/fsu" + ''; + }); stateDir = "/var/lib/fortify"; users.alice = 0; -- cgit v1.3.1