summaryrefslogtreecommitdiff
path: root/testsuite/scripts/runtest
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2015-02-18 21:20:28 +0000
committerDamien Doligez <damien.doligez-inria.fr>2015-02-18 21:20:28 +0000
commite3e7a77b6845e7a1253bcf8a0321b1ad63a76b09 (patch)
tree527c6a648dac96b169a5a334172c250e52d71729 /testsuite/scripts/runtest
parent45ca9afb7f6765512450add5c6282c2a705d8e79 (diff)
downloadocaml-e3e7a77b6845e7a1253bcf8a0321b1ad63a76b09.tar.gz
add "make byte" and "make opt" to test only byte-code/native-code
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/new-test-framework@15847 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'testsuite/scripts/runtest')
-rwxr-xr-xtestsuite/scripts/runtest21
1 files changed, 14 insertions, 7 deletions
diff --git a/testsuite/scripts/runtest b/testsuite/scripts/runtest
index 7c2040e7a0..02cdac1889 100755
--- a/testsuite/scripts/runtest
+++ b/testsuite/scripts/runtest
@@ -14,6 +14,13 @@
[ -z "$Tdebug" ] || set -x
+Pwith_byte=true
+Pwith_opt=true
+case $1 in
+ -byteonly) Pwith_opt=false; shift;;
+ -optonly) Pwith_byte=false; shift;;
+esac
+
Pfile=$1
Pdir=$(dirname $1)
base=$(basename $1 .t)
@@ -34,8 +41,6 @@ Pocamlmklib="$Pocamlrun $OTOPDIR/tools/ocamlmklib \
-ocamlopt '$OTOPDIR/boot/ocamlrun$EXE $OTOPDIR/ocamlopt $Pflags'"
if [ "$ARCH" = none -o "$ASM" = none ]; then
Pwith_opt=false
-else
- Pwith_opt=true
fi
if $SUPPORTS_SHARED_LIBRARIES; then
@@ -188,9 +193,10 @@ Pcheck () {
)
}
-Pcheck_opt () {
- case $kind/$Pwith_opt in
- opt/false) false;;
+Pcheck_kind () {
+ case $kind/$Pwith_opt/$Pwith_byte in
+ opt/false/*) false;;
+ byte/*/false) false;;
*) true;;
esac
}
@@ -265,8 +271,9 @@ mkdir -p _tmp
for kind in $kinds; do
Pstart_test
(
- # Skip opt test if configured without native code
- Pcheck_opt || Pskip_test
+ # Skip test if kind=opt and configured without native code
+ # or if user disabled the current kind
+ Pcheck_kind || Pskip_test
# Run user-defined pre-check
${kind}_precheck || Pskip_test
rm -f _tmp/$base{-comp,,-post}.ref{out,err}