git: 2d39931b5ed3 - stable/14 - bc: Fix tests
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 26 Jul 2026 09:45:12 UTC
The branch stable/14 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=2d39931b5ed3ed1843e04c3afc815109a4532c2d
commit 2d39931b5ed3ed1843e04c3afc815109a4532c2d
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-04-29 15:14:13 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-07-25 17:16:20 +0000
bc: Fix tests
Stop generating test scripts at build time. The dc test script is
broken and simply fixing the code that generates it won't help as there
is no reliable way to ensure it gets regenerated if it already exists in
the object tree.
MFC after: 1 week
Reviewed by: se
Differential Revision: https://reviews.freebsd.org/D56511
(cherry picked from commit 67a63eae7b2d10d29983c9698894f1bfff4ffc6e)
---
tools/build/depend-cleanup.sh | 4 ++++
usr.bin/gh-bc/tests/Makefile | 10 ----------
usr.bin/gh-bc/tests/bc_tests.sh | 5 +++++
usr.bin/gh-bc/tests/dc_tests.sh | 5 +++++
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh
index 7aa34c972d30..ba0908323057 100755
--- a/tools/build/depend-cleanup.sh
+++ b/tools/build/depend-cleanup.sh
@@ -105,6 +105,10 @@ clean_dep()
# Date Rev Description
+# 20260427 # bc / dc test scripts no longer generated
+dir="${OBJTOP%/}"/usr.bin/gh-bc/tests
+run rm -fv "${dir}"/bc_tests.sh "${dir}"/dc_tests.sh
+
# 20220326 fbc002cb72d2 move from bcmp.c to bcmp.S
if [ "$MACHINE_ARCH" = "amd64" ]; then
clean_dep lib/libc bcmp c
diff --git a/usr.bin/gh-bc/tests/Makefile b/usr.bin/gh-bc/tests/Makefile
index 32eb5bfe8922..00233e5fd777 100644
--- a/usr.bin/gh-bc/tests/Makefile
+++ b/usr.bin/gh-bc/tests/Makefile
@@ -56,14 +56,4 @@ FILESdc_scriptsMODE= 0755
PLAIN_TESTS_SH= bc_tests dc_tests
-bc_tests.sh:
- echo "#!/bin/sh" > ${.TARGET}
- echo 'env LANG=C BC_TEST_OUTPUT_DIR=$$(pwd) \
- ${TESTSDIR}/tests/all.sh -n bc 1 1 0 0 bc' >> ${.TARGET}
-
-dc_tests.sh:
- echo "#!/bin/sh" > ${.TARGET}
- echo "env LANG=C BC_TEST_OUTPUT_DIR=\$pwd \
- ${TESTSDIR}/tests/all.sh -n dc 1 1 0 0 dc" >> ${.TARGET}
-
.include <bsd.test.mk>
diff --git a/usr.bin/gh-bc/tests/bc_tests.sh b/usr.bin/gh-bc/tests/bc_tests.sh
new file mode 100755
index 000000000000..76cfee05560f
--- /dev/null
+++ b/usr.bin/gh-bc/tests/bc_tests.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+unset LC_ALL LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME
+export LANG=C
+export BC_TEST_OUTPUT_DIR=${PWD}
+exec "$(dirname "$(realpath "$0")")"/tests/all.sh -n bc 1 1 0 0 bc
diff --git a/usr.bin/gh-bc/tests/dc_tests.sh b/usr.bin/gh-bc/tests/dc_tests.sh
new file mode 100755
index 000000000000..6900ce9098d0
--- /dev/null
+++ b/usr.bin/gh-bc/tests/dc_tests.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+unset LC_ALL LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME
+export LANG=C
+export BC_TEST_OUTPUT_DIR=${PWD}
+exec "$(dirname "$(realpath "$0")")"/tests/all.sh -n dc 1 1 0 0 dc