From 0b2d1dc06e98ab8cef465a75a069232b6b2a6102 Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Mon, 20 Jan 2020 17:55:55 +0100 Subject: [PATCH] Remove the niv-test executable This moves the tests into a `tests` section of the `package.yaml`. Otherwise, the `niv-test` is shipped with the actual executable. --- default.nix | 3 --- package.yaml | 4 +++- script/test | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/default.nix b/default.nix index e1a4e45..53c52bc 100644 --- a/default.nix +++ b/default.nix @@ -196,9 +196,6 @@ rec tests-github = pkgs.callPackage ./tests/github { inherit niv; }; tests-git = pkgs.callPackage ./tests/git { inherit niv; }; - niv-test = pkgs.runCommand "niv-test" { buildInputs = [ niv ]; } - "niv-test && touch $out"; - readme = pkgs.writeText "README.md" ( let template = builtins.readFile ./README.tpl.md; diff --git a/package.yaml b/package.yaml index 08d4908..93054a3 100644 --- a/package.yaml +++ b/package.yaml @@ -57,7 +57,9 @@ executables: source-dirs: app dependencies: - niv - niv-test: + +tests: + unit: main: NivTest.main source-dirs: app dependencies: diff --git a/script/test b/script/test index d2ae8c9..ff2d3ce 100755 --- a/script/test +++ b/script/test @@ -27,7 +27,7 @@ if [[ ! $OSTYPE =~ darwin ]]; then else echo "Testing on darwin" echo "Not enabling sandbox, not running integration" - targets+=("-A" "niv-test") + targets+=("-A" "niv") fi # Build and create a root