pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/regress Provide a way to report the number of subtests...
details: https://anonhg.NetBSD.org/pkgsrc/rev/d92279b7f979
branches: trunk
changeset: 480049:d92279b7f979
user: jlam <jlam%pkgsrc.org@localhost>
date: Sat Aug 28 23:54:21 2004 +0000
description:
Provide a way to report the number of subtests passed and failed.
diffstat:
regress/buildlink-transform/Makefile | 20 ++++++++++++++++++--
regress/buildlink-unwrap/Makefile | 20 ++++++++++++++++++--
2 files changed, 36 insertions(+), 4 deletions(-)
diffs (104 lines):
diff -r 86fe89a4b7f6 -r d92279b7f979 regress/buildlink-transform/Makefile
--- a/regress/buildlink-transform/Makefile Sat Aug 28 23:21:43 2004 +0000
+++ b/regress/buildlink-transform/Makefile Sat Aug 28 23:54:21 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2004/08/28 21:21:12 jlam Exp $
+# $NetBSD: Makefile,v 1.9 2004/08/28 23:54:21 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.
@@ -54,6 +54,7 @@
regress: ${WRAPPER_PHASE} do-regress
FAILED_TESTS= ${WRKDIR}/failed
+PASSED_TESTS= ${WRKDIR}/passed
do-regress:
@if [ -f ${FAILED_TESTS} ]; then \
@@ -61,11 +62,25 @@
${CAT} ${FAILED_TESTS} | while read test; do \
${ECHO} " $$test"; \
done; \
- exit `${CAT} ${FAILED_TESTS} | ${WC} -l`; \
+ exit 1; \
else \
${DO_NADA}; \
fi
+report-failed:
+ @if [ -f "${FAILED_TESTS}" ]; then \
+ ${ECHO} `${CAT} ${FAILED_TESTS} | ${WC} -l`; \
+ else \
+ ${ECHO} "0"; \
+ fi
+
+report-passed:
+ @if [ -f "${PASSED_TESTS}" ]; then \
+ ${ECHO} `${CAT} ${PASSED_TESTS} | ${WC} -l`; \
+ else \
+ ${ECHO} "0"; \
+ fi
+
TEST_RESULT= runtest=`${SETENV} ${REGRESS_ENV} regress $$test`; \
${ECHO} "(${.TARGET}) saw: $$test"; \
${ECHO} "(${.TARGET}) got: $$runtest"; \
@@ -73,6 +88,7 @@
case $$runtest in \
$$expected) \
${ECHO} "(${.TARGET}) result: PASS"; \
+ ${ECHO} "${.TARGET}" >> ${PASSED_TESTS}; \
;; \
*) \
${ECHO} "(${.TARGET}) result: FAIL"; \
diff -r 86fe89a4b7f6 -r d92279b7f979 regress/buildlink-unwrap/Makefile
--- a/regress/buildlink-unwrap/Makefile Sat Aug 28 23:21:43 2004 +0000
+++ b/regress/buildlink-unwrap/Makefile Sat Aug 28 23:54:21 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2004/08/28 21:21:12 jlam Exp $
+# $NetBSD: Makefile,v 1.3 2004/08/28 23:54:21 jlam Exp $
DISTNAME= regress-buildlink-unwrap-0.0
CATEGORIES= regress
@@ -40,6 +40,7 @@
regress: build do-regress
FAILED_TESTS= ${WRKDIR}/failed
+PASSED_TESTS= ${WRKDIR}/passed
do-regress:
@if [ -f ${FAILED_TESTS} ]; then \
@@ -47,11 +48,25 @@
${CAT} ${FAILED_TESTS} | while read test; do \
${ECHO} " $$test"; \
done; \
- exit `${CAT} ${FAILED_TESTS} | ${WC} -l`; \
+ exit 1; \
else \
${DO_NADA}; \
fi
+report-failed:
+ @if [ -f "${FAILED_TESTS}" ]; then \
+ ${ECHO} `${CAT} ${FAILED_TESTS} | ${WC} -l`; \
+ else \
+ ${ECHO} "0"; \
+ fi
+
+report-passed:
+ @if [ -f "${PASSED_TESTS}" ]; then \
+ ${ECHO} `${CAT} ${PASSED_TESTS} | ${WC} -l`; \
+ else \
+ ${ECHO} "0"; \
+ fi
+
TEST_RESULT= PATH="${WRKSRC}:${PATH}"; \
runtest=`$$test`; \
${ECHO} "(${.TARGET}) ran: $$test"; \
@@ -60,6 +75,7 @@
case $$runtest in \
$$expected) \
${ECHO} "(${.TARGET}) result: PASS"; \
+ ${ECHO} "${.TARGET}" >> ${PASSED_TESTS}; \
;; \
*) \
${ECHO} "(${.TARGET}) result: FAIL"; \
Home |
Main Index |
Thread Index |
Old Index