From 167829ebf3192d6e1821805e206c69659844883e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Sun, 7 Dec 2025 07:01:41 +0100 Subject: [PATCH] gnu: bmake: Run tests in check phase. * gnu/packages/patches/bmake-run-check-separately.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/build-tools.scm (bmake)[source]: Use it. [arguments/<#:tests, #:test-target>: Set to enable tests. Change-Id: I7e270e1c74b475813cb9c623f2b8a37e1f09a0b9 Signed-off-by: Andreas Enge --- gnu/local.mk | 1 + gnu/packages/build-tools.scm | 5 ++-- .../patches/bmake-run-check-separately.patch | 26 +++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/bmake-run-check-separately.patch diff --git a/gnu/local.mk b/gnu/local.mk index 3f211cc6e17..b25833cdade 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1063,6 +1063,7 @@ dist_patch_DATA = \ %D%/packages/patches/binutils-mingw-w64-deterministic.patch \ %D%/packages/patches/binutils-2.41-fix-cross.patch \ %D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch \ + %D%/packages/patches/bmake-run-check-separately.patch \ %D%/packages/patches/boolector-find-googletest.patch \ %D%/packages/patches/boost-fix-duplicate-definitions-bug.patch \ %D%/packages/patches/btanks-scons-python.patch \ diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index bbdb629c49a..660bef26513 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -233,7 +233,8 @@ generate such a compilation database.") (uri (string-append "http://www.crufty.net/ftp/pub/sjg/bmake-" version ".tar.gz")) (sha256 - (base32 "0q30a04lg91g4932xgl0hg4c798inr5ky8fq6cwqzfkpar8zi8s5")))) + (base32 "0q30a04lg91g4932xgl0hg4c798inr5ky8fq6cwqzfkpar8zi8s5")) + (patches (search-patches "bmake-run-check-separately.patch")))) (build-system gnu-build-system) (inputs (list bash-minimal)) @@ -241,7 +242,7 @@ generate such a compilation database.") (list bc coreutils)) (arguments (list - #:tests? #f ; test during build + #:test-target "test" #:phases #~(modify-phases %standard-phases ;; Ensure that a store path to /bin/sh is detected as a POSIX shell by diff --git a/gnu/packages/patches/bmake-run-check-separately.patch b/gnu/packages/patches/bmake-run-check-separately.patch new file mode 100644 index 00000000000..b2403928a89 --- /dev/null +++ b/gnu/packages/patches/bmake-run-check-separately.patch @@ -0,0 +1,26 @@ +By default tests are run on build and install. Normally, Guix +tests are invoked separately in a check stage. To allow doing +that this patch disable the automatic test invocations during build and +install. + +diff -upr bmake.orig/boot-strap bmake/boot-strap +--- bmake.orig/boot-strap 2024-03-15 11:26:18.664828810 +0100 ++++ bmake/boot-strap 2024-03-15 11:27:12.081555010 +0100 +@@ -435,9 +435,6 @@ op_build() { + [ -s make-bootstrap.sh ] || op_configure + chmod 755 make-bootstrap.sh || exit 1 + ./make-bootstrap.sh || exit 1 +- case "$op" in +- build) rm -f tested; op_test;; +- esac + } + + op_test() { +@@ -461,7 +458,6 @@ op_clean() { + } + + op_install() { +- op_test + case "$INSTALL_PREFIX,$INSTALL_BIN,$prefix" in + ,$HOST_TARGET/bin,*/$HOST_TARGET) + INSTALL_PREFIX=`dirname $prefix`