summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-08-28 21:21:12 +0000
committerjlam <jlam@pkgsrc.org>2004-08-28 21:21:12 +0000
commitf23b9ab60eb204b5de9485a15290cffadd0f0eec (patch)
tree5e428a03a4a45051abbe5bb562de876290b70027 /regress
parent56ec9b103c5702ec9844cdf571e2429d73dc54b5 (diff)
downloadpkgsrc-f23b9ab60eb204b5de9485a15290cffadd0f0eec.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')
-rw-r--r--regress/buildlink-transform/Makefile20
-rw-r--r--regress/buildlink-unwrap/Makefile16
2 files changed, 27 insertions, 9 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
diff --git a/regress/buildlink-unwrap/Makefile b/regress/buildlink-unwrap/Makefile
index 51d31c451e8..76364476258 100644
--- a/regress/buildlink-unwrap/Makefile
+++ b/regress/buildlink-unwrap/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2004/08/28 06:17:21 jlam Exp $
+# $NetBSD: Makefile,v 1.2 2004/08/28 21:21:12 jlam Exp $
DISTNAME= regress-buildlink-unwrap-0.0
CATEGORIES= regress
@@ -39,8 +39,18 @@ do-build:
regress: build 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= PATH="${WRKSRC}:${PATH}"; \
runtest=`$$test`; \
@@ -53,7 +63,7 @@ TEST_RESULT= PATH="${WRKSRC}:${PATH}"; \
;; \
*) \
${ECHO} "(${.TARGET}) result: FAIL"; \
- exit 1; \
+ ${ECHO} "${.TARGET}" >> ${FAILED_TESTS}; \
;; \
esac