--outdir Use a specific output folder (default=out/)
--compdir Use a specific temporary compilation folder (default=.nit_compile)
--node Run as a node in parallel, will not output context information
+--autosav Copy the .res files directly in the sav folder overriding existing .res files
END
}
*) stop=true
esac
done
- if test -n "$TIME"; then
+ if test -d "$1"; then
+ find $1 | sort
+ elif test -n "$TIME"; then
$TIME -o "$o" $a $TIMEOUT "$@"
else
if test -n "$a"; then echo 0 >> "$o"; else echo 0 > "$o"; fi
echo "[*ok*] $outdir/$pattern.res $SAV - but $OLD remains!"
echo >>$xml "<error message='`xmlesc "ok $outdir/$pattern.res - but $OLD remains"`'/>"
remains="$remains $OLD"
+ test "$autosav" = "true" && rm "$OLD"
else
echo "[ok] $outdir/$pattern.res $SAV"
fi
echo "[*fixme*] $outdir/$pattern.res $FIXME - but $OLD remains!"
echo >>$xml "<error message='`xmlesc "ok $outdir/$pattern.res - but $OLD remains"`'/>"
remains="$remains $OLD"
+ test "$autosav" = "true" && rm "$OLD"
else
echo "[fixme] $outdir/$pattern.res $FIXME"
echo >>$xml "<skipped/>"
echo >>$xml "]]></system-out>"
nok="$nok $pattern"
echo "$ii" >> "$ERRLIST"
+ test "$autosav" = "true" && cp "$outdir/$pattern.res" "$SOSO"
elif [ -n "$SOSOF" ]; then
echo "[======= fixme soso $outdir/$pattern.res $SOSOF =======]"
echo >>$xml "<error message='`xmlesc "soso $outdir/$pattern.res $SOSO"`'/>"
echo >>$xml "]]></system-out>"
nok="$nok $pattern"
echo "$ii" >> "$ERRLIST"
+ test "$autosav" = "true" && cp "$outdir/$pattern.res" && "$SOSO"
elif [ -n "$NSAV" ]; then
echo "[======= fail $outdir/$pattern.res $NSAV =======]"
echo >>$xml "<error message='`xmlesc "fail $outdir/$pattern.res $NSAV"`'/>"
echo >>$xml "]]></system-out>"
nok="$nok $pattern"
echo "$ii" >> "$ERRLIST"
+ test "$autosav" = "true" && cp "$outdir/$pattern.res" "$NSAV"
elif [ -n "$NFIXME" ]; then
echo "[======= changed $outdir/$pattern.res $NFIXME ======]"
echo >>$xml "<error message='`xmlesc "changed $outdir/$pattern.res $NFIXME"`'/>"
echo >>$xml "]]></system-out>"
nok="$nok $pattern"
echo "$ii" >> "$ERRLIST"
+ test "$autosav" = "true" && cp "$outdir/$pattern.res" "$NFIXME"
elif [ -s "$outdir/$pattern.res" ]; then
echo "[=== no sav ===] $outdir/$pattern.res is not empty"
echo >>$xml "<error message='no sav and not empty'/>"
echo >>$xml "]]></system-out>"
nos="$nos $pattern"
echo "$ii" >> "$ERRLIST"
+ test "$autosav" = "true" && cp "$outdir/$pattern.res" "sav/"
else
# no sav but empty res
echo "[0k] $outdir/$pattern.res is empty"
verbose=false
isnode=false
+autosav=false
stop=false
engine=nitc
noskip=
--outdir) outdir="$2"; shift; shift;;
--compdir) compdir="$2"; shift; shift;;
--node) isnode=true; shift;;
+ --autosav) autosav=true; shift;;
*) stop=true
esac
done
;;
nitvm)
isinterpret=true
+ enginebinname=nit
+ OPT="--vm $OPT"
savdirs="sav/niti/"
;;
emscripten)