nix: run integration tests with race detector
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
468696f611
commit
60c10c3f4a
@ -88,7 +88,10 @@
|
|||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nixos-tests = callPackage ./test.nix { inherit system self home-manager; };
|
nixos-tests = callPackage ./test.nix {
|
||||||
|
inherit system self home-manager;
|
||||||
|
inherit (self.packages.${system}) fortify;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
13
test.nix
13
test.nix
@ -3,6 +3,7 @@
|
|||||||
self,
|
self,
|
||||||
home-manager,
|
home-manager,
|
||||||
nixosTest,
|
nixosTest,
|
||||||
|
fortify,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
nixosTest {
|
nixosTest {
|
||||||
@ -110,6 +111,18 @@ nixosTest {
|
|||||||
|
|
||||||
environment.fortify = {
|
environment.fortify = {
|
||||||
enable = true;
|
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";
|
stateDir = "/var/lib/fortify";
|
||||||
users.alice = 0;
|
users.alice = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user