From 23a3b8ebd5518a8d044eda7e72f19dd6d7a95ed7 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 3 Sep 2020 21:19:52 +1200 Subject: [PATCH 1/3] Fix warning message for `checkPhase` --- builder/comp-builder.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/comp-builder.nix b/builder/comp-builder.nix index 934a8680f9..23fdd161b1 100644 --- a/builder/comp-builder.nix +++ b/builder/comp-builder.nix @@ -279,7 +279,7 @@ let runHook postBuild ''; - checkPhase = "notice: Tests are only executed by building the .run sub-derivation of this component."; + checkPhase = "notice: Test built, but not executed yet. To run a test `p.components.tests.X` build `p.checks.X`."; # Note: Cabal does *not* copy test executables during the `install` phase. # From e17ec3216ade34e42773fb944c26c052b5a603e6 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 3 Sep 2020 22:32:27 +1200 Subject: [PATCH 2/3] Print the message when the test builds --- builder/comp-builder.nix | 4 ++-- release.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builder/comp-builder.nix b/builder/comp-builder.nix index 23fdd161b1..ec90c3bd27 100644 --- a/builder/comp-builder.nix +++ b/builder/comp-builder.nix @@ -279,8 +279,6 @@ let runHook postBuild ''; - checkPhase = "notice: Test built, but not executed yet. To run a test `p.components.tests.X` build `p.checks.X`."; - # Note: Cabal does *not* copy test executables during the `install` phase. # # Note 2: if a package contains multiple libs (lib + sublibs) SETUP register will generate a @@ -363,6 +361,8 @@ let runHook postInstall '' + (lib.optionalString keepSource '' rm -rf dist + '') + (lib.optionalString (haskellLib.isTest componentId) '' + echo The test ${package.identifier.name}.components.tests.${componentId.cname} was built. To run the test build ${package.identifier.name}.checks.${componentId.cname}. ''); shellHook = '' diff --git a/release.nix b/release.nix index 5052c93878..afefa8999d 100644 --- a/release.nix +++ b/release.nix @@ -1,7 +1,7 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! { supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ] -, ifdLevel ? 3 +, ifdLevel ? 2 , checkMaterialization ? false }: let From 2db0d08cd5c0f5cde3025cf5cdcb767c09599f19 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 4 Sep 2020 19:20:52 +1200 Subject: [PATCH 3/3] ifdLevel 3 --- release.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.nix b/release.nix index afefa8999d..5052c93878 100644 --- a/release.nix +++ b/release.nix @@ -1,7 +1,7 @@ # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating # on a machine with e.g. no way to build the Darwin IFDs you need! { supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ] -, ifdLevel ? 2 +, ifdLevel ? 3 , checkMaterialization ? false }: let