summaryrefslogtreecommitdiff
path: root/testsuite/scripts
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2015-10-07 14:52:04 +0000
committerDamien Doligez <damien.doligez-inria.fr>2015-10-07 14:52:04 +0000
commit81dc79fed556278aa28fcb4006a353b132d664b3 (patch)
treeaf3e55513071ea93d2441e5930cea51c68e707a5 /testsuite/scripts
parent3c5f831a268939e0c63eb529e9910e47c2313a64 (diff)
parentdd90f1b9c5cd4d33b99857d4faf802e265570299 (diff)
downloadocaml-new-test-framework.tar.gz
last commit in this branchnew-test-framework
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/new-test-framework@16464 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'testsuite/scripts')
-rwxr-xr-xtestsuite/scripts/runtest43
1 files changed, 25 insertions, 18 deletions
diff --git a/testsuite/scripts/runtest b/testsuite/scripts/runtest
index 4c6f25b71d..61dc5cb37f 100755
--- a/testsuite/scripts/runtest
+++ b/testsuite/scripts/runtest
@@ -46,10 +46,12 @@ if [ "$ARCH" = none -o "$ASM" = none ]; then
Pwith_opt=false
fi
+# Pcustomflag is set to "-custom" (at several places in this file)
+# as soon as a custom runtime is needed.
if $SUPPORTS_SHARED_LIBRARIES; then
- config_custom=false
+ Pcustomflag=
else
- config_custom=true
+ Pcustomflag=-custom
fi
sources="$base.ml"
@@ -64,6 +66,7 @@ lexflags=-q
yaccflags=-q
topflags=
cflags=
+fortranflags=
exec_env=
args=
@@ -105,24 +108,32 @@ precompile () {
Pocamlfiles=
for f in $sources; do
case $f in
- *.ml|*.mli)
- Pocamlfiles="$Pocamlfiles $f";;
+ *.ml|*.mli) Pocamlfiles="$Pocamlfiles $f";;
*.mly)
launch $Pyacc $yaccflags $f
- Pocamlfiles="$Pocamlfiles ${f%.mly}.mli ${f%.mly}.ml";;
+ Pocamlfiles="$Pocamlfiles ${f%.mly}.mli ${f%.mly}.ml"
+ ;;
*.mll)
launch $Plex $lexflags $f
- Pocamlfiles="$Pocamlfiles ${f%.mll}.ml";;
+ Pocamlfiles="$Pocamlfiles ${f%.mll}.ml"
+ ;;
*.c)
launch $NATIVECC $NATIVECCCOMPOPTS $cflags \
-I $CTOPDIR/byterun -c $f
Pcustomflag=-custom
- Pocamlfiles="$Pocamlfiles ${f%.c}.$O";;
+ Pocamlfiles="$Pocamlfiles ${f%.c}.$O"
+ ;;
+ *.f)
+ launch $FORTRAN_COMPILER $fortranflags -c $f
+ Pcustomflag=-custom
+ Pocamlfiles="$Pocamlfiles ${f%.f}.$O"
+ ;;
*.cmo) Pocamlfiles="$Pocamlfiles ${f%.cmo}.$cmoext";;
*.cma) Pocamlfiles="$Pocamlfiles ${f%.cma}.$cmaext";;
*.$O)
Pcustomflag=-custom
- Pocamlfiles="$Pocamlfiles $f";;
+ Pocamlfiles="$Pocamlfiles $f"
+ ;;
*) error "unexpected source file extension: $f";;
esac
done
@@ -137,16 +148,17 @@ opt_comp () {
byte_comp () {
preprocess
precompile cmo cma
+ if $custom; then Pcustomflag=-custom; fi
launch $Pocamlc $compflags $Pcustomflag $byteflags $Pocamlfiles \
-o $byte_exec
}
top_comp () {
- launch : no compilation
+ launch : no compilation step needed
}
top_principal_comp () {
- launch : no compilation
+ launch : no compilation step needed
}
opt_run () {
@@ -228,7 +240,9 @@ preprocess () {
}
precheck () {
- :
+ case "$sources " in
+ *'.f '*) test -n "$FORTRAN_COMPILER";;
+ esac
}
opt_precheck () {
@@ -280,13 +294,6 @@ cd "$Pdir"
. ./$base.t
-# compute whether to use a custom runtime
-if $custom || ! $SUPPORTS_SHARED_LIBRARIES; then
- Pcustomflag=-custom
-else
- Pcustomflag=
-fi
-
######################################################
Pexport_variables