diff options
author | Florian Klink <flokli@flokli.de> | 2019-09-08 15:18:43 -0700 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2019-09-08 16:03:07 -0700 |
commit | a5de10b0afe5bcab41fc41a0dbebfbd99223a4dc (patch) | |
tree | f1f1c3381e9ec3625deee1f48600c57210aa4b6f /pkgs/development/libraries/sundials | |
parent | ac12bdfc96c7981226d711ac1b8d67c1683fcad1 (diff) |
sundials: include patch to remove flakiness
The provided patch doesn't apply cleanly on sundials_3 (no
SundialsTesting.cmake, SundialsAddTest.cmake containing trailing
whitespaces inside context), so for now we just disable tests for
sundials_3 - scikits-odes plans to move to sundials 4 anyways - see
https://github.com/bmcage/odes/pull/106.
Diffstat (limited to 'pkgs/development/libraries/sundials')
-rw-r--r-- | pkgs/development/libraries/sundials/3.x.nix | 3 | ||||
-rw-r--r-- | pkgs/development/libraries/sundials/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/sundials/tests-parallel.patch | 45 |
3 files changed, 49 insertions, 1 deletions
diff --git a/pkgs/development/libraries/sundials/3.x.nix b/pkgs/development/libraries/sundials/3.x.nix index 6b40a7b62e66..879f13e8bf53 100644 --- a/pkgs/development/libraries/sundials/3.x.nix +++ b/pkgs/development/libraries/sundials/3.x.nix @@ -38,7 +38,8 @@ in stdenv.mkDerivation rec { "-DLAPACK_LIBRARIES=${liblapackShared}/lib/liblapack${stdenv.hostPlatform.extensions.sharedLibrary};${liblapackShared}/lib/libblas${stdenv.hostPlatform.extensions.sharedLibrary}" ]; - doCheck = true; + # flaky tests, and patch in https://github.com/LLNL/sundials/pull/21 doesn't apply cleanly for sundials_3 + doCheck = false; checkPhase = "make test"; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/sundials/default.nix b/pkgs/development/libraries/sundials/default.nix index bd7a3aea7d49..4bc066df32e2 100644 --- a/pkgs/development/libraries/sundials/default.nix +++ b/pkgs/development/libraries/sundials/default.nix @@ -33,6 +33,8 @@ in stdenv.mkDerivation rec { url = "https://github.com/LLNL/sundials/pull/20/commits/2d951bbe1ff7842fcd0dafa28c61b0aa94015f66.patch"; sha256 = "0lcr6m4lk14yqrxah4rdscpczny5l7m1zpfsjh8bgspadfsgk512"; }) + # https://github.com/LLNL/sundials/pull/21 + ./tests-parallel.patch ]; cmakeFlags = [ diff --git a/pkgs/development/libraries/sundials/tests-parallel.patch b/pkgs/development/libraries/sundials/tests-parallel.patch new file mode 100644 index 000000000000..a785a1dade9b --- /dev/null +++ b/pkgs/development/libraries/sundials/tests-parallel.patch @@ -0,0 +1,45 @@ +diff --git a/config/SundialsAddTest.cmake b/config/SundialsAddTest.cmake +index e965fed..a7fb1d2 100644 +--- a/config/SundialsAddTest.cmake ++++ b/config/SundialsAddTest.cmake +@@ -70,7 +70,7 @@ MACRO(SUNDIALS_ADD_TEST NAME EXECUTABLE) + "--verbose" + "--testname=${NAME}" + "--executablename=$<TARGET_FILE:${EXECUTABLE}>" +- "--outputdir=${CMAKE_BINARY_DIR}/Testing/output" ++ "--outputdir=${TEST_OUTPUT_DIR}" + ) + + # do not diff the output and answer files +diff --git a/config/SundialsTesting.cmake b/config/SundialsTesting.cmake +index 815576a..d91801a 100644 +--- a/config/SundialsTesting.cmake ++++ b/config/SundialsTesting.cmake +@@ -29,6 +29,13 @@ IF(SUNDIALS_DEVTESTS) + ENDIF() + ENDIF() + ++ # Directory for test output ++ SET(TEST_OUTPUT_DIR ${PROJECT_BINARY_DIR}/Testing/output) ++ ++ IF(NOT EXISTS ${TEST_OUTPUT_DIR}) ++ FILE(MAKE_DIRECTORY ${TEST_OUTPUT_DIR}) ++ ENDIF() ++ + # look for the testRunner script in the test directory + FIND_PROGRAM(TESTRUNNER testRunner PATHS test) + HIDE_VARIABLE(TESTRUNNER) +diff --git a/test/testRunner b/test/testRunner +index f450ec2..f1c8deb 100755 +--- a/test/testRunner ++++ b/test/testRunner +@@ -106,7 +106,8 @@ def main(): + + # create output directory if necessary + if not os.path.exists(outDir): +- os.makedirs(outDir) ++ error("Output directory does not exist, it must be created.", outDir) ++ sys.exit(1) + elif not os.path.isdir(outDir): + error("Output directory exists but is not a directory, it must be deleted.", outDir) + sys.exit(1) |