From b6af8caffec91db14dfe3c1e095fd1fc84ecfd9e Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 23 Feb 2025 18:48:01 +0900 Subject: [PATCH] nix: clean up directory structure Tests for fpkg is going to be in ./cmd/fpkg, so this central tests directory is no longer necessary. Signed-off-by: Ophestra --- flake.nix | 12 ++++++------ {tests/fortify => test}/configuration.nix | 0 {tests/fortify => test}/default.nix | 2 +- {tests/fortify => test}/test.py | 0 4 files changed, 7 insertions(+), 7 deletions(-) rename {tests/fortify => test}/configuration.nix (100%) rename {tests/fortify => test}/default.nix (93%) rename {tests/fortify => test}/test.py (100%) diff --git a/flake.nix b/flake.nix index ac37474..fcef274 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,12 @@ ; in { + fortify = callPackage ./test { inherit system self; }; + race = callPackage ./test { + inherit system self; + withRace = true; + }; + formatting = runCommandLocal "check-formatting" { nativeBuildInputs = [ nixfmt-rfc-style ]; } '' cd ${./.} @@ -85,12 +91,6 @@ touch $out ''; - - fortify = callPackage ./tests/fortify { inherit system self; }; - race = callPackage ./tests/fortify { - inherit system self; - withRace = true; - }; } ); diff --git a/tests/fortify/configuration.nix b/test/configuration.nix similarity index 100% rename from tests/fortify/configuration.nix rename to test/configuration.nix diff --git a/tests/fortify/default.nix b/test/default.nix similarity index 93% rename from tests/fortify/default.nix rename to test/default.nix index 4342567..d803a23 100644 --- a/tests/fortify/default.nix +++ b/test/default.nix @@ -22,7 +22,7 @@ nixosTest { # Run with Go race detector: environment.fortify = lib.mkIf withRace rec { # race detector does not support static linking - package = (pkgs.callPackage ../../package.nix { }).overrideAttrs (previousAttrs: { + package = (pkgs.callPackage ../package.nix { }).overrideAttrs (previousAttrs: { GOFLAGS = previousAttrs.GOFLAGS ++ [ "-race" ]; }); fsuPackage = options.environment.fortify.fsuPackage.default.override { fortify = package; }; diff --git a/tests/fortify/test.py b/test/test.py similarity index 100% rename from tests/fortify/test.py rename to test/test.py