diff options
author | jlam <jlam@pkgsrc.org> | 2004-08-28 23:54:21 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-08-28 23:54:21 +0000 |
commit | 5b55d3042251680823ff553b180f3c8022e7de57 (patch) | |
tree | fc27822443550cbd1198709e974689c2aac8ff40 /regress/buildlink-transform | |
parent | 54f8fe7ad2292b42125e8e351eec8fe84dc8af7b (diff) | |
download | pkgsrc-5b55d3042251680823ff553b180f3c8022e7de57.tar.gz |
Provide a way to report the number of subtests passed and failed.
Diffstat (limited to 'regress/buildlink-transform')
-rw-r--r-- | regress/buildlink-transform/Makefile | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/regress/buildlink-transform/Makefile b/regress/buildlink-transform/Makefile index d2af90747ed..bc55dbbb06a 100644 --- a/regress/buildlink-transform/Makefile +++ b/regress/buildlink-transform/Makefile @@ -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 @@ post-${WRAPPER_PHASE}: regress: ${WRAPPER_PHASE} do-regress FAILED_TESTS= ${WRKDIR}/failed +PASSED_TESTS= ${WRKDIR}/passed do-regress: @if [ -f ${FAILED_TESTS} ]; then \ @@ -61,11 +62,25 @@ do-regress: ${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 @@ TEST_RESULT= runtest=`${SETENV} ${REGRESS_ENV} regress $$test`; \ case $$runtest in \ $$expected) \ ${ECHO} "(${.TARGET}) result: PASS"; \ + ${ECHO} "${.TARGET}" >> ${PASSED_TESTS}; \ ;; \ *) \ ${ECHO} "(${.TARGET}) result: FAIL"; \ |