guix_mirror_bot pushed a commit to branch c++-team in repository guix. commit ca68b357092891aacddaac38b131ca130a1748be 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/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/kde-multimedia.scm (elisa), * gnu/packages/linux.scm (falcosecurity-libs), * gnu/packages/llvm.scm (libcxx, libomp-15), * gnu/packages/machine-learning.scm (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/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/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 | 5 +- 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 ++- 43 files changed, 575 insertions(+), 312 deletions(-) diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index a6008eb128..ca0da9ca51 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -1281,9 +1281,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 e9cfa3e034..99f3af2675 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -1298,14 +1298,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") @@ -8879,7 +8881,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 4e289baeed..0400c5abe3 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -23484,8 +23484,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") @@ -24612,14 +24611,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 b2f22739ae..6827db6977 100644 --- a/gnu/packages/bittorrent.scm +++ b/gnu/packages/bittorrent.scm @@ -507,7 +507,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/check.scm b/gnu/packages/check.scm index 902741c80b..deb0501393 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 aba31a1d31..ce7574d9a6 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -532,8 +532,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 427d6256de..78c21053f2 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -2126,6 +2126,15 @@ timestamps in the file header with a fixed time (1 January 2008). (base32 "0i6bpa2b13z19alm6ig80364dnin1w28cvif18k6wkkb0w3dzp8y")))) (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 d343e44f67..fa7870d999 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -831,8 +831,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)) @@ -1407,8 +1406,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 @@ -2466,10 +2464,17 @@ provides a number of utilities to make coding with expected cleaner.") (sha256 (base32 "03qkr42h0g6rivj3kq207gzgnv7hq88y69q16l2vg1lbvjcgca2g")))) (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 doctest fmt pkg-config)) (home-page "https://sinusoid.es/immer") @@ -2493,7 +2498,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") @@ -2514,13 +2526,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 1c3ee0141b..bd95aaa8d2 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -1542,11 +1542,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 @@ -1615,7 +1616,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 fccdc6420c..538d1a4596 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 6726a08418..3870946fbc 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -343,6 +343,9 @@ console.") (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 @@ -372,6 +375,10 @@ console.") (("\"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? @@ -425,8 +432,7 @@ console.") (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 e2736824d6..2d49bcaa47 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -1137,12 +1137,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 3240cca92f..3bda4286a5 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -693,7 +693,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 1d80daddd1..c1061764f1 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 1d6dd18816..7397ed957f 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -7463,22 +7463,30 @@ starting a decryption sequence to reveal the original plaintext characters.") (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) @@ -7704,26 +7712,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 @@ -10594,7 +10607,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 @@ -10625,7 +10640,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 8cc411b631..83fb48fc9c 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -1293,18 +1293,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 61ad5da575..b8203db3d8 100644 --- a/gnu/packages/graph.scm +++ b/gnu/packages/graph.scm @@ -144,7 +144,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 @@ -176,6 +178,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 bbef7f4096..103c679b7a 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -1552,38 +1552,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 ba823f8894..41eb46d811 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)) @@ -357,6 +356,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)) @@ -370,11 +371,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/kde-multimedia.scm b/gnu/packages/kde-multimedia.scm index 885e0574e7..996e0e0e00 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 aa9d40ef85..419271abf5 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -10359,7 +10359,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 @@ -10369,6 +10371,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 93d0f5efe7..46b010d5dd 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -809,14 +809,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") @@ -912,14 +918,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) @@ -995,10 +1001,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) @@ -1933,7 +1938,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 @@ -1946,11 +1950,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++ @@ -2492,7 +2503,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 c1621d1e0b..f63ba848bd 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -4818,7 +4818,6 @@ the tensors contained therein.") (build-system cmake-build-system) (arguments (list - #:test-target "cpptest" #:configure-flags #~(list "-DUSE_OPENCL=ON" "-DUSE_VULKAN=ON" @@ -4838,11 +4837,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). diff --git a/gnu/packages/markup.scm b/gnu/packages/markup.scm index aa5bd0fc15..5d2dc82953 100644 --- a/gnu/packages/markup.scm +++ b/gnu/packages/markup.scm @@ -482,8 +482,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 @@ -540,8 +538,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 e785de6ec8..9e35e0fc52 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 @@ -10139,7 +10138,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 @@ -10455,16 +10453,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 c97a00b61a..7bf761f2b0 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -2851,11 +2851,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 9dfce6313f..7bd102a8b8 100644 --- a/gnu/packages/mp3.scm +++ b/gnu/packages/mp3.scm @@ -659,8 +659,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 8d0fc293dc..e8c5bbb4e0 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -533,27 +533,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 @@ -765,24 +772,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 @@ -6056,7 +6070,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") @@ -7940,28 +7961,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 501e57b485..63c5eecdf9 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -29101,23 +29101,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 c8c53c0983..a6dd613b65 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -4993,8 +4993,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 7402895249..a9a9c0fa0b 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 58a485553e..9a25c226c8 100644 --- a/gnu/packages/rdf.scm +++ b/gnu/packages/rdf.scm @@ -115,8 +115,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 38a274a96b..27adc4f01e 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 2742498f3e..9f0f518521 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -142,8 +142,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 @@ -243,6 +247,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 82a0abab2e..0f78dc30c4 100644 --- a/gnu/packages/sync.scm +++ b/gnu/packages/sync.scm @@ -438,7 +438,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 db352a15a1..6e239c183d 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -1235,9 +1235,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 2f8a6a1411..ebffb7f3c8 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -1827,8 +1827,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 @@ -1836,7 +1838,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")