tests: with niti put the options before the program
authorJean Privat <jean@pryen.org>
Tue, 4 Nov 2014 13:39:13 +0000 (08:39 -0500)
committerJean Privat <jean@pryen.org>
Tue, 4 Nov 2014 16:14:12 +0000 (11:14 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/nit.args
tests/tests.sh

index 0c14c1c..8a91562 100644 (file)
@@ -1,4 +1,4 @@
 --log --log-dir out/test_nitc_logs ../examples/hello_world.nit
 base_simple3.nit
 -m test_mixin.nit ../examples/hello_world.nit
-test_define.nit -D text=hello -D num=42 -D flag
+-D text=hello -D num=42 -D flag test_define.nit
index 966dee1..8179c9c 100755 (executable)
@@ -505,7 +505,7 @@ for ii in "$@"; do
 
                if [ -n "$isinterpret" ]; then
                        cat > "$ff.bin" <<END
-exec $NITC --no-color $OPT "$i" $includes -- "\$@"
+exec $NITC --no-color $OPT $includes -- "$i" "\$@"
 END
                        chmod +x "$ff.bin"
                        > "$ff.cmp.err"
@@ -521,10 +521,10 @@ END
                        # Compile
                        if [ "x$verbose" = "xtrue" ]; then
                                echo ""
-                               echo $NITC --no-color $OPT -o "$ffout" "$i" "$includes" $nocc
+                               echo $NITC --no-color $OPT -o "$ffout" "$includes" $nocc "$i"
                        fi
                        NIT_NO_STACK=1 JNI_LIB_PATH=$JNI_LIB_PATH JAVA_HOME=$JAVA_HOME \
-                               saferun -o "$ff.time.out" $NITC --no-color $OPT -o "$ffout" "$i" $includes $nocc 2> "$ff.cmp.err" > "$ff.compile.log"
+                               saferun -o "$ff.time.out" $NITC --no-color $OPT -o "$ffout" $includes $nocc "$i" 2> "$ff.cmp.err" > "$ff.compile.log"
                        ERR=$?
                        if [ "x$verbose" = "xtrue" ]; then
                                cat "$ff.compile.log"