Add generic_check function and add new default check target to build.sh.

The check target is excluded from the all target since it can often take a
very long time to run.
This commit is contained in:
Tom G. Christensen 2008-04-05 09:54:30 +00:00
parent 1603b4dd44
commit bb2413eda9
3 changed files with 19 additions and 1 deletions

View File

@ -18,7 +18,7 @@ all()
for METHOD in $METHODS
do
case $METHOD in
all*|*clean) ;;
all*|*clean|check) ;;
*) $METHOD
;;
esac

View File

@ -30,6 +30,12 @@ build()
generic_build
}
reg check
check()
{
generic_check
}
reg install
install()
{

View File

@ -154,6 +154,10 @@ generic_configure=1
# We default to an empty string so the default target will be built
make_build_target=""
# Allow overriding the make target for running the testsuite
# We default to 'check'
make_check_target="check"
# Allow skipping the configure run
no_configure=0
@ -686,6 +690,14 @@ generic_build()
fi
}
# generic_check(): Run the check target
# params: $1 = dir to descend to *inside* "source" - optional
generic_check()
{
setdir ${srcdir}/${topsrcdir}/$1
$MAKE_PROG -k $(_upls $make_check_target)
}
# generic_build_perl(): Build a perl module from source
# params: same as generic_build
# This is based on code ripped out of a RPM specfile generated