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
This commit is contained in:
Dag-Erling Smørgrav
2026-04-29 17:14:13 +02:00
parent 4c99836ac7
commit 67a63eae7b
4 changed files with 14 additions and 10 deletions
+4
View File
@@ -317,6 +317,10 @@ check_epoch_and_opts
# "$OBJTOP"/tests/sys/kqueue/libkqueue/*
#fi
# 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
# 20260426 # libpkgconf contains incorrect paths
clean_obj lib/libpkgconf personality c pkgconfig:/share
clean_obj lib/libpkgconf pkg c pkgconfig:/share
-10
View File
@@ -55,14 +55,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>
+5
View File
@@ -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
+5
View File
@@ -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