guix_mirror_bot pushed a commit to branch next-master
in repository guix.

commit 43c01f294532e127614d6257953ca1641338655f
Author: Sören Tempel <[email protected]>
AuthorDate: Sun Dec 7 07:01:41 2025 +0100

    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 <[email protected]>
---
 gnu/local.mk                                       |  1 +
 gnu/packages/build-tools.scm                       |  5 +++--
 .../patches/bmake-run-check-separately.patch       | 26 ++++++++++++++++++++++
 3 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index f802c543ad..009a5cae63 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1062,6 +1062,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 bbdb629c49..660bef2651 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 0000000000..b2403928a8
--- /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`

Reply via email to