diff options
author | gavan <gavan> | 2005-05-07 15:45:59 +0000 |
---|---|---|
committer | gavan <gavan> | 2005-05-07 15:45:59 +0000 |
commit | 5c705abd3db1e5392e9d50b54866dfe355bbd1a5 (patch) | |
tree | cc4a9fa4095f5992a2956781b7b07b7211549dfb /pkgtools/pkg_regress | |
parent | 9a85db191482eb448b24a23ad943dc7b37605a7f (diff) | |
download | pkgsrc-5c705abd3db1e5392e9d50b54866dfe355bbd1a5.tar.gz |
Move invocation of make into a do_test_default, and provide overridable
function do_test, which by default just invokes do_test_default.
For jlam's overriding pleasure.
Diffstat (limited to 'pkgtools/pkg_regress')
-rw-r--r-- | pkgtools/pkg_regress/Makefile | 4 | ||||
-rwxr-xr-x | pkgtools/pkg_regress/files/pkg_regress.sh | 28 |
2 files changed, 21 insertions, 11 deletions
diff --git a/pkgtools/pkg_regress/Makefile b/pkgtools/pkg_regress/Makefile index eec099930ef..97c7c99b6e7 100644 --- a/pkgtools/pkg_regress/Makefile +++ b/pkgtools/pkg_regress/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.2 2004/10/07 02:01:38 jlam Exp $ +# $NetBSD: Makefile,v 1.3 2005/05/07 15:45:59 gavan Exp $ -DISTNAME= pkg_regress-0.0 +DISTNAME= pkg_regress-0.1 CATEGORIES= pkgtools MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkg_regress/files/pkg_regress.sh b/pkgtools/pkg_regress/files/pkg_regress.sh index 1cd575b62b2..00c3b165200 100755 --- a/pkgtools/pkg_regress/files/pkg_regress.sh +++ b/pkgtools/pkg_regress/files/pkg_regress.sh @@ -1,6 +1,6 @@ #!@SH@ -e # -# $NetBSD: pkg_regress.sh,v 1.2 2004/10/13 13:42:23 gavan Exp $ +# $NetBSD: pkg_regress.sh,v 1.3 2005/05/07 15:46:00 gavan Exp $ # if [ -z "$PKGSRCDIR" ] @@ -23,6 +23,23 @@ do_cleanup() return } +do_test() +{ + do_test_default +} + +do_test_default() +{ + # Run the test. We use an if statement to ensure that the script + # isn't terminated if it is executed with sh -e. + if ${TEST_MAKE} ${MAKEARGS_TEST} >${TEST_OUTFILE} 2>&1 + then + TEST_EXITSTATUS=$? + else + TEST_EXITSTATUS=$? + fi +} + check_result() { return @@ -75,14 +92,7 @@ runtest() { do_setup - # Run the test. We use an if statement to ensure that the script - # isn't terminated if it is executed with sh -e. - if ${TEST_MAKE} ${MAKEARGS_TEST} >${TEST_OUTFILE} 2>&1 - then - TEST_EXITSTATUS=$? - else - TEST_EXITSTATUS=$? - fi + do_test check_result |