--- a/marking3/knight2_test.sh Tue Feb 04 14:15:42 2020 +0000
+++ b/marking3/knight2_test.sh Wed Feb 05 12:24:27 2020 +0000
@@ -20,21 +20,21 @@
# compilation tests
function scala_compile {
- (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -nc "$1" 2> /dev/null 1> /dev/null)
+ (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala "$1" 2>> $out 1>> $out)
}
# functional tests
function scala_assert {
- (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" "$2" -e "" 2> /dev/null 1> /dev/null)
+ (ulimit -t 40; JAVA_OPTS="-Xmx1g" scala -i "$1" -- "$2" 2> /dev/null 1> /dev/null)
}
function scala_assert_long {
- (ulimit -t 60; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" "$2" -e "" 2> /dev/null 1> /dev/null)
+ (ulimit -t 60; JAVA_OPTS="-Xmx1g" scala -i "$1" -- "$2" 2> /dev/null 1> /dev/null)
}
#function scala_assert_elong {
-# (ulimit -t 90; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" "$2" -e "" 2> /dev/null 1> /dev/null)
+# (ulimit -t 90; JAVA_OPTS="-Xmx1g" scala -i "$1" -- "$2" 2> /dev/null 1> /dev/null)
#}
# purity test
@@ -253,7 +253,7 @@
echo -e " tour_on_mega_board(70, List((0,0))) found and correct?" | tee -a $out
START=$(date +%s)
- if (scala_assert "knight3.scala" "knight3_test9.scala")
+ if (scala_assert_long "knight3.scala" "knight3_test9.scala")
then
END=$(date +%s)
DIFF=$(( $END - $START ))
@@ -264,7 +264,7 @@
END=$(date +%s)
DIFF=$(( $END - $START ))
echo " It took $DIFF seconds" | tee -a $out
- echo -e " --> test failed" | tee -a $out
+ echo -e " --> TEST FAILED\n" | tee -a $out
fi
fi