diff options
-rw-r--r-- | gnu/packages/engineering.scm | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 86bfdf0a0d..c17208f3c6 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -5623,13 +5623,7 @@ towards field theory.") (commit commit))) (sha256 (base32 "1c7vimy065908qs5nwhnrk9pp0wh8pjgdvz2hwb12a9wcsj50kf0")) - (file-name (git-file-name name version)) - (modules '((guix build utils))) - ;; make tests deterministic by seeding the random number generator - (snippet '(substitute* '("orocos_kdl/tests/treeinvdyntest.cpp" - "orocos_kdl/tests/solvertest.cpp") - (("srand\\( \\(unsigned\\)time\\( NULL \\)\\)") - "srand(0u)"))))) + (file-name (git-file-name name version)))) (build-system cmake-build-system) (native-inputs (list cppunit)) (propagated-inputs (list eigen)) @@ -5637,10 +5631,20 @@ towards field theory.") (list #:configure-flags #~(list "-DENABLE_TESTS=ON") - #:test-target "check" #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'chdir + (add-after 'unpack 'fix-tests + (lambda _ + ;; Make tests deterministic by seeding the random number generator. + (substitute* '("orocos_kdl/tests/treeinvdyntest.cpp" + "orocos_kdl/tests/solvertest.cpp") + (("srand\\( \\(unsigned\\)time\\( NULL \\)\\)") + "srand(0u)")) + ;; CTest requires tests to be enabled in the top-level directory. + (substitute* "orocos_kdl/CMakeLists.txt" + (("IF\\( ENABLE_TESTS \\)" _all) + (string-append _all "\n" "enable_testing()"))))) + (add-after 'fix-tests 'chdir (lambda _ (chdir "orocos_kdl")))))) (home-page "https://docs.orocos.org/kdl/overview.html") |