[MLton-commit] r4151
Stephen Weeks
MLton@mlton.org
Fri, 4 Nov 2005 12:48:42 -0800
Added some mingw exceptions and reorganized regression script.
----------------------------------------------------------------------
U mlton/trunk/bin/regression
----------------------------------------------------------------------
Modified: mlton/trunk/bin/regression
===================================================================
--- mlton/trunk/bin/regression 2005-11-04 20:47:54 UTC (rev 4150)
+++ mlton/trunk/bin/regression 2005-11-04 20:48:41 UTC (rev 4151)
@@ -104,100 +104,98 @@
case `host-os` in
mingw)
case "$f" in
- mutex|prodcons|signals2)
+ cmdline|command-line|filesys|mutex|prodcons|signals2)
continue
;;
esac
esac
case "$f" in
serialize)
- echo "skipping $f"
+ continue
;;
+ esac
+ echo "testing $f"
+ case "$f" in
+ exnHistory*)
+ extraFlags="-const 'Exn.keepHistory true'"
+ ;;
*)
- echo "testing $f"
- case "$f" in
- exnHistory*)
- extraFlags="-const 'Exn.keepHistory true'"
+ extraFlags=""
+ ;;
+ esac
+ case "$runOnly" in
+ no)
+ mlb="$f.mlb"
+ echo "\$(SML_LIB)/basis/basis.mlb
+ \$(SML_LIB)/basis/mlton.mlb
+ \$(SML_LIB)/basis/sml-nj.mlb
+ ann
+ \"allowFFI true\"
+ \"allowOverload true\"
+ \"nonexhaustiveMatch ignore\"
+ \"redundantMatch ignore\"
+ in $f.sml
+ end" >$mlb
+ cmd="$mlton $flags $extraFlags -output $f $mlb"
+ eval $cmd
+ rm $mlb
+ if [ "$?" -ne '0' ] ||
+ [ "$cross" = 'no' -a ! -x "$f" ]; then
+ compFail $f
+ fi
+ ;;
+ yes)
+ case $crossTarget in
+ *mingw)
+ libs='-lws2_32 -lkernel32 -lpsapi -lnetapi32'
;;
+ *solaris)
+ libs='-lnsl -lsocket -lrt'
+ ;;
*)
- extraFlags=""
+ libs=''
;;
esac
- case "$runOnly" in
- no)
- mlb="$f.mlb"
- echo "\$(SML_LIB)/basis/basis.mlb
- \$(SML_LIB)/basis/mlton.mlb
- \$(SML_LIB)/basis/sml-nj.mlb
- ann
- \"allowFFI true\"
- \"allowOverload true\"
- \"nonexhaustiveMatch ignore\"
- \"redundantMatch ignore\"
- in $f.sml
- end" >$mlb
- cmd="$mlton $flags $extraFlags -output $f $mlb"
- eval $cmd
- rm $mlb
- if [ "$?" -ne '0' ] ||
- [ "$cross" = 'no' -a ! -x "$f" ]; then
- compFail $f
- fi
+ libs="-lmlton -lgmp $libs -lgdtoa -lm"
+ # Must use $f.[0-9].[cS], not $f.*.[cS], because the
+ # latter will include other files, e.g. for finalize,
+ # it will also include finalize.2.
+ files="$f.[0-9].[cS]"
+ if [ 0 -ne `ls $f.[0-9][0-9].[cS] 2>/dev/null | wc -l` ]; then
+ files="$files $f.[0-9][0-9].[cS]"
+ fi
+ gcc -o $f -w -O1 \
+ -I "../build/lib/include" \
+ -L"../build/lib/$crossTarget" \
+ -L/usr/pkg/lib \
+ -L/usr/local/lib \
+ $files $libs
+ ;;
+ esac
+ if [ ! -r $f.nonterm -a $cross = 'no' -a -x $f ]; then
+ nonZeroMsg='Nonzero exit status.'
+ case $crossTarget in
+ *mingw)
+ nonZeroMsg="$nonZeroMsg"'\r'
;;
- yes)
- case $crossTarget in
- *mingw)
- libs='-lws2_32 -lkernel32 -lpsapi -lnetapi32'
- ;;
- *solaris)
- libs='-lnsl -lsocket -lrt'
- ;;
- *)
- libs=''
- ;;
- esac
- libs="-lmlton -lgmp $libs -lgdtoa -lm"
- # Must use $f.[0-9].[cS], not $f.*.[cS], because the
- # latter will include other files, e.g. for finalize,
- # it will also include finalize.2.
- files="$f.[0-9].[cS]"
- if [ 0 -ne `ls $f.[0-9][0-9].[cS] 2>/dev/null | wc -l` ]; then
- files="$files $f.[0-9][0-9].[cS]"
- fi
- gcc -o $f -w -O1 \
- -I "../build/lib/include" \
- -L"../build/lib/$crossTarget" \
- -L/usr/pkg/lib \
- -L/usr/local/lib \
- $files $libs
- ;;
esac
- if [ ! -r $f.nonterm -a $cross = 'no' -a -x $f ]; then
- nonZeroMsg='Nonzero exit status.'
+ ( ./$f || echo -e "$nonZeroMsg" ) >$tmp 2>&1
+ if [ -r $f.ok ]; then
+ compare="$f.$HOST_ARCH-$HOST_OS.ok"
+ if [ ! -r $compare ]; then
+ compare="$f.ok"
+ fi
case $crossTarget in
*mingw)
- nonZeroMsg="$nonZeroMsg"'\r'
+ compare="$f.sed.ok"
+ sed 's/$/\r/' <"$f.ok" >"$compare"
;;
esac
- ( ./$f || echo -e "$nonZeroMsg" ) >$tmp 2>&1
- if [ -r $f.ok ]; then
- compare="$f.$HOST_ARCH-$HOST_OS.ok"
- if [ ! -r $compare ]; then
- compare="$f.ok"
- fi
- case $crossTarget in
- *mingw)
- compare="$f.sed.ok"
- sed 's/$/\r/' <"$f.ok" >"$compare"
- ;;
- esac
- if ! diff $compare $tmp; then
- echo "difference with $flags"
- fi
+ if ! diff $compare $tmp; then
+ echo "difference with $flags"
fi
fi
- ;;
- esac
+ fi
done
if [ "$cross" = 'yes' -o "$runOnly" = 'yes' -o "$short" = 'yes' ]; then
exit 0