X-Git-Url: http://nitlanguage.org diff --git a/tests/tests.sh b/tests/tests.sh index 24c99e4..f1daadd 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -216,6 +216,7 @@ function process_result() cat -v >>$xml out/$pattern.res echo >>$xml "]]>" nos="$nos $pattern" + echo "$ii" >> "$ERRLIST" else # no sav but empty res echo "[0k] out/$pattern.res is empty" @@ -237,7 +238,7 @@ need_skip() echo >>$xml "" return 0 fi - if test $engine = niti && echo "$1" | grep -f "exec.skip" >/dev/null 2>&1; then + if test -n "$isinterpret" && echo "$1" | grep -f "exec.skip" >/dev/null 2>&1; then echo "=> $2: [skip exec]" echo >>$xml "" return 0 @@ -292,6 +293,7 @@ while [ $stop = false ]; do esac done enginebinname=$engine +isinterpret= case $engine in nitg) engine=nitg-s; @@ -316,9 +318,15 @@ case $engine in ;; nit) engine=niti + isinterpret=true ;; niti) enginebinname=nit + isinterpret=true + ;; + nitvm) + isinterpret=true + savdirs="sav/niti/" ;; emscripten) enginebinname=nitg @@ -423,7 +431,7 @@ for ii in "$@"; do ffout="$ff.bin.js" fi - if [ "$engine" = "niti" ]; then + if [ -n "$isinterpret" ]; then cat > "./$ff.bin" < "$ff.res" process_result $bf $bf $pack - elif skip_exec "$bf"; then - # No exec - > "$ff.res" - process_result $bf $bf $pack elif [ -n "$nocc" ]; then # not compiled echo -n "nocc " > "$ff.res" process_result $bf $bf $pack elif [ -x "./$ff.bin" ]; then + if skip_exec "$bf"; then + # No exec + > "$ff.res" + process_result $bf $bf $pack + break + fi echo -n ". " # Execute args="" @@ -571,10 +581,11 @@ fi # write $ERRLIST if [ "x$ERRLIST" != "x" ]; then - if [ -x "$ERRLIST_TARGET" ]; then + if [ -f "$ERRLIST_TARGET" ]; then mv "$ERRLIST_TARGET" "${ERRLIST_TARGET}.bak" fi - mv $ERRLIST $ERRLIST_TARGET + uniq $ERRLIST > $ERRLIST_TARGET + rm $ERRLIST fi echo >>$xml ""