tests.sh: distinguish the generated file from the executed file
authorJean Privat <jean@pryen.org>
Wed, 18 Jun 2014 16:42:05 +0000 (12:42 -0400)
committerJean Privat <jean@pryen.org>
Thu, 19 Jun 2014 01:27:49 +0000 (21:27 -0400)
Some some future engines that does not produce directly executable files
could still use the tests.sh framework.

Signed-off-by: Jean Privat <jean@pryen.org>

tests/tests.sh

index b8ecd0a..8e2c65f 100755 (executable)
@@ -409,6 +409,8 @@ for ii in "$@"; do
                        inputs=/dev/null
                fi
 
+               ffout="$ff.bin"
+
                if [ "$engine" = "niti" ]; then
                        cat > "./$ff.bin" <<END
 exec $NITC --no-color $OPT "$i" $includes -- "\$@"
@@ -426,10 +428,10 @@ END
                        # Compile
                        if [ "x$verbose" = "xtrue" ]; then
                                echo ""
-                               echo $NITC --no-color $OPT -o "$ff.bin" "$i" "$includes" $nocc
+                               echo $NITC --no-color $OPT -o "$ffout" "$i" "$includes" $nocc
                        fi
                        NIT_NO_STACK=1 JNI_LIB_PATH=$JNI_LIB_PATH JAVA_HOME=$JAVA_HOME \
-                               $TIMEOUT $NITC --no-color $OPT -o "$ff.bin" "$i" $includes $nocc 2> "$ff.cmp.err" > "$ff.compile.log"
+                               $TIMEOUT $NITC --no-color $OPT -o "$ffout" "$i" $includes $nocc 2> "$ff.cmp.err" > "$ff.compile.log"
                        ERR=$?
                        if [ "x$verbose" = "xtrue" ]; then
                                cat "$ff.compile.log"