--- a/cw4_marking/cw4_test.sh Fri Sep 18 10:57:24 2026 +0100
+++ b/cw4_marking/cw4_test.sh Fri Sep 18 10:58:01 2026 +0100
@@ -35,9 +35,13 @@
}
function scala_fail {
+ rm -rf /Users/cu/.ammonite/cache/3.*/* 2> /dev/null ;
(ulimit -t 30; JAVA_OPTS="-Xmx1g -XX:MaxJavaStackTraceDepth=10" amm -s "$1" 1>> $out 2>> $out)
}
+# remove @main
+gsed -i -e "s|@main||g" cw04.sc
+
### compilation test
@@ -69,6 +73,8 @@
echo -e " --> FAIL\n" | tee -a $out
tstsA=$(( 1 ))
fi
+else
+ tstsA=$(( 1 ))
fi
echo >> $out
@@ -87,7 +93,7 @@
else
echo -e " --> success (+ 5.0 Marks)\n" | tee -a $out
marks=$(( marks + 5.0 ))
- fi
+ fi
fi
### for test
@@ -111,6 +117,8 @@
tail -25 $out | pr -to10
tstsB=$(( 1 ))
fi
+else
+ tstsB=$(( 1 ))
fi
echo >> $out
@@ -143,7 +151,7 @@
echo -e " --> FAIL\n" | tee -a $out
tail -25 $out | pr -to10
cat c$out >> $out
- fi
+ fi
fi
##############################
@@ -169,6 +177,8 @@
tail -25 $out | pr -to10
tstsC=$(( 1 ))
fi
+else
+ tstsC=$(( 1 ))
fi
echo >> $out