aboutsummaryrefslogtreecommitdiffstats
path: root/run_test_deliverable.sh
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-03-22 14:17:29 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-03-22 14:17:29 +0000
commitf12ccd62ecf08774ce599a2e15d9042500d2760a (patch)
tree12012ae296025441c3329e23a7290732cf33c36c /run_test_deliverable.sh
parent190b7a0e5d45367230795ac0bdf6fc2f248ba9e1 (diff)
downloadCompiler-f12ccd62ecf08774ce599a2e15d9042500d2760a.tar.gz
Compiler-f12ccd62ecf08774ce599a2e15d9042500d2760a.zip
Adding test and break working
Diffstat (limited to 'run_test_deliverable.sh')
-rwxr-xr-xrun_test_deliverable.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/run_test_deliverable.sh b/run_test_deliverable.sh
index 35f6629..ae96054 100755
--- a/run_test_deliverable.sh
+++ b/run_test_deliverable.sh
@@ -3,12 +3,23 @@
if [[ -z "$1" ]]; then
COMPILER=bin/c_compiler
else
- COMPILER=$1
+ COMPILER=bin/c_compiler
+ make clean
+ make -B ${COMPILER}
fi
+echo ""
+echo "========================================"
+echo " Testing compiler"
+echo ""
+
+PASSED=0
+CHECKED=0
+
mkdir -p working
for DRIVER in test_deliverable/testcases/*_driver.c ; do
+ CHECKED=$(( CHECKED+1 ))
NAME=$(basename $DRIVER _driver.c)
TESTCODE=test_deliverable/testcases/$NAME.c
@@ -39,7 +50,13 @@ for DRIVER in test_deliverable/testcases/*_driver.c ; do
qemu-mips working/${NAME}.elf
if [[ $? -ne 0 ]]; then
>&2 echo "ERROR : Testcase returned $?, but expected 0."
+ continue
fi
echo "pass"
+ PASSED=$(( PASSED+1 ))
done
+
+echo "########################################"
+echo " Passed ${PASSED} out of ${CHECKED}"
+echo ""