summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2015-02-16 21:56:02 +0000
committerDamien Doligez <damien.doligez-inria.fr>2015-02-16 21:56:02 +0000
commit956128600fb036aa7793c08fbdc7eab901351821 (patch)
treedb3fa65e7bbc89b1125b3111bcf507ac40bfb93a
parent3ff0fd6323c7d88fe1c5f4416f80c7236aa29887 (diff)
downloadocaml-956128600fb036aa7793c08fbdc7eab901351821.tar.gz
more cleanup and simplification; more tests
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/new-test-framework@15844 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--testsuite/Makefile13
-rw-r--r--testsuite/num-tests2
-rwxr-xr-xtestsuite/scripts/cleantest45
-rwxr-xr-x[-rw-r--r--]testsuite/scripts/do_clean (renamed from testsuite/tests/basic-io-2/Makefile)16
-rwxr-xr-xtestsuite/scripts/do_tests4
-rwxr-xr-xtestsuite/scripts/runtest284
-rw-r--r--testsuite/scripts/runtest-doc.txt90
-rw-r--r--testsuite/tests/asmcomp/.ignore2
-rw-r--r--testsuite/tests/asmcomp/Makefile3
-rw-r--r--testsuite/tests/asmcomp/Testcommon.sh17
-rw-r--r--testsuite/tests/asmcomp/arith.t4
-rw-r--r--testsuite/tests/asmcomp/checkbound-1.t (renamed from testsuite/tests/asmcomp/checkbound.t)10
-rw-r--r--testsuite/tests/asmcomp/checkbound-2.t (renamed from testsuite/tests/basic-io/Makefile)16
-rw-r--r--testsuite/tests/asmcomp/fib.t4
-rw-r--r--testsuite/tests/asmcomp/integr.t4
-rw-r--r--testsuite/tests/asmcomp/optargs.t2
-rw-r--r--testsuite/tests/asmcomp/quicksort.t4
-rw-r--r--testsuite/tests/asmcomp/quicksort2.t4
-rw-r--r--testsuite/tests/asmcomp/soli.t2
-rw-r--r--testsuite/tests/asmcomp/staticalloc.t2
-rw-r--r--testsuite/tests/asmcomp/tagged-fib.t4
-rw-r--r--testsuite/tests/asmcomp/tagged-integr.t4
-rw-r--r--testsuite/tests/asmcomp/tagged-quicksort.t4
-rw-r--r--testsuite/tests/asmcomp/tagged-tak.t2
-rw-r--r--testsuite/tests/asmcomp/tak.t2
-rw-r--r--testsuite/tests/backtrace/.ignore3
-rw-r--r--testsuite/tests/backtrace/Testcommon.sh4
-rw-r--r--testsuite/tests/backtrace/backtrace-a.t4
-rw-r--r--testsuite/tests/backtrace/backtrace-b.t6
-rw-r--r--testsuite/tests/backtrace/backtrace-c.t6
-rw-r--r--testsuite/tests/backtrace/backtrace-common.sh4
-rw-r--r--testsuite/tests/backtrace/backtrace-d.t6
-rw-r--r--testsuite/tests/backtrace/backtrace-none.t6
-rw-r--r--testsuite/tests/backtrace/backtrace2.t2
-rw-r--r--testsuite/tests/backtrace/backtrace_deprecated.t2
-rw-r--r--testsuite/tests/backtrace/backtrace_slots.t2
-rw-r--r--testsuite/tests/backtrace/raw_backtrace.t2
-rw-r--r--testsuite/tests/basic-float/.ignore3
-rw-r--r--testsuite/tests/basic-float/tfloat_record.t4
-rw-r--r--testsuite/tests/basic-io-2/.ignore3
-rw-r--r--testsuite/tests/basic-io-2/io.out (renamed from testsuite/tests/basic-io-2/io.reference)0
-rw-r--r--testsuite/tests/basic-io-2/io.t (renamed from testsuite/tests/asmcomp/Testcommon.clean)6
-rw-r--r--testsuite/tests/basic-io/.ignore3
-rw-r--r--testsuite/tests/basic-io/wc.out (renamed from testsuite/tests/basic-io/wc.reference)0
-rw-r--r--testsuite/tests/basic-io/wc.t13
-rw-r--r--testsuite/tests/basic/.ignore2
46 files changed, 387 insertions, 238 deletions
diff --git a/testsuite/Makefile b/testsuite/Makefile
index 2b497780da..e508306b12 100644
--- a/testsuite/Makefile
+++ b/testsuite/Makefile
@@ -92,21 +92,12 @@ ENV = TOPDIR='$(TOPDIR)' \
.PHONY: all
all:
- $(MAKE) clean >/dev/null
+ $(ENV) $(MAKE) clean
$(ENV) ./scripts/do_tests $(dir)
.PHONY: clean
clean:
- find tests -name '*.t' | while read f; do \
- b=$${f%.t}; \
- rm -f $$b.exe $$b.tmp_* $$b-*.tmp_*; \
- ( cd `dirname $$b` && \
- ( rm -f *.cm[aiostx] *.cmx[as] *.cmti *.$(O) *.$(SO) *.$(A); \
- rm -rf *.dSYM ) ); \
- done
- find tests -name '*.clean' | while read f; do \
- (cd `dirname $$f` && . ./`basename $$f`); \
- done
+ scripts/do_clean tests
rm -f _log _full-log
#####
diff --git a/testsuite/num-tests b/testsuite/num-tests
index 900731ffd5..b5489e5e51 100644
--- a/testsuite/num-tests
+++ b/testsuite/num-tests
@@ -1 +1 @@
-64
+69
diff --git a/testsuite/scripts/cleantest b/testsuite/scripts/cleantest
new file mode 100755
index 0000000000..71f1c92c80
--- /dev/null
+++ b/testsuite/scripts/cleantest
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+#########################################################################
+# #
+# OCaml #
+# #
+# Damien Doligez, Jane Street Capital #
+# #
+# Copyright 2015 Institut National de Recherche en Informatique et #
+# en Automatique. All rights reserved. This file is distributed #
+# under the terms of the Q Public License version 1.0. #
+# #
+#########################################################################
+
+Pfile=$1
+Pdir=$(dirname $1)
+base=$(basename $1 .t)
+byte_exec=$base.byt
+opt_exec=$base.exe
+
+ml_files=$base.ml
+
+clean_default () {
+ rm -rf _tmp
+ rm -f $byte_exec $opt_exec
+ for i in $ml_files $mli_files; do
+ rm -f ${i%.ml*}.{cmi,cmo,cmx,o}
+ done
+ for i in $mll_files; do
+ rm -f ${i%.mll}.ml
+ done
+ for i in $mly_files; do
+ rm -f ${i%.mly}.{ml,mli}
+ done
+}
+
+clean () {
+ clean_default
+}
+
+cd "$Pdir"
+
+. ./$base.t
+
+clean
diff --git a/testsuite/tests/basic-io-2/Makefile b/testsuite/scripts/do_clean
index e810916c93..8f7fbc6939 100644..100755
--- a/testsuite/tests/basic-io-2/Makefile
+++ b/testsuite/scripts/do_clean
@@ -1,19 +1,17 @@
+#!/bin/sh
+
#########################################################################
# #
# OCaml #
# #
-# Xavier Clerc, SED, INRIA Rocquencourt #
+# Damien Doligez, Jane Street Capital #
# #
-# Copyright 2010 Institut National de Recherche en Informatique et #
+# Copyright 2014 Institut National de Recherche en Informatique et #
# en Automatique. All rights reserved. This file is distributed #
# under the terms of the Q Public License version 1.0. #
# #
#########################################################################
-BASEDIR=../..
-#MODULES=
-MAIN_MODULE=io
-EXEC_ARGS=io.ml
-
-include $(BASEDIR)/makefiles/Makefile.one
-include $(BASEDIR)/makefiles/Makefile.common
+for d in "$@"; do
+ find "$d" -name '*.t' | xargs -L 1 scripts/cleantest
+done
diff --git a/testsuite/scripts/do_tests b/testsuite/scripts/do_tests
index 27d39a8798..e707449019 100755
--- a/testsuite/scripts/do_tests
+++ b/testsuite/scripts/do_tests
@@ -15,8 +15,8 @@
rm -f _log _full-log
for d in "$@"; do
- find "$d" -name '*.t' | sort \
- | xargs -L 1 scripts/runtest 3>&1 >>_full-log 2>&1 | tee -a _log
+ find "$d" -name '*.t' | LC_ALL=C sort \
+ | xargs -L 1 scripts/runtest 3>&1 >>_full-log 2>&1 | tee -a _log
done
if [ "$1" = "tests" ]; then
diff --git a/testsuite/scripts/runtest b/testsuite/scripts/runtest
index 4f6efd0e3b..58b950e077 100755
--- a/testsuite/scripts/runtest
+++ b/testsuite/scripts/runtest
@@ -14,15 +14,11 @@
[ -z "$Tdebug" ] || set -x
-Pfile="$1"
-Pdir="`dirname $1`"
-Pbase="`basename $1 .t`"
-Pbyte="$Pbase".byt
-Pexec="$Pbase".exe
-
-# todo:
-# 1. make "custom" user-settable
-# 2. transmit the value of "custom" to Trun (if custom, do not use ocamlrun)
+Pfile=$1
+Pdir=$(dirname $1)
+base=$(basename $1 .t)
+byte_exec=$base.byt
+opt_exec=$base.exe
Pocamlrun="$TOPDIR/boot/ocamlrun$EXE"
Pflags="-nostdlib -I $OTOPDIR/stdlib"
@@ -37,175 +33,180 @@ Pocamlmklib="$Pocamlrun $OTOPDIR/tools/ocamlmklib \
-ocamlc '$OTOPDIR/boot/ocamlrun$EXE $OTOPDIR/ocamlc $Pflags' \
-ocamlopt '$OTOPDIR/boot/ocamlrun$EXE $OTOPDIR/ocamlopt $Pflags'"
if [ "$ARCH" = none -o "$ASM" = none ]; then
- Pwith_asm=false
+ Pwith_opt=false
else
- Pwith_asm=true
+ Pwith_opt=true
fi
if $SUPPORTS_SHARED_LIBRARIES; then
- Tcustom=
+ config_custom=false
else
- Tcustom=-custom
+ config_custom=true
fi
-Tml_files="$Pbase.ml"
-Tmli_files=
-Tmll_files=
-Tmly_files=
-
-Ttests="Tbyte_compile_run Topt_compile_run"
-
-Tcompflags=
-Tbyteflags=
-Toptflags=
-Tlexflags=
-Tyaccflags=
-
-Texec_env=
-Targs=
-Texit=0
-
-# Log the command and execute it
-Plog () {
+ml_files="$base.ml"
+mli_files=
+mll_files=
+mly_files=
+
+kinds="byte opt"
+
+compflags=
+byteflags=
+custom=false
+optflags=
+lexflags=-q
+yaccflags=-q
+
+exec_env=
+args=
+exit=0
+compexit=0
+postprocess=false
+postexit=0
+
+# Log the command and execute it, saving the outputs
+launch () {
+ pwd
echo "$*" >&2
- eval "$*"
+ Ptmpexit=0
+ Pstg=${Pstage:+-$Pstage}
+ eval "$*" </dev/null >>_tmp/$base-$kind$Pstg.out \
+ 2>>_tmp/$base-$kind$Pstg.err \
+ || Ptmpexit=$?
+ eval "P${Pstage}exit=$Ptmpexit"
}
-# Same as Plog, but don't fail if the command fails, and save the
-# result code
-Plogr () {
+# Log the command and execute it, leaving the outputs alone
+log () {
echo "$*" >&2
- Pactualexit=0
- eval "$*" || Pactualexit=$?
+ eval "$*"
}
-Tlex_yacc_gen () {
- for f in $Tmll_files; do
- Plog $Plex $Tlexflags $f
+lex_yacc_gen () {
+ for f in $mll_files; do
+ launch $Plex $lexflags $f
done
- for f in $Tmly_files; do
- Plog $Pyacc $Tyaccflags $f
+ for f in $mly_files; do
+ launch $Pyacc $yaccflags $f
done
}
-Tbyte_compile () {
- Tprepare
- Tlex_yacc_gen
- Plog $Pocamlc $Tcompflags $Tcustom $Tbyteflags $Tmli_files $Tml_files \
- -o $Pbyte
+byte_comp () {
+ preprocess
+ lex_yacc_gen
+ if $custom || $config_custom; then
+ custflag=-custom
+ else
+ custflag=
+ fi
+ launch $Pocamlc $compflags $custflag $byteflags $mli_files $ml_files \
+ -o $byte_exec
}
-Topt_compile () {
- Tprepare
- Tlex_yacc_gen
- Plog $Pocamlopt $Tcompflags $Toptflags $Tmli_files $Tml_files -o $Pexec
+opt_comp () {
+ preprocess
+ lex_yacc_gen
+ launch $Pocamlopt $compflags $optflags $mli_files $ml_files -o $opt_exec
}
-Tbyte_print_command_default () {
- if [ -f $Pbase.in ]; then infile=$Pbase.in; else infile=/dev/null; fi
- echo $Texec_env $runtime ./$Pbyte $Targs '<'$infile
+byte_run () {
+ if $custom || $config_custom; then
+ runtime=
+ else
+ runtime=$Pocamlrun
+ fi
+ launch $exec_env $runtime ./$byte_exec $args
}
-Topt_print_command_default () {
- if [ -f $Pbase.in ]; then infile=$Pbase.in; else infile=/dev/null; fi
- echo $Texec_env ./$Pexec $Targs '<'$infile
+opt_run () {
+ launch $exec_env ./$opt_exec $args
}
-Tbyte_run () {
- case $Tcustom in
- -custom) runtime=;;
- *) runtime=$Pocamlrun;;
- esac
- Plog `Tbyte_print_command` '>'$Pbase.tmp_out '2>'$Pbase.tmp_err
+postprocess_out () {
+ cp $1 $1.post
}
-Topt_run () {
- Plog `Topt_print_command` '>'$Pbase.tmp_out '2>'$Pbase.tmp_err
+byte_postprocess_out () {
+ postprocess_out
}
-Tbyte_compile_run () {
- Tbyte_compile
- Tbyte_run
+opt_postprocess_out () {
+ postprocess_out
}
-Topt_compile_run () {
- Topt_compile
- Topt_run
+postprocess_err () {
+ cp $1 $1.post
}
-Tcompare_files_default () {
- ref="$1"
- act="$2"
- if [ ! -f "$ref" ]; then ref=/dev/null; fi
- Tpostprocess "$act" > "${act}_pp"
- Plog cmp "$ref" "${act}_pp"
+opt_postprocess_err () {
+ postprocess_err
}
-Tpostprocess_none () {
- cat "$1"
+opt_postprocess_err () {
+ postprocess_err
}
-Tpostprocess_sort () {
- Plog sort "$1"
+postprocess_sort () {
+ log "sort $1 >$1.post"
}
-Tpostprocess_sort_uniq () {
- Plog sort "$1" '|' uniq
+postprocess_sort_uniq () {
+ log "sort $1 | uniq >$1.post"
}
-Tpostcheck_default () {
- for suff in out err; do
- if [ -f $Pbase.tmp_$suff ]; then
- Tcompare_files $Pbase.$suff $Pbase.tmp_$suff
- fi
- done
- [ "$Pactualexit" -eq "$Texit" ] || {
- printf "ERROR: actual exit code %d is different from expected %d\n" \
- $Pactualexit $Texit
- false
- }
+Pcompare_files () {
+ ref="$1"
+ act="$2"
+ if [ ! -f "$ref" ]; then ref=/dev/null; fi
+ log cmp $ref $act
}
-Tprecheck_default () {
- case $Pwith_asm/$Tcommand in
- false/Topt_*) false;;
+Pcheck () {
+ if $postprocess; then
+ post=.post
+ else
+ post=
+ fi
+ (
+ set -e
+ for suff in -comp.out -comp.err .out$post .err$post; do
+ Pcompare_files $base$suff _tmp/$base-$kind$suff
+ done
+ [ "$Pcompexit" -eq "$compexit" ] || {
+ printf "ERROR: compilation exit code %d is different from expected %d\n" \
+ $Pcompexit $compexit
+ false
+ }
+ [ "$Pexit" -eq "$exit" ] || {
+ printf "ERROR: program exit code %d is different from expected %d\n" \
+ $Pcompexit $compexit
+ false
+ }
+ )
+}
+
+Pcheck_opt () {
+ case $kind/$Pwith_opt in
+ opt/false) false;;
*) true;;
esac
}
-#override me
-Tprepare () {
+preprocess () {
:
}
-# override me
-Tbyte_print_command () {
- Tbyte_print_command_default
-}
-
-# override me
-Topt_print_command () {
- Topt_print_command_default
-}
-
-# override me
-Tcompare_files () {
- Tcompare_files_default "$@"
-}
-
-#override me
-Tpostprocess () {
- Tpostprocess_none "$@"
+precheck () {
+ :
}
-#override me
-Tpostcheck () {
- Tpostcheck_default
+opt_precheck () {
+ precheck
}
-#override me
-Tprecheck () {
- Tprecheck_default
+byte_precheck () {
+ precheck
}
Pexport_variables () {
@@ -216,9 +217,9 @@ Pexport_variables () {
}
Pstart_test () {
- printf "Testing %s with %s..." "$Pfile" "$Tcommand" >&3
+ printf "Testing %-4s %s..." "$kind" "$Pfile" >&3
printf "#################################################"
- printf "\nTesting %s with %s...\n" "$Pfile" "$Tcommand"
+ printf "\nTesting %-4s %s...\n" "$kind" "$Pfile"
}
Pskip_test () {
@@ -230,7 +231,6 @@ Pskip_test () {
Pfail_test () {
printf "FAIL\n" >&3
printf "FAIL\n\n"
- exit 0
}
Ppass_test () {
@@ -241,9 +241,14 @@ Ppass_test () {
cd "$Pdir"
######################################################
-. $Pbase.t
+# read the user's definitions
+
+. ./$base.t
+
######################################################
+Pexport_variables
+mkdir -p _tmp
for kind in $kinds; do
Pstart_test
(
@@ -251,23 +256,18 @@ for kind in $kinds; do
Pcheck_opt || Pskip_test
# Run user-defined pre-check
${kind}_precheck || Pskip_test
- rm -f _tmp/"$base".*
- Pcompexit=0
- Prunexit=0
- Ppostexit=0
+ rm -f _tmp/$base{-comp,,-post}.{out,err}
(
- # compile
- Pcompexit=0
- ${kind}_comp >_tmp/$base-comp.out 2>_tmp/$base-comp.err \
- || Pcompexit=$?
- # run
- ${kind}_run >_tmp/$base.out 2>_tmp/$base.err || Prunexit=$?
+ Pstage=comp
+ ${kind}_comp
+ Pstage=
+ ${kind}_run
if $postprocess; then
- # post-process
- ${kind}_post >_tmp/$base-post.out 2>_tmp/$base-post.err \
- || Ppostexit=$?
+ Pstage=post
+ (cd _tmp; ${kind}_postprocess_out $base-$kind.out)
+ (cd _tmp; ${kind}_postprocess_err $base-$kind.err)
fi
- Ppostcheck
+ Pcheck
)
case $? in
0) Ppass_test;;
diff --git a/testsuite/scripts/runtest-doc.txt b/testsuite/scripts/runtest-doc.txt
new file mode 100644
index 0000000000..2111c95965
--- /dev/null
+++ b/testsuite/scripts/runtest-doc.txt
@@ -0,0 +1,90 @@
+Each *.t file describes a (fixed) number of tests, usually either one
+or two (byte-code and/or native).
+
+The list of tests is defined in variable $kinds (by default 'byte opt')
+
+Each test is composed of 5 phases:
+1. preliminary check
+ -> functions {byte,opt}_precheck (by default, they call precheck,
+ which just returns 0 (i.e. true).
+ if this funtion returns true, the test will be run, otherwise it
+ will be skipped.
+
+ 2. compilation
+ -> functions {byte,opt}_comp. By default, they compile the files
+ listed in $ml_files, $mli_files, $mll_files, $mly_files. By
+ default, all are empty except $ml_files, which contains only
+ $base.ml (where $base.t is the current test file).
+ For compiler flags, they use the variables:
+ $compflags (for both compilers)
+ $byteflags (for byte-code compilation)
+ $optflags (for native-code compilation)
+ $lexflags [default "-q"] (for ocamllex)
+ $yaccflags [default "-q"] (for ocamlyacc)
+ $config_custom (false if shared libs are available, true otherwise)
+ $custom [default false]: compile in custom mode
+
+ Before starting to compile, the default functions run the function
+ preprocess (by default, does nothing).
+
+ Compilation is done in custom mode if $config_custom or $custom is
+ true, and in that case the byte-code executable is run without
+ explicitly launching the bytecode interpreter.
+
+3. run
+ -> functions {byte,opt}_run. By default, they run $base.{byt,opt},
+ redirecting stdin, stdout and stderr, and recording the exit code.
+ For byte-code, this runs the bytecode interpreter iff $custom or
+ $config_custom is true.
+ If you override these functions, use the launch function (with the
+ command line as arguments) to launch the program with the correct
+ redirections.
+ This will prepend $exec_env and append $args to the command line
+ (default empty) so you can set some environment variables before
+ the program is run, and run it with some arguments.
+
+4. post-process
+ -> this is done only if $postprocess=true (by default, false).
+ functions {byte,opt}_postprocess_{out,err}. By default, they run
+ postprocess_{out,err}, which simply copy $base.out to
+ $base-post.out and $base.err to $base-post.err.
+ The postprocessing functions are run in the directory of the output
+ files.
+
+5. checking
+ This is done by comparing the stdout and stderr of each stage with
+ the ones given in the following files:
+ $base-comp.{out,err}: concatenated outputs of the compilation
+ commands.
+ $base.{out,err}: output of the run command, only checked if
+ $postprocess is false
+ $base-post.{out,err}: output of the post-process command, only
+ checked if $postprocess is true
+ The exit codes are also checked, against the variables:
+ $compexit: exit code of the last compilation command
+ $exit: exit code of the program under test
+ $postexit: exit code of the post-processing for the stderr.
+
+6. cleaning
+ The .t file may redefine the function "clean" (by default, calls
+ clean_default) to remove compilation and temporary file. The
+ "clean_default" function remove the compilation files that
+ correspond to the $ml_files, $mli_files, $mll_files, $mly_files
+ variables, the _tmp directory, and the default byte-code and
+ executable files.
+
+Examples
+
+If you want to compile foo.ml, run the result, and make sure the
+stdout and stderr are empty and the result code is 0, just add an
+empty foo.t file.
+
+If your program is composed of several source files, just put
+ ml_files="a.ml b.ml c.ml"
+in your .t file.
+
+If your program has a lexer and parser, you'd write:
+mll_files=lexer.mll
+mly_files=parser.mly
+mli_files=parser.mli lexer.mli others.mli
+ml_files=parser.ml lexer.ml others.ml
diff --git a/testsuite/tests/asmcomp/.ignore b/testsuite/tests/asmcomp/.ignore
index a6e4efa41d..0c9484bb7e 100644
--- a/testsuite/tests/asmcomp/.ignore
+++ b/testsuite/tests/asmcomp/.ignore
@@ -5,4 +5,4 @@ lexcmm.ml
*.s
*.out
*.out.dSYM
-*.tmp_*
+_tmp
diff --git a/testsuite/tests/asmcomp/Makefile b/testsuite/tests/asmcomp/Makefile
index e47540e19d..f234b6c11d 100644
--- a/testsuite/tests/asmcomp/Makefile
+++ b/testsuite/tests/asmcomp/Makefile
@@ -47,3 +47,6 @@ power.o: power-$(SYSTEM).o
cp power-$(SYSTEM).o power.o
arch: $(ARCH).o
+
+clean:
+ rm -f ./codegen parsecmm.ml parsecmm.mli lexcmm.ml
diff --git a/testsuite/tests/asmcomp/Testcommon.sh b/testsuite/tests/asmcomp/Testcommon.sh
index 8f595116b4..38ba4ea2a1 100644
--- a/testsuite/tests/asmcomp/Testcommon.sh
+++ b/testsuite/tests/asmcomp/Testcommon.sh
@@ -10,9 +10,16 @@
# #
#########################################################################
-Topt_compile () {
- Pexport_variables
- $MAKE all $Pbase.o
- $NATIVECC -o $Pbase.exe $cflags $Pbase.o $ARCH.o
+kinds=opt
+
+cbase=$base
+opt_comp () {
+ log $MAKE all $cbase.o
+ log $NATIVECC -o $opt_exec $cflags $cbase.o $ARCH.o
+ launch :
+}
+
+clean () {
+ clean_default
+ "$MAKE" clean
}
-Ttests=Topt_compile_run
diff --git a/testsuite/tests/asmcomp/arith.t b/testsuite/tests/asmcomp/arith.t
index ba847bdf98..4c40574b88 100644
--- a/testsuite/tests/asmcomp/arith.t
+++ b/testsuite/tests/asmcomp/arith.t
@@ -10,7 +10,7 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
cflags="mainarith.c"
-Targs="1 100 3.14159 2.71828"
+args="1 100 3.14159 2.71828"
diff --git a/testsuite/tests/asmcomp/checkbound.t b/testsuite/tests/asmcomp/checkbound-1.t
index 8f3f6f20c4..492b27fb8d 100644
--- a/testsuite/tests/asmcomp/checkbound.t
+++ b/testsuite/tests/asmcomp/checkbound-1.t
@@ -10,11 +10,7 @@
# #
#########################################################################
-. Testcommon.sh
-
+. ./Testcommon.sh
+cbase=checkbound
cflags="-DCHECKBOUND main.c"
-Ttests=Topt_compile; Tmultiple Topt_run 1 2
-Targs_1="500 1000"
-Texit_1=0
-Targs_2="1200 1000"
-Texit_2=2
+args="500 1000"
diff --git a/testsuite/tests/basic-io/Makefile b/testsuite/tests/asmcomp/checkbound-2.t
index 3f9c10ed9f..f8848ba681 100644
--- a/testsuite/tests/basic-io/Makefile
+++ b/testsuite/tests/asmcomp/checkbound-2.t
@@ -2,18 +2,16 @@
# #
# OCaml #
# #
-# Xavier Clerc, SED, INRIA Rocquencourt #
+# Damien Doligez, Jane Street Capital #
# #
-# Copyright 2010 Institut National de Recherche en Informatique et #
+# Copyright 2015 Institut National de Recherche en Informatique et #
# en Automatique. All rights reserved. This file is distributed #
# under the terms of the Q Public License version 1.0. #
# #
#########################################################################
-BASEDIR=../..
-#MODULES=
-MAIN_MODULE=wc
-EXEC_ARGS=wc.ml
-
-include $(BASEDIR)/makefiles/Makefile.one
-include $(BASEDIR)/makefiles/Makefile.common
+. ./Testcommon.sh
+cbase=checkbound
+cflags="-DCHECKBOUND main.c"
+args="1200 1000"
+exit=2
diff --git a/testsuite/tests/asmcomp/fib.t b/testsuite/tests/asmcomp/fib.t
index 6d84a0b5ad..c1244d1e65 100644
--- a/testsuite/tests/asmcomp/fib.t
+++ b/testsuite/tests/asmcomp/fib.t
@@ -10,7 +10,7 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
cflags="-DINT_INT -DFUN=fib main.c"
-Targs=15
+args=15
diff --git a/testsuite/tests/asmcomp/integr.t b/testsuite/tests/asmcomp/integr.t
index 493576c9f8..3a0844c2b5 100644
--- a/testsuite/tests/asmcomp/integr.t
+++ b/testsuite/tests/asmcomp/integr.t
@@ -10,7 +10,7 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
cflags="-DINT_FLOAT -DFUN=test main.c"
-Targs=1000000
+args=1000000
diff --git a/testsuite/tests/asmcomp/optargs.t b/testsuite/tests/asmcomp/optargs.t
index f6886a74cb..9239273778 100644
--- a/testsuite/tests/asmcomp/optargs.t
+++ b/testsuite/tests/asmcomp/optargs.t
@@ -10,4 +10,4 @@
# #
#########################################################################
-Ttests=Topt_compile_run
+kinds=opt
diff --git a/testsuite/tests/asmcomp/quicksort.t b/testsuite/tests/asmcomp/quicksort.t
index 48bb429f3d..b18cd7b215 100644
--- a/testsuite/tests/asmcomp/quicksort.t
+++ b/testsuite/tests/asmcomp/quicksort.t
@@ -10,7 +10,7 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
cflags="-DSORT -DFUN=quicksort main.c"
-Targs=1000000
+args=1000000
diff --git a/testsuite/tests/asmcomp/quicksort2.t b/testsuite/tests/asmcomp/quicksort2.t
index 48bb429f3d..b18cd7b215 100644
--- a/testsuite/tests/asmcomp/quicksort2.t
+++ b/testsuite/tests/asmcomp/quicksort2.t
@@ -10,7 +10,7 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
cflags="-DSORT -DFUN=quicksort main.c"
-Targs=1000000
+args=1000000
diff --git a/testsuite/tests/asmcomp/soli.t b/testsuite/tests/asmcomp/soli.t
index e7644f3a63..feacef6c1e 100644
--- a/testsuite/tests/asmcomp/soli.t
+++ b/testsuite/tests/asmcomp/soli.t
@@ -10,6 +10,6 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
cflags="-DUNIT_INT -DFUN=solitaire main.c"
diff --git a/testsuite/tests/asmcomp/staticalloc.t b/testsuite/tests/asmcomp/staticalloc.t
index f6886a74cb..9239273778 100644
--- a/testsuite/tests/asmcomp/staticalloc.t
+++ b/testsuite/tests/asmcomp/staticalloc.t
@@ -10,4 +10,4 @@
# #
#########################################################################
-Ttests=Topt_compile_run
+kinds=opt
diff --git a/testsuite/tests/asmcomp/tagged-fib.t b/testsuite/tests/asmcomp/tagged-fib.t
index 778e03068d..9df1d66a06 100644
--- a/testsuite/tests/asmcomp/tagged-fib.t
+++ b/testsuite/tests/asmcomp/tagged-fib.t
@@ -10,7 +10,7 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
cflags="-DINT_INT -DFUN=fib main.c"
-Targs=31
+args=31
diff --git a/testsuite/tests/asmcomp/tagged-integr.t b/testsuite/tests/asmcomp/tagged-integr.t
index 493576c9f8..3a0844c2b5 100644
--- a/testsuite/tests/asmcomp/tagged-integr.t
+++ b/testsuite/tests/asmcomp/tagged-integr.t
@@ -10,7 +10,7 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
cflags="-DINT_FLOAT -DFUN=test main.c"
-Targs=1000000
+args=1000000
diff --git a/testsuite/tests/asmcomp/tagged-quicksort.t b/testsuite/tests/asmcomp/tagged-quicksort.t
index 48bb429f3d..b18cd7b215 100644
--- a/testsuite/tests/asmcomp/tagged-quicksort.t
+++ b/testsuite/tests/asmcomp/tagged-quicksort.t
@@ -10,7 +10,7 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
cflags="-DSORT -DFUN=quicksort main.c"
-Targs=1000000
+args=1000000
diff --git a/testsuite/tests/asmcomp/tagged-tak.t b/testsuite/tests/asmcomp/tagged-tak.t
index 898e7e4aca..a46d1f399e 100644
--- a/testsuite/tests/asmcomp/tagged-tak.t
+++ b/testsuite/tests/asmcomp/tagged-tak.t
@@ -10,6 +10,6 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
cflags="-DUNIT_INT -DFUN=takmain main.c"
diff --git a/testsuite/tests/asmcomp/tak.t b/testsuite/tests/asmcomp/tak.t
index 898e7e4aca..a46d1f399e 100644
--- a/testsuite/tests/asmcomp/tak.t
+++ b/testsuite/tests/asmcomp/tak.t
@@ -10,6 +10,6 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
cflags="-DUNIT_INT -DFUN=takmain main.c"
diff --git a/testsuite/tests/backtrace/.ignore b/testsuite/tests/backtrace/.ignore
index 1c119b608d..6ee5d64f87 100644
--- a/testsuite/tests/backtrace/.ignore
+++ b/testsuite/tests/backtrace/.ignore
@@ -1,2 +1,3 @@
-*.tmp_*
+_tmp
*.byt
+*.exe
diff --git a/testsuite/tests/backtrace/Testcommon.sh b/testsuite/tests/backtrace/Testcommon.sh
index bd22780660..9631946628 100644
--- a/testsuite/tests/backtrace/Testcommon.sh
+++ b/testsuite/tests/backtrace/Testcommon.sh
@@ -10,5 +10,5 @@
# #
#########################################################################
-Tcompflags=-g
-Texec_env=OCAMLRUNPARAM=b=1
+compflags=-g
+exec_env=OCAMLRUNPARAM=b=1
diff --git a/testsuite/tests/backtrace/backtrace-a.t b/testsuite/tests/backtrace/backtrace-a.t
index 75cc6ee304..16cd34cbf4 100644
--- a/testsuite/tests/backtrace/backtrace-a.t
+++ b/testsuite/tests/backtrace/backtrace-a.t
@@ -10,5 +10,5 @@
# #
#########################################################################
-. backtrace-common.sh
-Targs=a
+. ./backtrace-common.sh
+args=a
diff --git a/testsuite/tests/backtrace/backtrace-b.t b/testsuite/tests/backtrace/backtrace-b.t
index b59848a786..a6a55e560d 100644
--- a/testsuite/tests/backtrace/backtrace-b.t
+++ b/testsuite/tests/backtrace/backtrace-b.t
@@ -10,6 +10,6 @@
# #
#########################################################################
-. backtrace-common.sh
-Targs=b
-Texit=2
+. ./backtrace-common.sh
+args=b
+exit=2
diff --git a/testsuite/tests/backtrace/backtrace-c.t b/testsuite/tests/backtrace/backtrace-c.t
index b76a25f45f..f5efa275c1 100644
--- a/testsuite/tests/backtrace/backtrace-c.t
+++ b/testsuite/tests/backtrace/backtrace-c.t
@@ -10,6 +10,6 @@
# #
#########################################################################
-. backtrace-common.sh
-Targs=c
-Texit=2
+. ./backtrace-common.sh
+args=c
+exit=2
diff --git a/testsuite/tests/backtrace/backtrace-common.sh b/testsuite/tests/backtrace/backtrace-common.sh
index 17b18b8ecf..daddec0ec5 100644
--- a/testsuite/tests/backtrace/backtrace-common.sh
+++ b/testsuite/tests/backtrace/backtrace-common.sh
@@ -11,5 +11,5 @@
#########################################################################
. Testcommon.sh
-Tml_files=backtrace.ml
-Ttests='Tbyte_compile_run Topt_compile_run'
+ml_files=backtrace.ml
+kinds='byte opt'
diff --git a/testsuite/tests/backtrace/backtrace-d.t b/testsuite/tests/backtrace/backtrace-d.t
index fb534e449f..8bd81cd21b 100644
--- a/testsuite/tests/backtrace/backtrace-d.t
+++ b/testsuite/tests/backtrace/backtrace-d.t
@@ -10,6 +10,6 @@
# #
#########################################################################
-. backtrace-common.sh
-Targs=d
-Texit=2
+. ./backtrace-common.sh
+args=d
+exit=2
diff --git a/testsuite/tests/backtrace/backtrace-none.t b/testsuite/tests/backtrace/backtrace-none.t
index 4b37bb02bd..2e60d23434 100644
--- a/testsuite/tests/backtrace/backtrace-none.t
+++ b/testsuite/tests/backtrace/backtrace-none.t
@@ -10,6 +10,6 @@
# #
#########################################################################
-. backtrace-common.sh
-Targs=
-Texit=2
+. ./backtrace-common.sh
+args=
+exit=2
diff --git a/testsuite/tests/backtrace/backtrace2.t b/testsuite/tests/backtrace/backtrace2.t
index 4231d077d0..33610b956e 100644
--- a/testsuite/tests/backtrace/backtrace2.t
+++ b/testsuite/tests/backtrace/backtrace2.t
@@ -10,4 +10,4 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
diff --git a/testsuite/tests/backtrace/backtrace_deprecated.t b/testsuite/tests/backtrace/backtrace_deprecated.t
index 4231d077d0..33610b956e 100644
--- a/testsuite/tests/backtrace/backtrace_deprecated.t
+++ b/testsuite/tests/backtrace/backtrace_deprecated.t
@@ -10,4 +10,4 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
diff --git a/testsuite/tests/backtrace/backtrace_slots.t b/testsuite/tests/backtrace/backtrace_slots.t
index 4231d077d0..33610b956e 100644
--- a/testsuite/tests/backtrace/backtrace_slots.t
+++ b/testsuite/tests/backtrace/backtrace_slots.t
@@ -10,4 +10,4 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
diff --git a/testsuite/tests/backtrace/raw_backtrace.t b/testsuite/tests/backtrace/raw_backtrace.t
index 4231d077d0..33610b956e 100644
--- a/testsuite/tests/backtrace/raw_backtrace.t
+++ b/testsuite/tests/backtrace/raw_backtrace.t
@@ -10,4 +10,4 @@
# #
#########################################################################
-. Testcommon.sh
+. ./Testcommon.sh
diff --git a/testsuite/tests/basic-float/.ignore b/testsuite/tests/basic-float/.ignore
index 1c119b608d..6ee5d64f87 100644
--- a/testsuite/tests/basic-float/.ignore
+++ b/testsuite/tests/basic-float/.ignore
@@ -1,2 +1,3 @@
-*.tmp_*
+_tmp
*.byt
+*.exe
diff --git a/testsuite/tests/basic-float/tfloat_record.t b/testsuite/tests/basic-float/tfloat_record.t
index c8b881850d..bb3cdbc174 100644
--- a/testsuite/tests/basic-float/tfloat_record.t
+++ b/testsuite/tests/basic-float/tfloat_record.t
@@ -10,5 +10,5 @@
# #
#########################################################################
-Tml_files="float_record.ml tfloat_record.ml"
-Tmli_files=float_record.mli
+ml_files="float_record.ml tfloat_record.ml"
+mli_files=float_record.mli
diff --git a/testsuite/tests/basic-io-2/.ignore b/testsuite/tests/basic-io-2/.ignore
new file mode 100644
index 0000000000..6ee5d64f87
--- /dev/null
+++ b/testsuite/tests/basic-io-2/.ignore
@@ -0,0 +1,3 @@
+_tmp
+*.byt
+*.exe
diff --git a/testsuite/tests/basic-io-2/io.reference b/testsuite/tests/basic-io-2/io.out
index 06740020a7..06740020a7 100644
--- a/testsuite/tests/basic-io-2/io.reference
+++ b/testsuite/tests/basic-io-2/io.out
diff --git a/testsuite/tests/asmcomp/Testcommon.clean b/testsuite/tests/basic-io-2/io.t
index 05580057e2..53a3063461 100644
--- a/testsuite/tests/asmcomp/Testcommon.clean
+++ b/testsuite/tests/basic-io-2/io.t
@@ -2,12 +2,12 @@
# #
# OCaml #
# #
-# Xavier Clerc, SED, INRIA Rocquencourt #
+# Damien Doligez, Jane Street Capital #
# #
-# Copyright 2010 Institut National de Recherche en Informatique et #
+# Copyright 2015 Institut National de Recherche en Informatique et #
# en Automatique. All rights reserved. This file is distributed #
# under the terms of the Q Public License version 1.0. #
# #
#########################################################################
-rm -f ./codegen parsecmm.ml parsecmm.mli lexcmm.ml
+args=io.ml
diff --git a/testsuite/tests/basic-io/.ignore b/testsuite/tests/basic-io/.ignore
new file mode 100644
index 0000000000..6ee5d64f87
--- /dev/null
+++ b/testsuite/tests/basic-io/.ignore
@@ -0,0 +1,3 @@
+_tmp
+*.byt
+*.exe
diff --git a/testsuite/tests/basic-io/wc.reference b/testsuite/tests/basic-io/wc.out
index adaaa750b4..adaaa750b4 100644
--- a/testsuite/tests/basic-io/wc.reference
+++ b/testsuite/tests/basic-io/wc.out
diff --git a/testsuite/tests/basic-io/wc.t b/testsuite/tests/basic-io/wc.t
new file mode 100644
index 0000000000..44fbb550d9
--- /dev/null
+++ b/testsuite/tests/basic-io/wc.t
@@ -0,0 +1,13 @@
+#########################################################################
+# #
+# OCaml #
+# #
+# Damien Doligez, Jane Street Capital #
+# #
+# Copyright 2015 Institut National de Recherche en Informatique et #
+# en Automatique. All rights reserved. This file is distributed #
+# under the terms of the Q Public License version 1.0. #
+# #
+#########################################################################
+
+args=wc.ml
diff --git a/testsuite/tests/basic/.ignore b/testsuite/tests/basic/.ignore
index ee64803c26..63edb1c92e 100644
--- a/testsuite/tests/basic/.ignore
+++ b/testsuite/tests/basic/.ignore
@@ -1,3 +1,3 @@
-*.tmp_*
+_tmp
*.exe
*.byt