cmake: set CTEST_OUTPUT_ON_FAILURE globally

We should always use this.
This commit is contained in:
Matthew Bauer 2018-11-19 16:16:16 -06:00
parent b75d5adb33
commit 285eb9a894
5 changed files with 4 additions and 9 deletions

View File

@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
installCheckPhase = let installCheckPhase = let
pluginPath = "${qtbase.bin}/${qtbase.qtPluginPrefix}"; pluginPath = "${qtbase.bin}/${qtbase.qtPluginPrefix}";
in lib.optionalString doInstallCheck '' 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 \ ${xvfb_run}/bin/xvfb-run -s '-screen 0 1024x768x24' make test \
ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now. ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now.
''; '';

View File

@ -15,7 +15,6 @@ stdenv.mkDerivation rec {
doCheck = !stdenv.isDarwin; doCheck = !stdenv.isDarwin;
preCheck = '' preCheck = ''
export LD_LIBRARY_PATH=$(readlink -f ./src) export LD_LIBRARY_PATH=$(readlink -f ./src)
export CTEST_OUTPUT_ON_FAILURE=1
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
) )
''; '';
checkPhase = '' preCheck = ''
# make sure the test starts even if we have less than 4 cores # make sure the test starts even if we have less than 4 cores
export OMPI_MCA_rmaps_base_oversubscribe=1 export OMPI_MCA_rmaps_base_oversubscribe=1
@ -35,9 +35,6 @@ stdenv.mkDerivation rec {
export OMP_NUM_THREADS=1 export OMP_NUM_THREADS=1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/lib
export CTEST_OUTPUT_ON_FAILURE=1
make test
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -15,6 +15,8 @@ fixCmakeFiles() {
cmakeConfigurePhase() { cmakeConfigurePhase() {
runHook preConfigure runHook preConfigure
export CTEST_OUTPUT_ON_FAILURE=1
if [ -z "$dontFixCmake" ]; then if [ -z "$dontFixCmake" ]; then
fixCmakeFiles . fixCmakeFiles .
fi fi

View File

@ -15,7 +15,6 @@ ninjaBuildPhase() {
echoCmd 'build flags' "${flagsArray[@]}" echoCmd 'build flags' "${flagsArray[@]}"
ninja "${flagsArray[@]}" ninja "${flagsArray[@]}"
unset flagsArray
runHook postBuild runHook postBuild
} }
@ -35,7 +34,6 @@ ninjaInstallPhase() {
echoCmd 'install flags' "${flagsArray[@]}" echoCmd 'install flags' "${flagsArray[@]}"
ninja "${flagsArray[@]}" ninja "${flagsArray[@]}"
unset flagsArray
runHook postInstall runHook postInstall
} }
@ -70,7 +68,6 @@ ninjaCheckPhase() {
echoCmd 'check flags' "${flagsArray[@]}" echoCmd 'check flags' "${flagsArray[@]}"
ninja "${flagsArray[@]}" ninja "${flagsArray[@]}"
unset flagsArray
fi fi
runHook postCheck runHook postCheck