From: Greg Hogan <code@greghogan.com>
To: 70031@debbugs.gnu.org
Cc: Greg Hogan <code@greghogan.com>
Subject: [bug#70031] [core-updates PATCH 01/19] build-system/cmake: Parallelize tests using ctest.
Date: Wed, 27 Mar 2024 14:52:26 +0000 [thread overview]
Message-ID: <cbc2309b5444207bb5805ca67241b572d545b104.1711549374.git.code@greghogan.com> (raw)
In-Reply-To: <cover.1711549374.git.code@greghogan.com>
* guix/build/cmake-build-system.scm (check): Replace call to gnu-build's
non-parallelizable check with an implementation using cmake's ctest.
---
guix/build/cmake-build-system.scm | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm
index d1ff5071be5..ea342ff2ac9 100644
--- a/guix/build/cmake-build-system.scm
+++ b/guix/build/cmake-build-system.scm
@@ -23,6 +23,7 @@ (define-module (guix build cmake-build-system)
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
#:use-module (guix build utils)
#:use-module (ice-9 match)
+ #:use-module (srfi srfi-34)
#:export (%standard-phases
cmake-build))
@@ -77,12 +78,25 @@ (define* (configure #:key outputs (configure-flags '()) (out-of-source? #t)
(format #t "running 'cmake' with arguments ~s~%" args)
(apply invoke "cmake" args))))
-(define* (check #:key (tests? #t) (parallel-tests? #t) (test-target "test")
+(define %test-suite-log-regexp
+ ;; Name of test suite log files as commonly found in CMake.
+ "^LastTestFailed\\.log$")
+
+(define* (check #:key (tests? #t) (parallel-tests? #t)
+ (test-suite-log-regexp %test-suite-log-regexp)
#:allow-other-keys)
- (let ((gnu-check (assoc-ref gnu:%standard-phases 'check)))
- (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
- (gnu-check #:tests? tests? #:test-target test-target
- #:parallel-tests? parallel-tests?)))
+ (if tests?
+ (guard (c ((invoke-error? c)
+ ;; Dump the test suite log to facilitate debugging.
+ (display "\nTest suite failed, dumping logs.\n"
+ (current-error-port))
+ (gnu:dump-file-contents "." test-suite-log-regexp)
+ (raise c)))
+ (apply invoke "ctest" "--output-on-failure"
+ `(,@(if parallel-tests?
+ `("-j" ,(number->string (parallel-job-count)))
+ '()))))
+ (format #t "test suite not run~%")))
(define %standard-phases
;; Everything is as with the GNU Build System except for the `configure'
--
2.44.0
next prev parent reply other threads:[~2024-03-27 14:54 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 14:49 [bug#70031] [core-updates PATCH 00/19] Use CMake in build-system/cmake Greg Hogan
2024-03-27 14:52 ` Greg Hogan [this message]
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 02/19] build-system/cmake: Parameterize build system generator Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 03/19] build-system/cmake: Add build Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 04/19] build-system/cmake: Add install Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 05/19] gnu: libmedfile: Disable parallel tests Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 06/19] gnu: srt: " Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 07/19] gnu: fish: Fix tests Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 08/19] gnu: vulkan-loader: Disable parallel tests Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 09/19] gnu: igraph: Move test target to check phase Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 10/19] gnu: inkscape: " Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 11/19] gnu: vigra: " Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 12/19] gnu: cpp-httplib: Disable parallel tests Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 13/19] gnu: libical: " Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 14/19] gnu: astroid: Remove custom phases Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 15/19] gnu: websocketpp: Disable parallel tests Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 16/19] gnu: mbedtls-lts: " Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 17/19] gnu: scotch: " Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 18/19] gnu: evolution-data-server: " Greg Hogan
2024-03-31 0:36 ` Maxim Cournoyer
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 19/19] gnu: aws-c-common: " Greg Hogan
2024-10-22 18:08 ` [bug#70031] [PATCH v2 00/65] Use CMake in build-system/cmake Greg Hogan
2024-10-22 18:08 ` [bug#70031] [PATCH v2 01/65] build-system/cmake: Parallelize tests using ctest Greg Hogan
2024-10-22 18:08 ` [bug#70031] [PATCH v2 02/65] build-system/cmake: Add generator fields Greg Hogan
2024-10-22 18:08 ` [bug#70031] [PATCH v2 03/65] build-system/qt: " Greg Hogan
2024-10-22 18:08 ` [bug#70031] [PATCH v2 04/65] build-system/cmake: Add generator Greg Hogan
2024-10-22 18:08 ` [bug#70031] [PATCH v2 05/65] build-system/cmake: Add build Greg Hogan
2024-10-22 18:08 ` [bug#70031] [PATCH v2 06/65] build-system/cmake: Add install Greg Hogan
2024-10-22 18:08 ` [bug#70031] [PATCH v2 07/65] build-system/cmake: Add test-exclude fields Greg Hogan
2024-10-22 18:08 ` [bug#70031] [PATCH v2 08/65] build-system/qt: " Greg Hogan
2024-10-22 18:08 ` [bug#70031] [PATCH v2 09/65] build-system/cmake: Add test exclusion Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 10/65] build-system/cmake: Optionally build tests Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 11/65] build-system/cmake: Include ninja Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 12/65] build-system/qt: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 13/65] gnu: astroid: Remove custom phases Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 14/65] gnu: rdma-core: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 15/65] gnu: fish: Fix tests Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 16/65] gnu: igraph: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 17/65] gnu: inkscape: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 18/65] gnu: inkscape/stable: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 19/65] gnu: kirigami: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 20/65] gnu: kirigami-5: Disable tests Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 21/65] gnu: vigra: Fix tests Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 22/65] gnu: cpp-httplib: Disable parallel tests Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 23/65] gnu: evolution-data-server: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 24/65] gnu: kservice: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 25/65] gnu: libical: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 26/65] gnu: libmedfile: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 27/65] gnu: mbedtls-lts: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 28/65] gnu: scotch: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 29/65] gnu: srt: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 30/65] gnu: vulkan-loader: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 31/65] gnu: websocketpp: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 32/65] gnu: dbus-cxx: Use #:test-exclude Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 33/65] gnu: hotspot: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 34/65] gnu: kconfig-5: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 35/65] gnu: nextcloud-client: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 36/65] gnu: pdal: Use :#test-exclude and disable parallel tests Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 37/65] gnu: qxmpp: Use #:test-exclude Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 38/65] gnu: simgear: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 39/65] gnu: cmake: Update to 3.30.5 Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 40/65] gnu: asymptote: Pin CMake dependency Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 41/65] gnu: conan: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 42/65] gnu: entangle: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 43/65] gnu: go-mvdan-cc-editorconfig: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 44/65] gnu: libdecor: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 45/65] gnu: liblxi: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 46/65] gnu: lxi-tools: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 47/65] gnu: pantheon-calculator: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 48/65] gnu: pantheon-calendar: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 49/65] gnu: python-awkward-cpp: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 50/65] gnu: python-contourpy: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 51/65] gnu: python-keystone-engine: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 52/65] gnu: python-lief: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 53/65] gnu: python-optree: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 54/65] gnu: python-pivy: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 55/65] gnu: python-pytorch: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 56/65] gnu: python-symengine: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 57/65] gnu: raider: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 58/65] gnu: siril: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 59/65] gnu: soqt: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 60/65] gnu: syndication-domination: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 61/65] gnu: tigervnc-server: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 62/65] gnu: trinityrnaseq: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 63/65] gnu: unicorn: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 64/65] gnu: wavbreaker: " Greg Hogan
2024-10-22 18:09 ` [bug#70031] [PATCH v2 65/65] gnu: xffm+: " Greg Hogan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cbc2309b5444207bb5805ca67241b572d545b104.1711549374.git.code@greghogan.com \
--to=code@greghogan.com \
--cc=70031@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.