guix_mirror_bot pushed a commit to branch c++-team
in repository guix.
commit 0ba21c5c1a3b17427ccc8c7f1ea4fbd97f6e0038
Author: Greg Hogan <[email protected]>
AuthorDate: Thu Jul 10 14:48:34 2025 +0000
gnu: orocos-kinematics-dynamics: Remove #:test-target.
* gnu/packages/engineering.scm (orocos-kinematics-dynamics)
[arguments]<#:test-target>: Delete.
[origin]: Move snippet ...
[arguments]<#:phases>: ... to 'fix-tests, and enable testing.
Change-Id: I5795b54ff132b71e699d7c030bcad0f1393ef39e
---
gnu/packages/engineering.scm | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 0d4ca9da5e..1a20f71448 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -5574,13 +5574,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))
@@ -5588,10 +5582,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")