for review: an option to tell bootcheck to run tests in one dir only
Zoltan Somogyi
zs at cs.mu.OZ.AU
Mon May 11 15:57:31 AEST 1998
tools/bootcheck:
Add a new option, -d <dir> or --test-dir <dir>, which runs tests
only in the named directory. This is most useful in conjunction
with -T, when you want to know whether a change in the runtime
or test setup is sufficient to cure a problem in a given test dir.
Reorder option handling to be alphabetical.
Another independent change:
tools/binary_step:
Simplify the code a bit.
Zoltan.
cvs diff: Diffing .
Index: binary_step
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/binary_step,v
retrieving revision 1.10
diff -u -u -r1.10 binary_step
--- binary_step 1997/05/12 01:50:57 1.10
+++ binary_step 1998/04/29 09:24:37
@@ -203,7 +203,7 @@
fi
fi
-if test "$bootcheck" = true
+if "$bootcheck"
then
# Rebuild the stage3 library and compiler from scratch
Index: bootcheck
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.52
diff -u -u -r1.52 bootcheck
--- bootcheck 1998/04/24 02:47:24 1.52
+++ bootcheck 1998/05/08 01:23:08
@@ -8,6 +8,8 @@
usage="\
Usage: $0 [options]
Options:
+ -d <dirname>, --test-dir <dirname>
+ Run the tests only in <dirname>.
-h, --help
Display this usage message.
-j <num-jobs>, --jobs <num-jobs>
@@ -22,6 +24,10 @@
Copy the runtime directory instead of linking it.
This is necessary if one wants to bootcheck a grade
that is not compatible with the standard one.
+ -s, --sicstus
+ As well as running the normal bootcheck, also build a SICStus
+ Prolog version of the compiler and check it against the
+ stage 2 directory.
-t, --no-test-suite
By default, bootcheck will also run the test quite.
This option prevents that.
@@ -29,10 +35,6 @@
Do not run the bootstrap check; execute the test suite only.
This option requires a previous bootstrap check to have left
a working stage 2 directory.
- -s, --sicstus
- As well as running the normal bootcheck, also build a SICStus
- Prolog version of the compiler and check it against the
- stage 2 directory.
-2, --keep-stage-2
Don't rebuild the stage 2 directory from scratch after
building stage 1. Instead use the existing stage 2 directory.
@@ -48,6 +50,7 @@
(Same as the \`--use-subdirs' option to mmake and mmc.)
"
+testdir=""
jfactor=""
keep_objs=false
mmake_opts="-k"
@@ -64,6 +67,11 @@
while [ $# -gt 0 ]; do
case "$1" in
+ -d|--test-dir)
+ testdir="$2"; shift ;;
+ -d*)
+ testdir="` expr $1 : '-d\(.*\)' `"; ;;
+
-h|--help)
echo "$usage"
exit 0 ;;
@@ -89,15 +97,15 @@
-r|--copy-runtime)
copy_runtime=true ;;
+ -s|--sicstus)
+ test_sicstus=true ;;
+
-t|--no-test-suite)
runtests=false ;;
-T|--test-suite-only)
do_bootcheck=false ;;
- -s|--sicstus)
- test_sicstus=true ;;
-
-2|--keep-stage-2)
keep_stage_2=true ;;
@@ -639,14 +647,26 @@
if test -d ../tests
then
- cd ../tests
- ./runtests $jfactor
+ if test "$testdir" = ""
+ then
+ cd ../tests
+ ./runtests $jfactor
+ else
+ cd ../tests/$testdir
+ ./runtests $jfactor
+ fi
test_status=$?
cd $root
elif test -d tests
then
- cd tests
- ./runtests $jfactor
+ if test "$testdir" = ""
+ then
+ cd tests
+ ./runtests $jfactor
+ else
+ cd tests/$testdir
+ ./runtests $jfactor
+ fi
test_status=$?
cd $root
else
More information about the developers
mailing list