Commit 8256c661 authored by zygzagZ's avatar zygzagZ

Improv test.sh

parent 1bed5bf5
......@@ -30,32 +30,9 @@ make -j8 && for i in lat/lattests/good/*.lat; do
red "ERROR $i"
exit 1
fi
done && green good OK && for ext in `ls tests/good/`; do
ok=1
for i in tests/good/$ext/*.lat; do
($BIN "$i" &>/dev/null);
if ! [ $? -eq 0 ]; then
red "$ext fails on $i";
$BIN "$i"
ok=0;
break;
fi
done && green good OK &&
if [ -f "${i%.*}.input" ]; then
inp="${i%.*}.input"
else
inp=/dev/null
fi
if ! diff <( $VALGRIND timeout 2 ${i%.*} < "$inp" ) "${i%.*}.output"; then
red "ERROR $i"
ok=0;
fi
done
if [ $ok -eq 1 ]; then
green "OK: $ext passed!"
fi
done && for i in lat/lattests/bad/*.lat; do
for i in lat/lattests/bad/*.lat; do
t=$((t+1))
($BIN "$i" &>/dev/null);
if [ $? -eq 0 ]; then
......@@ -63,7 +40,9 @@ done && for i in lat/lattests/bad/*.lat; do
$BIN "$i"
exit 1;
fi
done && green "OK: $t bad tests passed!" && for i in tests/bad/semantic/*.lat; do
done && green "OK: $t bad tests passed!" &&
for i in tests/bad/semantic/*.lat; do
t=$((t+1))
($BIN "$i" &>/dev/null);
if [ $? -eq 0 ]; then
......@@ -71,7 +50,9 @@ done && green "OK: $t bad tests passed!" && for i in tests/bad/semantic/*.lat; d
$BIN "$i"
exit 1;
fi
done && green "OK: $t bad+ tests passed!" && for ext in `ls lat/lattests/extensions`; do
done && green "OK: $t bad+ tests passed!" &&
for ext in `ls lat/lattests/extensions`; do
ok=1
for i in lat/lattests/extensions/$ext/*.lat; do
($BIN "$i" &>/dev/null);
......@@ -82,22 +63,29 @@ done && green "OK: $t bad+ tests passed!" && for ext in `ls lat/lattests/extensi
break;
fi
if [ -f "${i%.*}.input" ]; then
inp="${i%.*}.input"
else
inp=/dev/null
fi
if ! diff <( $VALGRIND timeout 2 ${i%.*} < "$inp" ) "${i%.*}.output"; then
red "ERROR $i"
ok=0
break
exit 1
fi
done
if [ $ok -eq 1 ]; then
green "OK: $ext passed!"
green "OK: ext $ext passed!"
fi
done && for ext in `ls tests/extensions`; do
done &&
for ext in `ls tests/good/`; do
ok=1
for i in lat/lattests/extensions/$ext/*.lat; do
for i in tests/good/$ext/*.lat; do
($BIN "$i" &>/dev/null);
if ! [ $? -eq 0 ]; then
red "$ext fails on $i";
red "$ext+ fails on $i";
$BIN "$i"
ok=0;
break;
......@@ -109,13 +97,12 @@ done && for ext in `ls tests/extensions`; do
inp=/dev/null
fi
if ! diff <( $VALGRIND timeout 2 ${i%.*} < "$inp" ) "${i%.*}.output"; then
red "ERROR $i"
exit 1
ok=0;
fi
done
if [ $ok -eq 1 ]; then
green "OK: $ext passed!"
green "OK: ext+ ${ext} passed!"
fi
done
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment