guix_mirror_bot pushed a commit to branch c++-team in repository guix. commit 20d027b13385e092121a371dc07dc0c37df3aaf7 Author: Greg Hogan <c...@greghogan.com> AuthorDate: Tue Jun 10 13:44:11 2025 +0000
gnu: Remove #:test-target argument. * gnu/packages/astronomy.scm (libsep), * gnu/packages/bioinformatics.scm (megahit), * gnu/packages/bittorrent.scm (qbittorrent), * gnu/packages/calendar.scm (date), * gnu/packages/check.scm (klee, trompeloeil), * gnu/packages/compression.scm (zziplib), * gnu/packages/cpp.scm (immer, lager, zug), * gnu/packages/databases.scm (timescaledb), * gnu/packages/emulators.scm (dolphin-emu), * gnu/packages/fpga.scm (systemc), * gnu/packages/game-development.scm (box2d), * gnu/packages/games.scm (megaglest, openclonk, teeworld), * gnu/packages/glib.scm (sdbus-c++), * gnu/packages/gnucash.scm (gnucash), * gnu/packages/graph.scm (igraph), * gnu/packages/image.scm (exiv2), * gnu/packages/inkscape.scm (inkscape), * gnu/packages/instrumentation.scm (yactfr), * gnu/packages/kde-multimedia.scm (elisa), * gnu/packages/linux.scm (falcosecurity-libs), * gnu/packages/llvm.scm (libcxx, libomp-15), * gnu/packages/machine-learning.scm (ctranslate2, tvm), * gnu/packages/maths.scm (blitz), * gnu/packages/messaging.scm (libphonenumber), * gnu/packages/music.scm (clementine, libdiscid, opustags, strawberry), * gnu/packages/opencog.scm (atomspace, attention, cogserver, cogutil, opencog), * gnu/packages/python-xyz.scm (pybind11) * gnu/packages/radio.scm (libfec, libcorrect), * gnu/packages/serialization.scm (qtcsv), * gnu/packages/shells.scm (fish), * gnu/packages/tls.scm (aws-lc), * gnu/packages/web.scm (wabt), * gnu/packages/vulkan.com (spirv-llvm-translator) [arguments]: Move #:test-target to ... <#:phases>: ... 'check phase. * gnu/packages/algebra.scm (xtensor), * gnu/packages/astronomy (stellarium), * gnu/packages/bioinformatics.scm (libsbml), * gnu/packages/chemistry.scm (openbabel), * gnu/packages/cpp.scm (xsimd, xtl), * gnu/packages/documentation.scm (doxygen), * gnu/packages/lua.scm (selene), * gnu/packages/libftdi.scm (libftdi), * gnu/packages/llvm.scm (cling, libomp@12, libomp@13), * gnu/packages/hyperledger.scm (hyperledger-iroha), * gnu/packages/markup.scm (cmark, cmark-gfm), * gnu/packages/maths.scm (cryptominisat, double-conversion), * gnu/packages/mp3.scm (chromaprint), * gnu/packages/qt.scm (qtpromise) * gnu/packages/rdf.scm (clucene), * gnu/packages/sync.scm (lsyncd) [arguments}: Remove #:test-target. * gnu/packages/engineering.scm (libfive), * gnu/packages/game-development.scm (box2d-3) [arguments]: Remove #:test-target and disable tests. Change-Id: I0a82091df1789980bbbac0c334b6f993c36f412a --- gnu/packages/algebra.scm | 4 +- gnu/packages/astronomy.scm | 15 ++-- gnu/packages/bioinformatics.scm | 23 +++--- gnu/packages/bittorrent.scm | 8 ++- gnu/packages/calendar.scm | 10 ++- gnu/packages/check.scm | 10 +-- gnu/packages/chemistry.scm | 3 +- gnu/packages/compression.scm | 9 +++ gnu/packages/cpp.scm | 39 +++++++---- gnu/packages/databases.scm | 7 +- gnu/packages/documentation.scm | 1 - gnu/packages/emulators.scm | 10 ++- gnu/packages/engineering.scm | 2 +- gnu/packages/fpga.scm | 9 ++- gnu/packages/game-development.scm | 26 +++++-- gnu/packages/games.scm | 95 +++++++++++++++---------- gnu/packages/glib.scm | 10 ++- gnu/packages/gnucash.scm | 3 +- gnu/packages/graph.scm | 5 +- gnu/packages/hyperledger.scm | 3 +- gnu/packages/image.scm | 72 ++++++++++--------- gnu/packages/inkscape.scm | 9 +-- gnu/packages/instrumentation.scm | 9 ++- gnu/packages/kde-multimedia.scm | 4 +- gnu/packages/libftdi.scm | 1 - gnu/packages/linux.scm | 8 ++- gnu/packages/llvm.scm | 44 +++++++----- gnu/packages/lua.scm | 1 - gnu/packages/machine-learning.scm | 17 +++-- gnu/packages/markup.scm | 5 +- gnu/packages/maths.scm | 32 +++++---- gnu/packages/messaging.scm | 17 +++-- gnu/packages/mp3.scm | 3 +- gnu/packages/music.scm | 144 ++++++++++++++++++++++---------------- gnu/packages/opencog.scm | 135 ++++++++++++++++++++++++++--------- gnu/packages/python-xyz.scm | 39 ++++++----- gnu/packages/qt.scm | 3 +- gnu/packages/radio.scm | 18 ++++- gnu/packages/rdf.scm | 3 +- gnu/packages/serialization.scm | 13 +++- gnu/packages/shells.scm | 12 +++- gnu/packages/sync.scm | 1 - gnu/packages/tls.scm | 15 +++- gnu/packages/vulkan.scm | 11 ++- gnu/packages/web.scm | 10 ++- 45 files changed, 601 insertions(+), 317 deletions(-) diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index dad3950c63..a39d332aa4 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -1285,9 +1285,7 @@ features, and more.") (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments - (list - #:configure-flags #~(list "-DBUILD_TESTS=ON") - #:test-target "xtest")) + (list #:configure-flags #~(list "-DBUILD_TESTS=ON"))) (native-inputs (list doctest googletest diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index a2bd128708..13f0ec0b8a 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -1359,14 +1359,16 @@ standard astronomy libraries: #:make-flags #~(list (string-append "CC=" #$(cc-for-target)) (string-append "PREFIX=" #$output)) - #:test-target "test" + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases - (add-before 'check 'pre-check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (chdir "../source") - (setenv "CC" #$(cc-for-target)))))))) + (replace 'check + (lambda* (#:rest args) + (with-directory-excursion "../source" + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "test" args))))))) (native-inputs (list python-wrapper)) (home-page "https://github.com/kbarbary/sep") @@ -9077,7 +9079,6 @@ deconvolution). Such post-processing is not performed by Stackistry.") (list ;; FIXME: Tests keep failing on 100% when preparing test-suit for INDI. #:tests? #f - #:test-target "test" #:configure-flags #~(list "-DENABLE_GPS=1" ;; TODO: Enable when all of the dependencies are available for Qt6. diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index ff4ff7e244..78e7b0a844 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -23491,8 +23491,7 @@ The output is in SAM format.") "0slkagrk3nfi2qsksv6b1brj6zhx4bj4bkib2sdycvrcd10ql2lh")))) (build-system cmake-build-system) (arguments - `(#:test-target "test" - #:configure-flags + `(#:configure-flags ,#~(list "-DWITH_CHECK=ON" (string-append "-DLIBXML_LIBRARY=" #$(this-package-input "libxml2") @@ -24620,14 +24619,20 @@ both types of files.") (build-system cmake-build-system) (arguments (list - #:test-target "simple_test" + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'fix-tests - (lambda _ - (substitute* "src/megahit" - (("os.path.join\\(script_path, '..'\\)") - "os.path.join(script_path, '../source')"))))))) + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-tests + (lambda _ + (substitute* "src/megahit" + (("os.path.join\\(script_path, '..'\\)") + "os.path.join(script_path, '../source')")))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "simple_test" args)))))) (inputs (list python-wrapper zlib)) (home-page "https://www.ncbi.nlm.nih.gov/pubmed/25609793") (synopsis "Meta-genome assembler") diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm index 3271d8d890..69df619461 100644 --- a/gnu/packages/bittorrent.scm +++ b/gnu/packages/bittorrent.scm @@ -520,7 +520,13 @@ desktops.") (arguments (list #:qtbase qtbase #:configure-flags #~(list "-DTESTING=ON") - #:test-target "check")) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:rest args) + ;; Fix for "enable_testing" not in the top-level directory. + (with-directory-excursion "test" + (apply (assoc-ref %standard-phases 'check) args))))))) (native-inputs (list qttools)) (inputs diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm index 1ea278fbd5..da8b558c6f 100644 --- a/gnu/packages/calendar.scm +++ b/gnu/packages/calendar.scm @@ -126,10 +126,12 @@ available in French.") (build-system cmake-build-system) (arguments (list - #:test-target "testit" #:configure-flags #~(list "-DUSE_SYSTEM_TZ_DB=ON" "-DBUILD_SHARED_LIBS=ON" "-DBUILD_TZ_LIB=ON" "-DENABLE_DATE_TESTING=ON") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-bin-bash @@ -148,7 +150,11 @@ available in French.") (lambda _ (for-each delete-file '("test/solar_hijri_test/parse.pass.cpp" - "test/tz_test/zoned_time_deduction.pass.cpp"))))))) + "test/tz_test/zoned_time_deduction.pass.cpp")))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "testit" args)))))) (synopsis "Date and time library for C++11 and C++14") (description "Date is a header only C++ library that extends the chrono date diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 578713a4ca..0f7aa2fafa 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1335,7 +1335,9 @@ with the @code{klee} package.") (arguments (list #:strip-directories #~(list "bin") ;don't strip LLVM bitcode in /lib - #:test-target "check" + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch @@ -1351,6 +1353,7 @@ with the @code{klee} package.") (substitute* "test/lit.cfg" (("addEnv\\('PWD'\\)" env) (string-append env "\n" "addEnv('GUIX_PYTHONPATH')"))))) + (replace 'check (assoc-ref gnu:%standard-phases 'check)) (add-after 'install 'wrap-programs (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -3770,12 +3773,11 @@ tests. The output format is JSON.") (list) (list #:configure-flags #~(list "-DTROMPELOEIL_BUILD_TESTS=yes"))) (list - #:test-target "test/self_test" #:phases #~(modify-phases %standard-phases (replace 'check - (lambda* (#:key tests? test-target #:allow-other-keys) + (lambda* (#:key tests? #:allow-other-keys) (when tests? - (invoke test-target)))))))) + (invoke "test/self_test")))))))) (native-inputs (list catch2-3)) (home-page "https://github.com/rollbear/trompeloeil") (synopsis "Header only C++14 mocking framework") diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index 9e9f3bf660..83779fbab1 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -599,8 +599,7 @@ usual algorithms you expect from a modern molecular dynamics implementation.") (assoc-ref %build-inputs "inchi") "/lib/inchi/libinchi.so.1") (string-append "-DINCHI_INCLUDE_DIR=" - (assoc-ref %build-inputs "inchi") "/include/inchi")) - #:test-target "test")) + (assoc-ref %build-inputs "inchi") "/include/inchi")))) (native-inputs (list pkg-config)) (inputs diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 95324c5782..fe15898f90 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -2120,6 +2120,15 @@ timestamps in the file header with a fixed time (1 January 2008). (base32 "18578xbzj8j89srv4bwayjm11bg56fl34sya0znq4fwq3apm037i")))) (build-system cmake-build-system) + (arguments + (list + ;; Avoid the integration test, which requires a system bus. + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check (assoc-ref gnu:%standard-phases 'check))))) (inputs (list zlib)) (native-inputs (list perl ; for the documentation diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index dfb7dfc021..25cbf9fccb 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -832,8 +832,7 @@ of XDG base directories, such as XDG_CONFIG_HOME.") (build-system cmake-build-system) (arguments (list - #:configure-flags #~(list "-DBUILD_TESTS=ON") - #:test-target "xtest")) + #:configure-flags #~(list "-DBUILD_TESTS=ON"))) (native-inputs (list doctest googletest)) @@ -1408,8 +1407,7 @@ for C++17.") (build-system cmake-build-system) (arguments (list - #:configure-flags #~(list "-DBUILD_TESTS=ON") - #:test-target "xtest")) + #:configure-flags #~(list "-DBUILD_TESTS=ON"))) (native-inputs (list doctest googletest @@ -2470,10 +2468,17 @@ provides a number of utilities to make coding with expected cleaner.") (sha256 (base32 "032rb84ahvdnc1m6sj4lflrwnk4p1f2jsq1pv03xbgizp2lr2pkx")))) (build-system cmake-build-system) - (arguments (list #:test-target "check" - ;; -Werror appears to report false positives. - ;; See <https://github.com/arximboldi/immer/issues/223>. - #:configure-flags #~(list "-DDISABLE_WERROR=ON"))) + (arguments + (list + ;; -Werror appears to report false positives. + ;; See <https://github.com/arximboldi/immer/issues/223>. + #:configure-flags #~'("-DDISABLE_WERROR=ON") + #:modules `((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check (assoc-ref gnu:%standard-phases 'check))))) (inputs (list boost libgc c-rrb)) (native-inputs (list catch2-3 doctest fmt pkg-config)) (home-page "https://sinusoid.es/immer") @@ -2498,7 +2503,14 @@ written in C++.") (modules '((guix build utils))) (snippet #~(delete-file-recursively "tools")))) (build-system cmake-build-system) - (arguments (list #:test-target "check")) + (arguments + (list + #:modules `((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check (assoc-ref gnu:%standard-phases 'check))))) (native-inputs (list boost catch2)) (home-page "https://sinusoid.es/zug") (synopsis "Higher-order sequence transformers") @@ -2519,13 +2531,16 @@ composable sequential transformations.") (sha256 (base32 "1by9d49qnkncifyjcq16zy605d7v4ps6hvc01q5nsp1nbswm94m4")))) (build-system cmake-build-system) - (arguments (list #:test-target "check" - #:configure-flags #~(list "-Dlager_BUILD_EXAMPLES=no") + (arguments (list #:configure-flags #~(list "-Dlager_BUILD_EXAMPLES=no") + #:modules `((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'delete-failing-tests (lambda _ - (delete-file-recursively "test/event_loop")))))) + (delete-file-recursively "test/event_loop"))) + (replace 'check (assoc-ref gnu:%standard-phases 'check))))) (inputs (list boost immer zug)) (native-inputs (list catch2 cereal)) (home-page "https://sinusoid.es/lager") diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index c4f5d73a3d..ed31b98ae2 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -1569,11 +1569,12 @@ pictures, sounds, or video.") (list #:imported-modules `((guix build union) ,@%cmake-build-system-modules) #:modules `(,@%cmake-build-system-modules + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils) (guix build union) (ice-9 match)) #:configure-flags #~(list "-DAPACHE_ONLY=ON" "-DSEND_TELEMETRY_DEFAULT=OFF") - #:test-target "regresschecklocal" #:phases #~(modify-phases (@ (guix build cmake-build-system) %standard-phases) (add-after 'unpack 'patch-install-location @@ -1642,7 +1643,9 @@ pictures, sounds, or video.") (("histogram_test\\.sql\\.in") "#histogram_test.sql.in"))))))) (add-after 'prepare-tests 'check - (assoc-ref %standard-phases 'check))))) + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "regresschecklocal" args)))))) (inputs (list openssl postgresql)) (home-page "https://www.timescale.com/") (synopsis "Time-series extension for PostgreSQL") diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index dc01277976..0eebedd503 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm @@ -216,7 +216,6 @@ markup) can be customized and extended by the user.") (assoc-ref %build-inputs "cross-libc") "/include")) #~'()) - #:test-target "tests" #:phases #~(modify-phases %standard-phases (add-after 'unpack 'disable-bibtex-test diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 62eb2177b7..ca1bf21203 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -391,6 +391,9 @@ It aims to support Nintendo DSi and 3DS as well.") (build-system cmake-build-system) (arguments (list + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases (add-before 'configure 'remove-unittests-target-post-build-command @@ -420,6 +423,10 @@ It aims to support Nintendo DSi and 3DS as well.") (("\"vulkan\", 1") (string-append "\"vulkan\"")) (("\"vulkan\"") (string-append "\"" libvulkan "\"")) (("Common::DynamicLibrary::GetVersionedFilename") ""))))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "unittests" args))) (add-after 'check 'post-check (lambda* (#:key tests? #:allow-other-keys) (when tests? @@ -473,8 +480,7 @@ It aims to support Nintendo DSi and 3DS as well.") (string-append "-DX11_LIBRARIES=" (search-input-file %build-inputs "lib/libX11.so")) - "-DX11_FOUND=1") - #:test-target "unittests")) + "-DX11_FOUND=1"))) (native-inputs (list (cross-gcc "powerpc-linux-gnu") gettext-minimal diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 70489a0ab0..417670db25 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -1139,12 +1139,12 @@ fonts to gEDA.") (build-system cmake-build-system) (arguments (list + #:tests? #f ; no tests #:imported-modules `((guix build guile-build-system) ,@%cmake-build-system-modules) #:modules '((guix build cmake-build-system) ((guix build guile-build-system) #:prefix guile:) (guix build utils)) - #:test-target "libfive-test" #:configure-flags #~(list (string-append "-DPYTHON_SITE_PACKAGES_DIR=" diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 9cb1d501c7..a10a134a79 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -715,7 +715,14 @@ automated testing of HDL code.") (base32 "1v5fg3h9ffdzq9f6zplvr9all00ssc1gpdvbg129xahkrbl53kvw")))) (native-inputs (list perl)) (build-system cmake-build-system) - (arguments '(#:test-target "check")) + (arguments + (list + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check (assoc-ref gnu:%standard-phases 'check))))) (home-page "https://accellera.org/community/systemc") (synopsis "Library for event-driven simulation") (description diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 61520575a8..1b493e4996 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -3255,9 +3255,19 @@ rigid body physics library written in C.") "include <doctest/doctest.h>")))))) (build-system cmake-build-system) (arguments - `(#:test-target "unit_test" - #:configure-flags '("-DBUILD_SHARED_LIBS=ON" - "-DBOX2D_BUILD_TESTBED=OFF"))) + (list #:configure-flags #~'("-DBUILD_SHARED_LIBS=ON" + "-DBOX2D_BUILD_TESTBED=OFF") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys #:rest args) + (when tests? + (apply (assoc-ref gnu:%standard-phases 'check) + #:tests? tests? #:test-target "unit_test" args) + (invoke "bin/unit_test"))))))) (native-inputs (list doctest)) ;for tests (inputs @@ -3288,11 +3298,13 @@ physics engine is just a system for procedural animation.") (arguments (substitute-keyword-arguments (package-arguments box2d) - ((#:test-target _) "") ; no check ((#:configure-flags original-flags) - `(cons* "-DBOX2D_UNIT_TESTS=OFF" ; enkiTS need for all test apps - "-DBOX2D_SAMPLES=OFF" - (delete "-DBOX2D_BUILD_TESTBED=OFF" ,original-flags))))))) + #~(cons* "-DBOX2D_UNIT_TESTS=OFF" ; enkiTS need for all test apps + "-DBOX2D_SAMPLES=OFF" + (delete "-DBOX2D_BUILD_TESTBED=OFF" #$original-flags))) + ((#:phases phases) + #~(modify-phases #$phases + (delete 'check))))))) ; no check (define-public libtcod (package diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 7100e8a737..514ebc0056 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -7509,22 +7509,30 @@ screensaver."))) (native-inputs (list cppunit pkg-config)) (arguments - `(#:configure-flags - (list "-DCMAKE_CXX_FLAGS=-fcommon" - "-DCMAKE_C_FLAGS=-fcommon" - (string-append "-DCUSTOM_DATA_INSTALL_PATH=" - (search-input-directory %build-inputs - "share/megaglest")) - "-DBUILD_MEGAGLEST_TESTS=ON") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-ini-search-path - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "source/glest_game/global/config.cpp" - (("/usr/share/megaglest/") - (string-append (assoc-ref outputs "out") - "/share/megaglest/")))))) - #:test-target "megaglest_tests")) + (list + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:configure-flags + #~(list "-DCMAKE_CXX_FLAGS=-fcommon" + "-DCMAKE_C_FLAGS=-fcommon" + (string-append "-DCUSTOM_DATA_INSTALL_PATH=" + (search-input-directory %build-inputs + "share/megaglest")) + "-DBUILD_MEGAGLEST_TESTS=ON") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-ini-search-path + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "source/glest_game/global/config.cpp" + (("/usr/share/megaglest/") + (string-append (assoc-ref outputs "out") + "/share/megaglest/"))))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "megaglest_tests" args) + (invoke "source/tests/megaglest_tests")))))) (home-page "https://megaglest.org/") (synopsis "3D real-time strategy (RTS) game") (description "MegaGlest is a cross-platform 3D real-time strategy (RTS) @@ -7750,26 +7758,31 @@ small robot living in the nano world, repair its maker.") #t)))) (build-system cmake-build-system) (arguments - `(#:test-target "run_tests" + (list + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-paths - (lambda* (#:key outputs #:allow-other-keys) - ;; Embed path to assets. - (substitute* "src/engine/shared/storage.cpp" - (("#define DATA_DIR.*") - (string-append "#define DATA_DIR \"" - (assoc-ref outputs "out") - "/share/teeworlds/data" - "\""))) - #t)) - (add-after 'unpack 'replace-font - (lambda* (#:key inputs #:allow-other-keys) - (delete-file "datasrc/fonts/DejaVuSans.ttf") - (symlink (string-append (assoc-ref inputs "font-dejavu") - "/share/fonts/truetype/DejaVuSans.ttf") - "datasrc/fonts/DejaVuSans.ttf") - #t))))) + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key outputs #:allow-other-keys) + ;; Embed path to assets. + (substitute* "src/engine/shared/storage.cpp" + (("#define DATA_DIR.*") + (string-append "#define DATA_DIR \"" + (assoc-ref outputs "out") + "/share/teeworlds/data" + "\""))))) + (add-after 'unpack 'replace-font + (lambda* (#:key inputs #:allow-other-keys) + (delete-file "datasrc/fonts/DejaVuSans.ttf") + (symlink (string-append (assoc-ref inputs "font-dejavu") + "/share/fonts/truetype/DejaVuSans.ttf") + "datasrc/fonts/DejaVuSans.ttf"))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "run_tests" args)))))) (inputs (list freetype font-dejavu @@ -10656,7 +10669,9 @@ a fortress beyond the forbidden swamp.") (list #:configure-flags #~(list "-DAudio_TK=OpenAL") - #:test-target "tests" + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'prepare-gmock @@ -10687,7 +10702,13 @@ a fortress beyond the forbidden swamp.") (substitute* "CMakeLists.txt" (("share/games/openclonk") "share/openclonk") (("TARGETS openclonk DESTINATION games") - "TARGETS openclonk DESTINATION bin"))))))) + "TARGETS openclonk DESTINATION bin")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys #:rest args) + (when tests? + (apply (assoc-ref gnu:%standard-phases 'check) + #:tests? tests #:test-target "tests" args) + (invoke "tests/tests"))))))) (native-inputs (list (package-source googletest) googletest diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 1f10714100..c13e134a47 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -1312,18 +1312,24 @@ Some codes examples can be find at: (arguments (list ;; Avoid the integration test, which requires a system bus. - #:test-target "sdbus-c++-unit-tests" #:configure-flags #~(list "-DSDBUSCPP_BUILD_CODEGEN=ON" "-DSDBUSCPP_BUILD_TESTS=ON" ;; Do not install tests. "-DSDBUSCPP_TESTS_INSTALL_PATH=/tmp" "-DCMAKE_VERBOSE_MAKEFILE=ON") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'do-not-install-tests (lambda _ (substitute* "tests/CMakeLists.txt" - (("/etc/dbus-1/system.d") "/tmp"))))))) + (("/etc/dbus-1/system.d") "/tmp")))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "sdbus-c++-unit-tests" args)))))) (native-inputs (list googletest pkg-config)) (inputs (list expat)) (propagated-inputs (list elogind)) ;required by sdbus-c++.pc diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm index 9f2f677968..ee9fe5a366 100644 --- a/gnu/packages/gnucash.scm +++ b/gnu/packages/gnucash.scm @@ -78,13 +78,13 @@ (build-system cmake-build-system) (arguments (list - #:test-target "check" #:configure-flags #~(list "-DWITH_PYTHON=ON") #:make-flags #~(list "GUILE_AUTO_COMPILE=0") #:imported-modules `(,@%default-gnu-imported-modules (guix build cmake-build-system) (guix build glib-or-gtk-build-system)) #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) (guix build utils)) #:phases @@ -114,6 +114,7 @@ (invoke "localedef" "-i" "en_US" "-f" "UTF-8" "./en_US.UTF-8") (invoke "localedef" "-i" "en_GB" "-f" "UTF-8" "./en_GB.UTF-8") (invoke "localedef" "-i" "fr_FR" "-f" "UTF-8" "./fr_FR.UTF-8"))) + (replace 'check (assoc-ref gnu:%standard-phases 'check)) ;; There is about 100 MiB of documentation. (add-after 'install 'install-docs (lambda _ diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm index 2549889a11..c0a3945dfc 100644 --- a/gnu/packages/graph.scm +++ b/gnu/packages/graph.scm @@ -146,7 +146,9 @@ distributions in empirical data. SIAM Review 51, 661-703 (2009)}).") ;; Use the same integer width as suitesparse-cxsparse, which ;; uses int64_t in SuiteSparse v6.0.0 and later. "-DIGRAPH_INTEGER_SIZE=64") - #:test-target "check" + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'version-file @@ -178,6 +180,7 @@ distributions in empirical data. SIAM Review 51, 661-703 (2009)}).") (add-after 'build 'build-doc (lambda _ (invoke "cmake" "--build" "." "--target" "html"))) + (replace 'check (assoc-ref gnu:%standard-phases 'check)) (add-after 'install 'install-doc (lambda _ (copy-recursively diff --git a/gnu/packages/hyperledger.scm b/gnu/packages/hyperledger.scm index 49955f0121..91e9493ea9 100644 --- a/gnu/packages/hyperledger.scm +++ b/gnu/packages/hyperledger.scm @@ -172,9 +172,8 @@ link-time. New implementations can be added as well.") '("-DTESTING=OFF" ; The tests fail to link correctly to googletest. ;; Don't install the shared libraries of the dependencies: "-DENABLE_LIBS_PACKAGING=OFF") - #:tests? #f ;; https://iroha.readthedocs.io/en/latest/build/index.html#running-tests-optional - #:test-target ".")) + #:tests? #f)) ;; https://github.com/hyperledger/iroha/blob/master/vcpkg/VCPKG_DEPS_LIST (native-inputs (list fmt-8 diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 5ceff71866..79ac4fab18 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -1650,38 +1650,46 @@ channels.") (base32 "1qm6bvj28l42km009nc60gffn1qhngc0m2wjlhf90si3mcc8d99m")))) (build-system cmake-build-system) (arguments - `(#:test-target "tests" - #:configure-flags (list "-DEXIV2_BUILD_UNIT_TESTS=ON" - ;; darktable needs BMFF to support - ;; CR3 files. - "-DEXIV2_ENABLE_BMFF=ON") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-gcc-reference - (lambda _ - ;; _GLIBCXX_ASSERTIONS brings reference to GCC. - (substitute* "cmake/compilerFlags.cmake" - (("add_compile_options[(]-Wp,-D_GLIBCXX_ASSERTIONS[)]") - "")))) - (add-after 'install 'delete-static-libraries - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib"))) - (for-each delete-file (find-files lib "\\.a$"))))) - - ,@(if (or (target-ppc64le?) - (target-aarch64?) - (target-riscv64?)) - '((add-after 'unpack 'adjust-tests - (lambda _ - ;; Adjust test on ppc64 and aarch64, where no exception - ;; is raised and thus the return value is different. See - ;; <https://github.com/Exiv2/exiv2/issues/365> and - ;; <https://github.com/Exiv2/exiv2/issues/933>. - (substitute* "tests/bugfixes/github/test_CVE_2018_12265.py" - (("\\$uncaught_exception \\$addition_overflow_message\n") "") - (("retval = \\[1\\]") "retval = [0]"))))) - '())))) + (list + #:configure-flags + #~(list "-DEXIV2_BUILD_UNIT_TESTS=ON" + ;; darktable needs BMFF to support + ;; CR3 files. + "-DEXIV2_ENABLE_BMFF=ON") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-gcc-reference + (lambda _ + ;; _GLIBCXX_ASSERTIONS brings reference to GCC. + (substitute* "cmake/compilerFlags.cmake" + (("add_compile_options[(]-Wp,-D_GLIBCXX_ASSERTIONS[)]") + "")))) + (add-after 'install 'delete-static-libraries + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib"))) + (for-each delete-file (find-files lib "\\.a$"))))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "tests" args))) + + #$@(if (or (target-ppc64le?) + (target-aarch64?) + (target-riscv64?)) + '((add-after 'unpack 'adjust-tests + (lambda _ + ;; Adjust test on ppc64 and aarch64, where no exception + ;; is raised and thus the return value is different. See + ;; <https://github.com/Exiv2/exiv2/issues/365> and + ;; <https://github.com/Exiv2/exiv2/issues/933>. + (substitute* "tests/bugfixes/github/test_CVE_2018_12265.py" + (("\\$uncaught_exception \\$addition_overflow_message\n") "") + (("retval = \\[1\\]") "retval = [0]"))))) + '())))) (propagated-inputs (list expat zlib)) (native-inputs diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm index 33a57354dc..9698fec669 100644 --- a/gnu/packages/inkscape.scm +++ b/gnu/packages/inkscape.scm @@ -160,7 +160,6 @@ endif()~%~%" (build-system cmake-build-system) (arguments (list - #:test-target "check" ;otherwise some test binaries are missing #:disallowed-references (list imagemagick/stable) #:imported-modules `(,@%cmake-build-system-modules (guix build glib-or-gtk-build-system)) @@ -358,6 +357,8 @@ as the native format.") (build-system cmake-build-system) (arguments (substitute-keyword-arguments (package-arguments inkscape/pinned) + ((#:modules modules) + (append '(((guix build gnu-build-system) #:prefix gnu:)) modules)) ((#:configure-flags flags ''()) ;; Enable ImageMagick support. #~(delete "-DWITH_IMAGE_MAGICK=OFF" #$flags)) @@ -371,11 +372,7 @@ as the native format.") #$%inkscape-release-year))))) #$@(if (target-x86-32?) #~() ;XXX: there are remaining failures on i686 - #~((replace 'check - ;; Re-instate the tests disabled in inkscape/pinned, now that - ;; their ImageMagick requirement is satisfied. - (assoc-ref %standard-phases 'check)))) - + #~((replace 'check (assoc-ref gnu:%standard-phases 'check)))) (replace 'wrap-program ;; Ensure Python is available at runtime. (lambda _ diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm index 81bbd5118e..be6373225e 100644 --- a/gnu/packages/instrumentation.scm +++ b/gnu/packages/instrumentation.scm @@ -698,7 +698,14 @@ bundled with python-3 and luajit that you can delete in a package variant.") (base32 "1p4nqsq689hr2srdvg59v9yfig2aaq9psdy6fhwnya0vszssyvn5")))) (build-system cmake-build-system) - (arguments `(#:test-target "check")) + (arguments + (list + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check (assoc-ref gnu:%standard-phases 'check))))) (native-inputs (list boost python-pytest)) (home-page "https://github.com/eepp/yactfr") (synopsis "CTF reading library offering a C++14 API") diff --git a/gnu/packages/kde-multimedia.scm b/gnu/packages/kde-multimedia.scm index 7f702cc38c..7f77d786a3 100644 --- a/gnu/packages/kde-multimedia.scm +++ b/gnu/packages/kde-multimedia.scm @@ -254,10 +254,10 @@ This package is part of the KDE multimedia module.") (system "Xvfb :1 -screen 0 640x480x24 &") (setenv "DISPLAY" ":1"))) (replace 'check - (lambda* (#:key tests? test-target #:allow-other-keys) + (lambda* (#:key tests? #:allow-other-keys) (when tests? (setenv "CTEST_OUTPUT_ON_FAILURE" "1") - (invoke "dbus-launch" "make" test-target))))))) + (invoke "dbus-launch" "make" "test"))))))) (home-page "https://apps.kde.org/elisa/") (synopsis "Powerful music player for Plasma 5") (description "Elisa is a simple music player aiming to provide a nice diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm index 02efcbbbc0..25db26793d 100644 --- a/gnu/packages/libftdi.scm +++ b/gnu/packages/libftdi.scm @@ -87,7 +87,6 @@ (string-append share "/doc/" #$name "-" #$version "/html")))))) - #:test-target "check" #:tests? #f)) ; tests fail without access to USB (native-inputs (list doxygen graphviz pkg-config python swig)) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 78e857ca52..7a9571470e 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -10439,7 +10439,9 @@ set as @code{LD_PRELOAD} to override the C library file system functions.") #$(string-append "-DFALCOSECURITY_LIBS_VERSION=" version)) ;; Only the libsinsp test suite is run, as the one for libscap requires ;; elevated privileges. - #:test-target "run-unit-test-libsinsp" + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'disable-problematic-tests @@ -10449,6 +10451,10 @@ set as @code{LD_PRELOAD} to override the C library file system functions.") ;; exists in the build environment. (("TEST_F\\(usergroup_manager_test, system_lookup)") "TEST_F(usergroup_manager_test, DISABLED_system_lookup)")))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "run-unit-test-libsinsp" args))) (add-after 'install 'delete-src (lambda _ (delete-file-recursively diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 5631dd0fa1..780a002f43 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -817,14 +817,20 @@ of programming tools as well as libraries with equivalent functionality.") #~(list "-DLIBOMP_USE_HWLOC=ON" "-DOPENMP_TEST_C_COMPILER=clang" "-DOPENMP_TEST_CXX_COMPILER=clang++") - #:test-target "check-libomp" + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'chdir-to-source-and-install-license (lambda _ (chdir "openmp") (install-file "LICENSE.TXT" - (string-append #$output "/share/doc"))))))) + (string-append #$output "/share/doc")))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "check-libomp" args)))))) (native-inputs (list clang-15 llvm-15 perl pkg-config python)) (inputs (list `(,hwloc "lib"))) (home-page "https://openmp.llvm.org") @@ -921,14 +927,14 @@ Library.") "0kvbr4j6ldpssiv7chgqra5y77n7jwbyxlwcl7z32v31f49jcybb")) (file-name (string-append "libomp-" version ".tar.xz")))) (arguments - '(#:configure-flags '("-DLIBOMP_USE_HWLOC=ON" - "-DOPENMP_TEST_C_COMPILER=clang" - "-DOPENMP_TEST_CXX_COMPILER=clang++" - - ;; Work around faulty target detection, fixed in 14: - ;; https://github.com/llvm/llvm-project/issues/52910 - "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF") - #:test-target "check-libomp")) + (substitute-keyword-arguments (package-arguments libomp-14) + ((#:configure-flags flags) + ;; Work around faulty target detection, fixed in 14: + ;; https://github.com/llvm/llvm-project/issues/52910 + #~(cons* "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF" #$flags)) + ((#:phases phases) + #~(modify-phases #$phases + (delete 'chdir-to-source-and-install-license))))) (native-inputs (modify-inputs (package-native-inputs libomp-14) (replace "clang" clang-13) @@ -1005,10 +1011,9 @@ Library.") "14dh0r6h2xh747ffgnsl4z08h0ri04azi9vf79cbz7ma1r27kzk0")) (file-name (string-append "libomp-" version ".tar.xz")))) (arguments - '(#:configure-flags '("-DLIBOMP_USE_HWLOC=ON" - "-DOPENMP_TEST_C_COMPILER=clang" - "-DOPENMP_TEST_CXX_COMPILER=clang++") - #:test-target "check-libomp")) + (substitute-keyword-arguments (package-arguments libomp-13) + ((#:configure-flags flags) + #~`(,@(delete "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF" #$flags))))) (native-inputs (modify-inputs (package-native-inputs libomp-13) (replace "clang" clang-12) @@ -1950,7 +1955,6 @@ which highly leverage existing libraries in the larger LLVM project.") (build-system cmake-build-system) (arguments (list - #:test-target "check-cxx" #:tests? #f ;prohibitively expensive to run #:implicit-inputs? #f ;to avoid conflicting GCC headers #:configure-flags @@ -1963,11 +1967,18 @@ which highly leverage existing libraries in the larger LLVM project.") ;; as RUNPATH and don't attempt to patch it. ;; See also: https://gitlab.kitware.com/cmake/cmake/-/issues/22963 "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'enter-subdirectory (lambda _ - (chdir "runtimes")))))) + (chdir "runtimes"))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "check-cxx" args)))))) (native-inputs (modify-inputs (standard-packages) ;; Remove GCC from the build environment, to avoid its C++ @@ -2509,7 +2520,6 @@ LLVM bitcode files.") ;; FIXME: 79 tests fail, out of ~200 (see: ;; https://github.com/root-project/cling/issues/534) #:tests? #f - #:test-target "check-cling" #:configure-flags #~(list (string-append "-DCLING_CXX_PATH=" (search-input-file %build-inputs "bin/g++")) diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 59598f20c5..7ebd79e6f6 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -984,7 +984,6 @@ spirit of the Lua C API and thus degrade performance.") `(#:configure-flags ;; lua pc file in CMakeLists.txt is lua5.3.pc '("-DLUA_PC_CFG=lua;lua-5.3;lua-5.1") - #:test-target "all" #:phases ;; This is a header only library (modify-phases %standard-phases diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 7ad25e80c6..b2ce0a39e0 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -4823,7 +4823,6 @@ the tensors contained therein.") (build-system cmake-build-system) (arguments (list - #:test-target "cpptest" #:configure-flags #~(list "-DUSE_OPENCL=ON" "-DUSE_VULKAN=ON" @@ -4843,11 +4842,11 @@ the tensors contained therein.") #:phases #~(modify-phases %standard-phases (replace 'check - (lambda* (#:key source test-target tests? #:allow-other-keys) + (lambda* (#:key source tests? #:allow-other-keys) (when tests? (begin (invoke "make" "-j" - (number->string (parallel-job-count)) test-target) + (number->string (parallel-job-count)) "cpptest") ;; Disable below the actual run of the tests because ;; several fail due to platform variations (for example, ;; fp16 tests fail because not supported on CPUs). @@ -6315,7 +6314,6 @@ Jax, PyTorch and TensorFlow — with a seamless integration between them.") (build-system cmake-build-system) (arguments (list - #:test-target "ctranslate2_test" ;; XXX: mkl and openblas seem incompatible. #:configure-flags `(list "-DBUILD_TESTS=ON" "-DWITH_ACCELERATE=OFF" @@ -6324,7 +6322,16 @@ Jax, PyTorch and TensorFlow — with a seamless integration between them.") "-DWITH_CUDA=OFF" "-DWITH_CUDNN=OFF" "-DWITH_MKL=OFF" - "-DWITH_OPENBLAS=ON"))) + "-DWITH_OPENBLAS=ON") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "ctranslate2_test" args)))))) (native-inputs (list libomp cxxopts spdlog diff --git a/gnu/packages/markup.scm b/gnu/packages/markup.scm index 85a9db1a3c..a85b695883 100644 --- a/gnu/packages/markup.scm +++ b/gnu/packages/markup.scm @@ -485,8 +485,6 @@ convert HTML to Markdown.") (base32 "0llj68l9rxdhral0zyv0bz6yzqsxgq8d3730082sl3kx78lsq5qq")))) (build-system cmake-build-system) - (arguments - '(#:test-target "test")) (native-inputs (list python)) (synopsis "CommonMark Markdown reference implementation") (description @@ -543,8 +541,7 @@ CommonMark C library libcmark. It closely follows the original API.") (base32 "1apy9i76rgs0bmgdlpjszv0fpqhlap2s12m68wvnsv8j3fsqc90y")))) (arguments - (list #:test-target "test" - #:phases #~(modify-phases %standard-phases + (list #:phases #~(modify-phases %standard-phases (add-after 'install 'install-config (lambda _ ;; XXX: cmark-gfm-core-extensions.h includes this file. diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 34cd703188..39e5c16671 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -480,8 +480,7 @@ enough to be used effectively as a scientific calculator.") "0csy4pjw1p8rp6g5qxi2h0ychhhp1fldv7gb761627fs2mclw9gv")))) (build-system cmake-build-system) (arguments - '(#:test-target "test" - #:configure-flags '("-DBUILD_SHARED_LIBS=ON" + '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" "-DBUILD_TESTING=ON"))) (synopsis "Conversion routines for IEEE doubles") (description @@ -10248,7 +10247,6 @@ community detection algorithm.") (arguments (list #:build-type "Release" - #:test-target "test" #:configure-flags #~(list "-DENABLE_TESTING=ON" "-DSTATS=ON") #:phases #~(modify-phases %standard-phases @@ -10564,16 +10562,24 @@ projects up to the certification of critical software.") (base32 "0c88gc72j3zggyk4yrrip6i0v7xkx97l140vpy3xhxs2i7xy1461")))) (build-system cmake-build-system) (arguments - `(#:configure-flags '("-DBUILD_DOC=ON" - "-DBUILD_TESTING=ON") - ;; The default "check" target also includes examples and benchmarks. - #:test-target "check-testsuite" - #:phases - (modify-phases %standard-phases - (add-after 'build 'build-doc - (lambda _ - (invoke "make" "-j" (number->string (parallel-job-count)) - "blitz-doc")))))) + (list + #:configure-flags #~(list "-DBUILD_DOC=ON" + "-DBUILD_TESTING=ON") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-after 'build 'build-doc + (lambda _ + (invoke "make" "-j" (number->string (parallel-job-count)) + "blitz-doc"))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + ;; The default "check" target also includes examples and + ;; benchmarks. + #:test-target "check-testsuite" args)))))) (native-inputs (list python texinfo)) (synopsis "C++ template class library for multidimensional arrays") diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index e4445c12b9..4b34130ba4 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -2860,11 +2860,18 @@ asynchronicity.") (base32 "06y3mh1d1mks6d0ynxp3980g712nkf8l5nyljpybsk326b246hg9")))) (arguments - `(#:test-target "tests" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'change-directory - (lambda _ (chdir "cpp")))))) + (list + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'change-directory + (lambda _ (chdir "cpp"))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "tests" args)))))) (build-system cmake-build-system) (native-inputs (list googletest pkg-config)) diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm index d2b97372d1..885e9fc68b 100644 --- a/gnu/packages/mp3.scm +++ b/gnu/packages/mp3.scm @@ -668,8 +668,7 @@ command-line tool.") (arguments `(#:tests? #f ; tests require googletest *sources* ;;#:configure-flags '("-DBUILD_TESTS=ON") ; for building the tests - #:configure-flags '("-DBUILD_TOOLS=ON") ; for fpcalc - #:test-target "check")) + #:configure-flags '("-DBUILD_TOOLS=ON"))) ; for fpcalc (inputs ;; requires one of FFmpeg (prefered), FFTW3 or vDSP ;; use the same ffmpeg version as for acoustid-fingerprinter diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 2c6aec6795..728dd192c5 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -535,27 +535,34 @@ enables iPod support in music players such as Clementine.") #:directories? #t)))))) (build-system cmake-build-system) (arguments - '(#:test-target "clementine_test" - #:configure-flags - (list ;; Requires unpackaged "projectm" - "-DENABLE_VISUALISATIONS=OFF" - ;; Otherwise it may try to download a non-free library at run-time. - ;; TODO In an origin snippet, remove the code that performs the - ;; download. - "-DHAVE_SPOTIFY_DOWNLOADER=FALSE" - ;; Clementine checks that the taglib version is higher than 1.11, - ;; because of https://github.com/taglib/taglib/issues/864. Remove - ;; this flag when 1.12 is released. - "-DUSE_SYSTEM_TAGLIB=TRUE") - #:phases - (modify-phases %standard-phases - (add-after 'install 'wrap-program - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))) - (wrap-program (string-append out "/bin/clementine") - `("GST_PLUGIN_SYSTEM_PATH" ":" prefix - (,gst-plugin-path))))))))) + (list + #:configure-flags + #~(list ;; Requires unpackaged "projectm" + "-DENABLE_VISUALISATIONS=OFF" + ;; Otherwise it may try to download a non-free library at run-time. + ;; TODO In an origin snippet, remove the code that performs the + ;; download. + "-DHAVE_SPOTIFY_DOWNLOADER=FALSE" + ;; Clementine checks that the taglib version is higher than 1.11, + ;; because of https://github.com/taglib/taglib/issues/864. Remove + ;; this flag when 1.12 is released. + "-DUSE_SYSTEM_TAGLIB=TRUE") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "clementine_test" args))) + (add-after 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))) + (wrap-program (string-append out "/bin/clementine") + `("GST_PLUGIN_SYSTEM_PATH" ":" prefix + (,gst-plugin-path))))))))) (native-inputs (list gettext-minimal googletest @@ -767,24 +774,31 @@ Winamp/XMMS skins.") #:directories? #t)))))) (build-system qt-build-system) (arguments - `(#:qtbase ,qtbase - #:test-target "run_strawberry_tests" - #:configure-flags - `("-DBUILD_WITH_QT6=ON") - #:phases - (modify-phases %standard-phases - (add-after 'install 'wrap-program - (lambda* (#:key outputs #:allow-other-keys) - (wrap-program (search-input-file outputs "bin/strawberry") - `("GST_PLUGIN_SYSTEM_PATH" ":" prefix - (,(getenv "GST_PLUGIN_SYSTEM_PATH")))))) - (add-before 'check 'pre-check - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (system (format #f "~a :1 &" - (search-input-file (or native-inputs inputs) - "bin/Xvfb"))) - (setenv "DISPLAY" ":1") - (setenv "HOME" (getcwd))))))) + (list + #:qtbase qtbase + #:configure-flags + #~(list "-DBUILD_WITH_QT6=ON") + #:modules '((guix build qt-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (system (format #f "~a :1 &" + (search-input-file (or native-inputs inputs) + "bin/Xvfb"))) + (setenv "DISPLAY" ":1") + (setenv "HOME" (getcwd)))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "run_strawberry_tests" args))) + (add-after 'install 'wrap-program + (lambda* (#:key outputs #:allow-other-keys) + (wrap-program (search-input-file outputs "bin/strawberry") + `("GST_PLUGIN_SYSTEM_PATH" ":" prefix + (,(getenv "GST_PLUGIN_SYSTEM_PATH"))))))))) (native-inputs (list bash-minimal gettext-minimal @@ -6081,7 +6095,14 @@ for the DSSI Soft Synth Interface. A brief list of features: version ".tar.gz")) (sha256 (base32 "10mj1hwv1598nsi7jw5di0pfcwk36g4rr6kl7gi45m7ak8f8ypnx")))) - (arguments `(#:test-target "check")) + (arguments + (list + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check (assoc-ref gnu:%standard-phases 'check))))) (build-system cmake-build-system) (home-page "https://musicbrainz.org/doc/libdiscid") (synopsis "Disc id reader library") @@ -7969,28 +7990,31 @@ midi devices to JACK midi devices.") (file-name (git-file-name name version)))) (arguments (list - #:test-target "check" + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases - ;; This package does not use the perl-build-system, so we have to - ;; manually set up the Perl environment used by the test suite. - (add-before 'check 'setup-perl-environment - (lambda* (#:key inputs #:allow-other-keys) - (let* ((perl-list-moreutils-lib - (string-append #$(this-package-native-input "perl-list-moreutils") - "/lib/perl5/site_perl/" - #$(package-version perl))) - (perl-exporter-tiny-lib - (string-append #$(this-package-native-input "perl-exporter-tiny") - "/lib/perl5/site_perl/" - #$(package-version perl))) - (perl-test-deep-lib - (string-append #$(this-package-native-input "perl-test-deep") - "/lib/perl5/site_perl/" - #$(package-version perl)))) - (setenv "PERL5LIB" (string-append perl-list-moreutils-lib ":" - perl-exporter-tiny-lib ":" - perl-test-deep-lib)))))))) + ;; This package does not use the perl-build-system, so we have to + ;; manually set up the Perl environment used by the test suite. + (add-before 'check 'setup-perl-environment + (lambda* (#:key inputs #:allow-other-keys) + (let* ((perl-list-moreutils-lib + (string-append #$(this-package-native-input "perl-list-moreutils") + "/lib/perl5/site_perl/" + #$(package-version perl))) + (perl-exporter-tiny-lib + (string-append #$(this-package-native-input "perl-exporter-tiny") + "/lib/perl5/site_perl/" + #$(package-version perl))) + (perl-test-deep-lib + (string-append #$(this-package-native-input "perl-test-deep") + "/lib/perl5/site_perl/" + #$(package-version perl)))) + (setenv "PERL5LIB" (string-append perl-list-moreutils-lib ":" + perl-exporter-tiny-lib ":" + perl-test-deep-lib))))) + (replace 'check (assoc-ref gnu:%standard-phases 'check))))) (build-system cmake-build-system) (inputs (list libogg)) diff --git a/gnu/packages/opencog.scm b/gnu/packages/opencog.scm index 998d9b47ae..722cc0ffb7 100644 --- a/gnu/packages/opencog.scm +++ b/gnu/packages/opencog.scm @@ -29,6 +29,7 @@ #:use-module (gnu packages python) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix utils)) @@ -52,7 +53,21 @@ "1ymmcrinp0prlxsmxmwdjjl4kgaj7wzq39d5b1q2apgg94yfdhqb")))) (build-system cmake-build-system) (arguments - `(#:test-target "tests")) + (list + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys #:rest args) + (when tests? + (apply (assoc-ref gnu:%standard-phases 'check) + #:tests? tests? #:test-target "tests" args) + (for-each + (lambda (file) + (invoke file)) + (find-files "tests" "UTest$")))))))) (inputs (list boost)) (native-inputs @@ -84,14 +99,29 @@ utilities use for typical programming tasks in multiple OpenCog projects.") "0vxzhszb0z8081li38hid07a5axzxyflsmq1mcn4b1k4z1j8ggch")))) (build-system cmake-build-system) (arguments - `(#:test-target "tests" - #:configure-flags - (list (string-append "-DGUILE_INCLUDE_DIR=" - (assoc-ref %build-inputs "guile") - "/include/guile/2.2/") - (string-append "-DGUILE_SITE_DIR=" - (assoc-ref %outputs "out") - "/share/guile/site/2.2/")))) + (list + #:configure-flags + #~(list (string-append "-DGUILE_INCLUDE_DIR=" #$guile-2.2 + "/include/guile/2.2/") + (string-append "-DGUILE_SITE_DIR=" #$output + "/share/guile/site/2.2/")) + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys #:rest args) + (when tests? + (apply (assoc-ref gnu:%standard-phases 'check) + #:tests? tests? #:test-target "tests" args) + ;; Failing tests. + (for-each delete-file + '("tests/matrix/VectorAPIUTest" + "tests/scm/MultiAtomSpaceUTest")) + (setenv "GUILE_LOAD_PATH" ".:opencog/scm") + (for-each invoke + (find-files "tests" "UTest$")))))))) (inputs (list boost cogutil gmp guile-2.2 postgresql)) (native-inputs @@ -126,14 +156,26 @@ features not otherwise available.") "1h0vcxb6n5dc654xqinqcxc7dxwcs6bsywgir8rhrqiykk760mzl")))) (build-system cmake-build-system) (arguments - `(#:test-target "tests" - #:configure-flags - (list (string-append "-DGUILE_INCLUDE_DIR=" - (assoc-ref %build-inputs "guile") - "/include/guile/2.2/") - (string-append "-DGUILE_SITE_DIR=" - (assoc-ref %outputs "out") - "/share/guile/site/2.2/")))) + (list + #:configure-flags + #~(list (string-append "-DGUILE_INCLUDE_DIR=" #$guile-2.2 + "/include/guile/2.2/") + (string-append "-DGUILE_SITE_DIR=" #$output + "/share/guile/site/2.2/")) + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys #:rest args) + (when tests? + (apply (assoc-ref gnu:%standard-phases 'check) + #:tests? tests? #:test-target "tests" args) + ;; Failing test. + (delete-file "tests/shell/ShellUTest") + (for-each invoke + (find-files "tests" "UTest$")))))))) (inputs (list atomspace boost cogutil gmp guile-2.2)) (native-inputs @@ -164,15 +206,29 @@ OpenCog framework.") "0sndslphicv6w9qpag168rqkxq5sf71l5qbfx6zhsd5bzlf5fhwv")))) (build-system cmake-build-system) (arguments - `(#:test-target "tests" - #:configure-flags - (list - (string-append "-DGUILE_INCLUDE_DIR=" - (assoc-ref %build-inputs "guile") - "/include/guile/2.2/") - (string-append "-DGUILE_SITE_DIR=" - (assoc-ref %outputs "out") - "/share/guile/site/2.2/")))) + (list + #:configure-flags + #~(list (string-append "-DGUILE_INCLUDE_DIR=" #$guile-2.2 + "/include/guile/2.2/") + (string-append "-DGUILE_SITE_DIR=" #$output + "/share/guile/site/2.2/")) + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys #:rest args) + (when tests? + (apply (assoc-ref gnu:%standard-phases 'check) + #:tests? tests? #:test-target "tests" args) + ;; Failing tests. + (for-each delete-file + '("tests/attention/AttentionParamQueryUTest" + "tests/attention/HebbianCreationModuleUTest" + "tests/attention/ImportanceDiffusionUTest")) + (for-each invoke + (find-files "tests" "UTest$")))))))) (inputs (list atomspace boost @@ -209,15 +265,24 @@ tasks.") "1j8wv910fvrmph370wv5pv2f4bc2s9vl6i7bw3pkmwbdhxkhjbhm")))) (build-system cmake-build-system) (arguments - `(#:test-target "tests" - #:configure-flags - (list - (string-append "-DGUILE_INCLUDE_DIR=" - (assoc-ref %build-inputs "guile") - "/include/guile/2.2/") - (string-append "-DGUILE_SITE_DIR=" - (assoc-ref %outputs "out") - "/share/guile/site/2.2/")))) + (list + #:configure-flags + #~(list (string-append "-DGUILE_INCLUDE_DIR=" #$guile-2.2 + "/include/guile/2.2/") + (string-append "-DGUILE_SITE_DIR=" #$output + "/share/guile/site/2.2/")) + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys #:rest args) + (when tests? + (apply (assoc-ref gnu:%standard-phases 'check) + #:tests? tests? #:test-target "tests" args) + (for-each invoke + (find-files "tests" "UTest$")))))))) (inputs `(("attention" ,attention) ("atomspace" ,atomspace) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index b2de3f0f39..41e0c75b50 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -29418,23 +29418,28 @@ user-space file systems in Python.") ("catch" ,catch2-1) ("eigen" ,eigen))) (arguments - `(#:configure-flags - (list (string-append "-DCATCH_INCLUDE_DIR=" - (assoc-ref %build-inputs "catch") - "/include/catch")) - - #:phases (modify-phases %standard-phases - (add-after 'install 'install-python - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (with-directory-excursion "../source" - (setenv "PYBIND11_USE_CMAKE" "yes") - (invoke "python" "setup.py" "install" - "--single-version-externally-managed" - "--root=/" - (string-append "--prefix=" out))))))) - - #:test-target "check")) + (list + #:configure-flags + #~(list (string-append "-DCATCH_INCLUDE_DIR=" + (assoc-ref %build-inputs "catch") + "/include/catch")) + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) args))) + (add-after 'install 'install-python + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion "../source" + (setenv "PYBIND11_USE_CMAKE" "yes") + (invoke "python" "setup.py" "install" + "--single-version-externally-managed" + "--root=/" + (string-append "--prefix=" out))))))))) (home-page "https://github.com/pybind/pybind11/") (synopsis "Seamless operability between C++11 and Python") (description diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 9086170381..a49fc8d3cd 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -5164,8 +5164,7 @@ window docking system.") "0nsh6v5k4kdrrhcd6adz947n0dka4rrbx8f8rvm1175545nbi67s")))) (build-system qt-build-system) (arguments - (list #:test-target "tests" - #:phases + (list #:phases #~(modify-phases %standard-phases (add-before 'install 'fix-include-path (lambda _ diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm index 024aa71986..8f8fd1f310 100644 --- a/gnu/packages/radio.scm +++ b/gnu/packages/radio.scm @@ -147,8 +147,17 @@ (base32 "0i6jhrdswr1wglyb9h39idpz5v9z13yhidvlbj34vxpyngrkhlvs")))) (build-system cmake-build-system) (arguments - `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON") - #:test-target "test_all")) + (list + #:configure-flags #~'("-DBUILD_SHARED_LIBS=ON") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "test_all" args)))))) (home-page "https://github.com/quiet/libfec") (synopsis "Forward error correction algorithms library") (description @@ -175,12 +184,15 @@ useful in modems implemented with @dfn{digital signal processing} (DSP).") (build-system cmake-build-system) (arguments (list - #:test-target "check" + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases #~(modify-phases %standard-phases (add-after 'build 'build-libfec-compatibility-layer (lambda _ (invoke "make" "shim"))) + (replace 'check (assoc-ref gnu:%standard-phases 'check)) (add-after 'install 'delete-static-libraries (lambda _ (delete-file (string-append #$output "/lib/libcorrect.a")) diff --git a/gnu/packages/rdf.scm b/gnu/packages/rdf.scm index 869b0fc81f..a9f7449043 100644 --- a/gnu/packages/rdf.scm +++ b/gnu/packages/rdf.scm @@ -116,8 +116,7 @@ HTML and JSON.") (list boost ; could also use bundled copy zlib)) (arguments - `(#:test-target "cl_test" - #:configure-flags '("-DBUILD_CONTRIBS_LIB=ON") + `(#:configure-flags '("-DBUILD_CONTRIBS_LIB=ON") #:tests? #f)) ; Tests do not compile, as TestIndexSearcher.cpp uses ; undeclared usleep. After fixing this, one needs to run ; "make test" in addition to "make cl_test", then diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 89d362c52f..adb465f41d 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -473,8 +473,17 @@ that implements both the msgpack and msgpack-rpc specifications.") "1c9i93kr7wvpr01i4wixi9mf991nd3k2adg5fy0vxwwlvvc7dgdw")))) (build-system qt-build-system) (arguments - (list #:qtbase qtbase - #:test-target "tests")) + (list #:modules '((guix build cmake-build-system) + (guix build qt-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:qtbase qtbase + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "tests" args)))))) (home-page "https://github.com/iamantony/qtcsv") (synopsis "Library for reading and writing CSV files in Qt") (description diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 2a1fbe0a6c..be95824219 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -143,8 +143,12 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).") (list doxygen groff ; for 'fish --help' procps)) ; for the test suite (arguments - '(#:phases - (modify-phases %standard-phases + (list + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases (add-after 'unpack 'set-env (lambda _ ;; some tests write to $HOME @@ -244,6 +248,10 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).") port) (close-port port)) #t)) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "test" args))) ;; Use fish-foreign-env to source /etc/profile. (add-before 'install 'source-etc-profile (lambda* (#:key inputs #:allow-other-keys) diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm index 7adb604ce5..a323457615 100644 --- a/gnu/packages/sync.scm +++ b/gnu/packages/sync.scm @@ -439,7 +439,6 @@ and securely connects to Microsoft OneDrive services.") `(;; The "tests" target is broken and assumes that tests are run in the ;; root directory. #:tests? #f - #:test-target "tests" #:phases (modify-phases %standard-phases (add-after 'unpack 'search-$PATH-for-binaries diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 14f48f6a6c..b99b46aad8 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -1237,9 +1237,18 @@ ciphers such as ChaCha20, Curve25519, NTRU, and Blake2b.") (build-system cmake-build-system) (native-inputs (list perl)) (arguments - '(#:test-target "run_minimal_tests" - #:configure-flags - '("-DBUILD_SHARED_LIBS=ON" "-DDISABLE_GO=ON"))) + (list + #:configure-flags + #~(list "-DBUILD_SHARED_LIBS=ON" "-DDISABLE_GO=ON") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "run_minimal_tests" args)))))) (synopsis "General purpose cryptographic library") (description "AWS libcrypto (aws-lc) contains portable C implementations of algorithms needed for TLS and common applications, and includes optimized diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index a866d7b3a3..2f609c787c 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -190,7 +190,16 @@ SPIR-V, aiming to emit GLSL or MSL that looks like human-written code.") (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath=" #$output "/lib") "-DBUILD_SHARED_LIBS=ON" - "-DLLVM_SPIRV_INCLUDE_TESTS=ON"))) + "-DLLVM_SPIRV_INCLUDE_TESTS=ON") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "test" args)))))) (inputs (list llvm-18)) (native-inputs (list clang-18 llvm-18 python-lit spirv-headers)) (home-page "https://github.com/KhronosGroup/SPIRV-LLVM-Translator") diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index e2fc7caba4..586954094c 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -1852,8 +1852,10 @@ for efficient socket-like bidirectional reliable communication channels.") (list ;; Tests on non-x86_64 architectures are not well supported upstream. #:tests? (target-x86-64?) - #:test-target "run-tests" #:configure-flags '(list "-DUSE_SYSTEM_GTEST=ON") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) #:phases '(modify-phases %standard-phases (add-after 'unpack 'use-gcc @@ -1861,7 +1863,11 @@ for efficient socket-like bidirectional reliable communication channels.") ;; XXX This is the only test that fails. (add-after 'unpack 'delete-broken-test (lambda _ - (delete-file "test/wasm2c/spec/memory_init.txt")))))) + (delete-file "test/wasm2c/spec/memory_init.txt"))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "run-tests" args)))))) (native-inputs (list python googletest)) (home-page "https://github.com/WebAssembly/wabt") (synopsis "WebAssembly Binary Toolkit")