summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
033c793)
Signed-off-by: Jean Privat <jean@pryen.org>
tests/errlist
tests/test_nitc_logs
tests/hello_world
tests/errlist
tests/test_nitc_logs
tests/hello_world
./store_save.sh *.nit
clean:
./store_save.sh *.nit
clean:
- rm -r -f -- *.bin *.res *.write *.err *.log alt .nit_compile errlist 2> /dev/null || true
+ rm -r -f -- out/ alt .nit_compile errlist 2> /dev/null || true
-../lib/*.nit -d nitdoc_args1.write
+../lib/*.nit -d out/nitdoc_args1.write
# See the License for the specific language governing permissions and
# limitations under the License.
# See the License for the specific language governing permissions and
# limitations under the License.
-"test_directory_create.write/tmp_dir".mkdir
-var f = new OFStream.open("test_directory_create.write/tmp_file")
+"out/test_directory_create.write/tmp_dir".mkdir
+var f = new OFStream.open("out/test_directory_create.write/tmp_file")
-f = new OFStream.open("test_directory_create.write/tmp_dir/tmp_file_2")
+f = new OFStream.open("out/test_directory_create.write/tmp_dir/tmp_file_2")
f.write("other test")
f.close
f.write("other test")
f.close
# See the License for the specific language governing permissions and
# limitations under the License.
# See the License for the specific language governing permissions and
# limitations under the License.
-var f = new OFStream.open("test_file_write.write")
+var f = new OFStream.open("out/test_file_write.write")
f.write("Quatre vingt et un : {421}\n")
f.write("Une autre ligne\nencore un")
f.write(['e', '\n'].to_s)
f.write("Quatre vingt et un : {421}\n")
f.write("Une autre ligne\nencore un")
f.write(['e', '\n'].to_s)
-var filename_1 = "test_filterstream_tmp1.write"
-var filename_2 = "test_filterstream_tmp2.write"
+var filename_1 = "out/test_filterstream_tmp1.write"
+var filename_2 = "out/test_filterstream_tmp2.write"
var output_file_1 = new OFStream.open(filename_1)
var output_file_2 = new OFStream.open(filename_2)
var output_file_1 = new OFStream.open(filename_1)
var output_file_2 = new OFStream.open(filename_2)
SAV=""
FAIL=""
if [ -r "sav/$pattern.sav" ]; then
SAV=""
FAIL=""
if [ -r "sav/$pattern.sav" ]; then
- diff -u "$pattern.res" "sav/$pattern.sav" > "$pattern.diff.sav.log"
+ diff -u "out/$pattern.res" "sav/$pattern.sav" > "out/$pattern.diff.sav.log"
if [ "$?" == 0 ]; then
SAV=OK
else
if [ "$?" == 0 ]; then
SAV=OK
else
fi
fi
if [ -r "sav/$pattern.fail" ]; then
fi
fi
if [ -r "sav/$pattern.fail" ]; then
- diff -u "$pattern.res" "sav/$pattern.fail" > "$pattern.diff.fail.log"
+ diff -u "out/$pattern.res" "sav/$pattern.fail" > "out/$pattern.diff.fail.log"
if [ "$?" == 0 ]; then
FAIL=OK
else
if [ "$?" == 0 ]; then
FAIL=OK
else
fi
if [ "x$SAV" = "xOK" ]; then
if [ "x$FAIL" = "x" ]; then
fi
if [ "x$SAV" = "xOK" ]; then
if [ "x$FAIL" = "x" ]; then
- echo "[ok] $pattern.res"
+ echo "[ok] out/$pattern.res"
- echo "[ok] $pattern.res - but sav/$pattern.fail remains!"
+ echo "[ok] out/$pattern.res - but sav/$pattern.fail remains!"
fi
ok="$ok $pattern"
elif [ "x$FAIL" = "xOK" ]; then
fi
ok="$ok $pattern"
elif [ "x$FAIL" = "xOK" ]; then
- echo "[fail] $pattern.res"
+ echo "[fail] out/$pattern.res"
ok="$ok $pattern"
elif [ "x$SAV" = "xNOK" ]; then
ok="$ok $pattern"
elif [ "x$SAV" = "xNOK" ]; then
- echo "[======= fail $pattern.res sav/$pattern.sav =======]"
- nok="$nok $ff"
+ echo "[======= fail out/$pattern.res sav/$pattern.sav =======]"
+ nok="$nok $pattern"
echo "$ii" >> "$ERRLIST"
elif [ "x$FAIL" = "xNOK" ]; then
echo "$ii" >> "$ERRLIST"
elif [ "x$FAIL" = "xNOK" ]; then
- echo "[======= changed $pattern.res sav/$pattern.fail ======]"
- nok="$nok $ff"
+ echo "[======= changed out/$pattern.res sav/$pattern.fail ======]"
+ nok="$nok $pattern"
echo "$ii" >> "$ERRLIST"
else
echo "$ii" >> "$ERRLIST"
else
- echo "[=== no sav ===] $pattern.res"
+ echo "[=== no sav ===] out/$pattern.res"
# The default nitc compiler
[ -z "$NITC" ] && find_nitc
# The default nitc compiler
[ -z "$NITC" ] && find_nitc
+# Set NIT_DIR if needed
+[ -z "$NIT_DIR" ] && export NIT_DIR=..
+
verbose=false
stop=false
while [ $stop = false ]; do
verbose=false
stop=false
while [ $stop = false ]; do
+# CLEAN the out directory
+rm -rf out/ 2>/dev/null
+mkdir out 2>/dev/null
for ii in "$@"; do
if [ ! -f $ii ]; then
for ii in "$@"; do
if [ ! -f $ii ]; then
f=`basename "$ii" .nit`
for i in `make_alts $ii`; do
f=`basename "$ii" .nit`
for i in `make_alts $ii`; do
- ff=`basename $i .nit`
- echo -n "=> $ff: "
-
- rm -rf "$ff.res" "$ff.err" "$ff.write" "$ff.bin" 2> /dev/null
+ bf=`basename $i .nit`
+ ff="out/$bf"
+ echo -n "=> $bf: "
# Compile
if [ "x$verbose" = "xtrue" ]; then
# Compile
if [ "x$verbose" = "xtrue" ]; then
if [ "$ERR" != 0 ]; then
echo -n "! "
cp "$ff.cmp.err" "$ff.res"
if [ "$ERR" != 0 ]; then
echo -n "! "
cp "$ff.cmp.err" "$ff.res"
elif [ -x "./$ff.bin" ]; then
cp "$ff.cmp.err" "$ff.res"
echo -n ". "
elif [ -x "./$ff.bin" ]; then
cp "$ff.cmp.err" "$ff.res"
echo -n ". "
if [ -s "$ff.err" ]; then
cat "$ff.err" >> "$ff.res"
fi
if [ -s "$ff.err" ]; then
cat "$ff.err" >> "$ff.res"
fi
if [ -f "$f.args" ]; then
fargs=$f.args
if [ -f "$f.args" ]; then
fargs=$f.args
while read line; do
((cptr=cptr+1))
args=$line
while read line; do
((cptr=cptr+1))
args=$line
fff=$ff"_args"$cptr
rm -rf "$fff.res" "$fff.err" "$fff.write" 2> /dev/null
if [ "x$verbose" = "xtrue" ]; then
fff=$ff"_args"$cptr
rm -rf "$fff.res" "$fff.err" "$fff.write" 2> /dev/null
if [ "x$verbose" = "xtrue" ]; then
if [ -s "$fff.err" ]; then
cat "$fff.err" >> "$fff.res"
fi
if [ -s "$fff.err" ]; then
cat "$fff.err" >> "$fff.res"
fi
done < $fargs
fi
else
echo -n "! "
echo "Compilation error" > "$ff.res"
done < $fargs
fi
else
echo -n "! "
echo "Compilation error" > "$ff.res"