From 285eb9a8949a63446fd8bdffbe30a8468ed897c7 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 19 Nov 2018 16:16:16 -0600 Subject: [PATCH] cmake: set CTEST_OUTPUT_ON_FAILURE globally We should always use this. --- pkgs/applications/office/kmymoney/default.nix | 2 +- pkgs/development/libraries/cmark/default.nix | 1 - .../development/libraries/science/math/scalapack/default.nix | 5 +---- pkgs/development/tools/build-managers/cmake/setup-hook.sh | 2 ++ pkgs/development/tools/build-managers/ninja/setup-hook.sh | 3 --- 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/office/kmymoney/default.nix b/pkgs/applications/office/kmymoney/default.nix index 7899bf607e54..7061a6323940 100644 --- a/pkgs/applications/office/kmymoney/default.nix +++ b/pkgs/applications/office/kmymoney/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { installCheckPhase = let pluginPath = "${qtbase.bin}/${qtbase.qtPluginPrefix}"; in lib.optionalString doInstallCheck '' - QT_PLUGIN_PATH=${lib.escapeShellArg pluginPath} CTEST_OUTPUT_ON_FAILURE=1 \ + QT_PLUGIN_PATH=${lib.escapeShellArg pluginPath} \ ${xvfb_run}/bin/xvfb-run -s '-screen 0 1024x768x24' make test \ ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now. ''; diff --git a/pkgs/development/libraries/cmark/default.nix b/pkgs/development/libraries/cmark/default.nix index 1cf963c89462..a7b604bc0d2e 100644 --- a/pkgs/development/libraries/cmark/default.nix +++ b/pkgs/development/libraries/cmark/default.nix @@ -15,7 +15,6 @@ stdenv.mkDerivation rec { doCheck = !stdenv.isDarwin; preCheck = '' export LD_LIBRARY_PATH=$(readlink -f ./src) - export CTEST_OUTPUT_ON_FAILURE=1 ''; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/science/math/scalapack/default.nix b/pkgs/development/libraries/science/math/scalapack/default.nix index 3961374a9b11..ba02b16383f8 100644 --- a/pkgs/development/libraries/science/math/scalapack/default.nix +++ b/pkgs/development/libraries/science/math/scalapack/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ) ''; - checkPhase = '' + preCheck = '' # make sure the test starts even if we have less than 4 cores export OMPI_MCA_rmaps_base_oversubscribe=1 @@ -35,9 +35,6 @@ stdenv.mkDerivation rec { export OMP_NUM_THREADS=1 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/lib - export CTEST_OUTPUT_ON_FAILURE=1 - - make test ''; meta = with stdenv.lib; { diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index d37e25943b5f..42b4999cfba4 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -15,6 +15,8 @@ fixCmakeFiles() { cmakeConfigurePhase() { runHook preConfigure + export CTEST_OUTPUT_ON_FAILURE=1 + if [ -z "$dontFixCmake" ]; then fixCmakeFiles . fi diff --git a/pkgs/development/tools/build-managers/ninja/setup-hook.sh b/pkgs/development/tools/build-managers/ninja/setup-hook.sh index 3e87814ba861..e3c67bd139dd 100644 --- a/pkgs/development/tools/build-managers/ninja/setup-hook.sh +++ b/pkgs/development/tools/build-managers/ninja/setup-hook.sh @@ -15,7 +15,6 @@ ninjaBuildPhase() { echoCmd 'build flags' "${flagsArray[@]}" ninja "${flagsArray[@]}" - unset flagsArray runHook postBuild } @@ -35,7 +34,6 @@ ninjaInstallPhase() { echoCmd 'install flags' "${flagsArray[@]}" ninja "${flagsArray[@]}" - unset flagsArray runHook postInstall } @@ -70,7 +68,6 @@ ninjaCheckPhase() { echoCmd 'check flags' "${flagsArray[@]}" ninja "${flagsArray[@]}" - unset flagsArray fi runHook postCheck