[m-rev.] for review: allow testing with mmc --make and of the erlang grade
Peter Wang
wangp at students.csse.unimelb.edu.au
Wed Aug 15 17:02:12 AEST 2007
Estimated hours taken: 4
Branches: main
Modify nightly test scripts to allow testing with `mmc --make' and testing of
the erlang grade.
tools/run_all_tests_from_cron:
Accept a fourth command line argument to enable testing
with mmc --make (which should be `--use-mmc-make' in that case).
Pass this to test_mercury.
tools/test_mercury:
Accept the additional --use-mmc-make option. Pass that to all
calls of mmake and bootcheck.
Make ceres install and test the erlang grade if called with
--use-mmc-make.
Index: tools/run_all_tests_from_cron
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/run_all_tests_from_cron,v
retrieving revision 1.80
diff -u -r1.80 run_all_tests_from_cron
--- tools/run_all_tests_from_cron 19 Jan 2007 06:29:21 -0000 1.80
+++ tools/run_all_tests_from_cron 15 Aug 2007 06:51:17 -0000
@@ -24,11 +24,14 @@
C_COMPILER=gcc
BRANCH=
+USE_MMC_MAKE=""
case $# in
1) HOST=$1 ;;
2) HOST=$1; C_COMPILER=$2 ;;
3) HOST=$1; C_COMPILER=$2; BRANCH=$3 ;;
- *) echo "Usage: $0 host [c-compiler] [branch]" 1>&2; exit 1 ;;
+ 4) HOST=$1; C_COMPILER=$2; BRANCH=$3; USE_MMC_MAKE=$4 ;;
+ *) echo "Usage: $0 host [c-compiler] [branch] [use_mmc_make]" 1>&2
+ exit 1 ;;
esac
#-----------------------------------------------------------------------------#
@@ -155,7 +158,9 @@
mv -f $tm_dir/logs/$logname.test_errs $tm_dir/logs/old 2>/dev/null
logfile="$tm_dir/logs/$logname.out"
-if nice -5 sh $tmpscript $HOST $ARCH $FULLARCH $BRANCH $C_COMPILER \
+if
+ nice -5 sh $tmpscript \
+ $HOST $ARCH $FULLARCH $BRANCH $C_COMPILER $USE_MMC_MAKE \
> $logfile 2>&1
then
test_status="succeeded"
Index: tools/test_mercury
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/test_mercury,v
retrieving revision 1.321
diff -u -r1.321 test_mercury
--- tools/test_mercury 7 Jul 2007 09:55:03 -0000 1.321
+++ tools/test_mercury 15 Aug 2007 06:51:17 -0000
@@ -11,8 +11,8 @@
echo "test_mercury starting at `date`" 1>&2
case $# in
- 5) HOST=$1; ARCH=$2; FULLARCH=$3; BRANCH=$4; C_COMPILER=$5 ;;
- *) echo "Usage: $0 host arch fullarch branch c_compiler" 1>&2; exit 1 ;;
+ 6) HOST=$1; ARCH=$2; FULLARCH=$3; BRANCH=$4; C_COMPILER=$5; USE_MMC_MAKE=$6 ;;
+ *) echo "Usage: $0 host arch fullarch branch c_compiler use_mmc_make" 1>&2; exit 1 ;;
esac
if [ -d /home/mercury/public/. ]; then
@@ -385,6 +385,10 @@
asm_fast.gc \
asm_fast.gc.tr \
asm_fast.gc.tr.debug"
+ # The erlang grade requires mmc --make.
+ if test "$USE_MMC_MAKE" != ""; then
+ INSTALL_LIBGRADES="$INSTALL_LIBGRADES erlang"
+ fi
;;
saturn)
CONFIG_OPTS="--disable-dotnet-grades"
@@ -663,16 +667,18 @@
esac
export CC
+MMAKE="mmake $USE_MMC_MAKE"
+
autoconf || { false; exit 1; }
rm -f config.cache
./configure --prefix=$INSTALL_DIR $CONFIG_OPTS || { false; exit 1; }
-mmake $target_opts depend $PARALLEL || { false; exit 1; }
-mmake $target_opts realclean MMAKEFLAGS=$PARALLEL || { false; exit 1; }
+$MMAKE $target_opts depend $PARALLEL || { false; exit 1; }
+$MMAKE $target_opts realclean MMAKEFLAGS=$PARALLEL || { false; exit 1; }
./configure --prefix=$INSTALL_DIR $CONFIG_OPTS || { false; exit 1; }
-mmake $target_opts depend $PARALLEL || { false; exit 1; }
-version=`mmake $target_opts version` || { false; exit 1; }
-fullarch=`mmake $target_opts fullarch` || { false; exit 1; }
-tools/bootcheck $use_cp_opt $target_opts \
+$MMAKE $target_opts depend $PARALLEL || { false; exit 1; }
+version=`$MMAKE $target_opts version` || { false; exit 1; }
+fullarch=`$MMAKE $target_opts fullarch` || { false; exit 1; }
+tools/bootcheck $USE_MMC_MAKE $use_cp_opt $target_opts \
--keep-objs --copy-runtime \
--no-test-suite $PARALLEL || $install_anyway || { false; exit 1; }
cd .. || { false; exit 1; }
@@ -719,9 +725,9 @@
# Note that we don't pass $target_opts when doing `mmake install_grades';
# that wouldn't work, since many of the grades can only be built with
# `--target c'.
- mmake $target_opts install_main MMAKEFLAGS=$PARALLEL || \
+ $MMAKE $target_opts install_main MMAKEFLAGS=$PARALLEL || \
set_status "install_main"
- mmake install_grades MMAKEFLAGS=$PARALLEL || \
+ $MMAKE install_grades MMAKEFLAGS=$PARALLEL || \
set_status "install_grades"
case $install_anyway_stage1 in
@@ -759,7 +765,7 @@
PATH="$INSTALL_DIR/bin:$PATH"
-GRADES="`(cd $DIR/mercury && mmake echo_libgrades)`"
+GRADES="`(cd $DIR/mercury && $MMAKE echo_libgrades)`"
#-----------------------------------------------------------------------------#
@@ -774,9 +780,9 @@
# compilation time for `--intermodule-optimization' is probably not
# acceptable for the source distribution.
{ cd $DIR/mercury &&
- mmake realclean MMAKEFLAGS=$PARALLEL &&
+ $MMAKE realclean MMAKEFLAGS=$PARALLEL &&
(cd $DIR/tests &&
- mmake realclean MMAKEFLAGS=$PARALLEL) &&
+ $MMAKE realclean MMAKEFLAGS=$PARALLEL) &&
: > Mmake.params &&
rm -f so_locations &&
autoconf &&
@@ -784,7 +790,7 @@
mercury_cv_bits_per_word=32 \
mercury_cv_unboxed_floats=no \
sh configure --prefix=$INSTALL_DIR &&
- mmake MMAKEFLAGS="EXTRA_MCFLAGS='-O5 --opt-space --cross-compiling' $PARALLEL" tar &&
+ $MMAKE MMAKEFLAGS="EXTRA_MCFLAGS='-O5 --opt-space --cross-compiling' $PARALLEL" tar &&
cd .. &&
rm -f $UNSTABLE/* &&
cp mercury/NEWS $UNSTABLE/mercury-NEWS-$version-unstable.txt &&
@@ -834,7 +840,7 @@
*)
# echo "testing grade $grade, MCFLAGS=$TEST_MCFLAGS" \
# >> $TEST_ERROR_FILE
- mmake GRADE="$grade" \
+ $MMAKE GRADE="$grade" \
EXTRA_MCFLAGS="$TEST_MCFLAGS" \
EXTRA_CFLAGS="$TEST_CFLAGS" \
EXTRA_MGNUCFLAGS="$TEST_MGNUCFLAGS" \
@@ -853,8 +859,8 @@
# for profiling on DEC Alpha
(cd benchmarks &&
touch poly.m &&
- mmake poly.depend &&
- mmake poly \
+ $MMAKE poly.depend &&
+ $MMAKE poly \
GRADE="$grade" \
EXTRA_MCFLAGS="$TEST_MCFLAGS" \
EXTRA_MGNUCFLAGS="$TEST_MGNUCFLAGS" \
@@ -991,7 +997,7 @@
{
cd $DIR/mercury &&
- mmake bindist &&
+ $MMAKE bindist &&
cd .. &&
{ [ -d $UNSTABLE ] || mkdir $UNSTABLE; } &&
rm -f $UNSTABLE/mercury-*.$fullname.tar.gz &&
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list