summaryrefslogtreecommitdiff
path: root/regress/buildlink-transform
diff options
context:
space:
mode:
authorjlam <jlam>2004-08-28 21:21:12 +0000
committerjlam <jlam>2004-08-28 21:21:12 +0000
commit9f6b3c7d136712a2ebc1d4dba3abc0f170c68237 (patch)
tree5e428a03a4a45051abbe5bb562de876290b70027 /regress/buildlink-transform
parent52a44eb0265c96253cc5d10561e03e33f2d4dbde (diff)
downloadpkgsrc-9f6b3c7d136712a2ebc1d4dba3abc0f170c68237.tar.gz
Don't die as soon as the first test fails. Instead, run them all,
then report how many failed and which ones. Return with an exit code indicating how many tests failed.
Diffstat (limited to 'regress/buildlink-transform')
-rw-r--r--regress/buildlink-transform/Makefile20
1 files changed, 14 insertions, 6 deletions
diff --git a/regress/buildlink-transform/Makefile b/regress/buildlink-transform/Makefile
index dcd3b76cafb..d2af90747ed 100644
--- a/regress/buildlink-transform/Makefile
+++ b/regress/buildlink-transform/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2004/08/28 08:20:44 jlam Exp $
+# $NetBSD: Makefile,v 1.8 2004/08/28 21:21:12 jlam Exp $
#
# Run many buildlink transform tests in a single regression test to avoid
# having to keep creating the wrapper scripts over and over again.
@@ -51,12 +51,20 @@ post-${WRAPPER_PHASE}:
.PHONY: regress do-regress
-regress: ${WRAPPER_PHASE}
- @cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} do-regress \
- PKG_PHASE=${WRAPPER_PHASE}
+regress: ${WRAPPER_PHASE} do-regress
+
+FAILED_TESTS= ${WRKDIR}/failed
do-regress:
- @${DO_NADA}
+ @if [ -f ${FAILED_TESTS} ]; then \
+ ${ECHO} "FAILED:"; \
+ ${CAT} ${FAILED_TESTS} | while read test; do \
+ ${ECHO} " $$test"; \
+ done; \
+ exit `${CAT} ${FAILED_TESTS} | ${WC} -l`; \
+ else \
+ ${DO_NADA}; \
+ fi
TEST_RESULT= runtest=`${SETENV} ${REGRESS_ENV} regress $$test`; \
${ECHO} "(${.TARGET}) saw: $$test"; \
@@ -68,7 +76,7 @@ TEST_RESULT= runtest=`${SETENV} ${REGRESS_ENV} regress $$test`; \
;; \
*) \
${ECHO} "(${.TARGET}) result: FAIL"; \
- exit 1; \
+ ${ECHO} "${.TARGET}" >> ${FAILED_TESTS}; \
;; \
esac