summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/arm/run_tests.sh20
-rw-r--r--test/arm/test.isail7
-rwxr-xr-xtest/typecheck/run_tests.sh23
3 files changed, 48 insertions, 2 deletions
diff --git a/test/arm/run_tests.sh b/test/arm/run_tests.sh
index 21c1ce3d..2623427c 100755
--- a/test/arm/run_tests.sh
+++ b/test/arm/run_tests.sh
@@ -79,6 +79,26 @@ else
done
fi
+printf "\nLoading specification into interpreter...\n"
+
+cd $SAILDIR/aarch64
+
+if $SAILDIR/sail -is $DIR/test.isail prelude.sail no_vector/spec.sail decode_start.sail no_vector/decode.sail decode_end.sail main.sail 1> /dev/null 2> /dev/null;
+then
+ green "loaded no_vector specification" "ok";
+
+ if diff $DIR/test_O2.expect $DIR/iresult;
+ then
+ green "interpreter success" "ok"
+ else
+ red "interpreter failed" "fail"
+ fi;
+
+ rm -f $DIR/iresult
+else
+ red "loading no_vector specification" "fail"
+fi
+
finish_suite "ARM generated spec tests"
printf "</testsuites>\n" >> $DIR/tests.xml
diff --git a/test/arm/test.isail b/test/arm/test.isail
new file mode 100644
index 00000000..8775ed8f
--- /dev/null
+++ b/test/arm/test.isail
@@ -0,0 +1,7 @@
+:elf ../test/arm/test_O2.elf
+:output ../test/arm/iresult
+initialize_registers()
+:run
+main()
+:run
+:quit \ No newline at end of file
diff --git a/test/typecheck/run_tests.sh b/test/typecheck/run_tests.sh
index 1ece2a15..ff70dc1b 100755
--- a/test/typecheck/run_tests.sh
+++ b/test/typecheck/run_tests.sh
@@ -65,9 +65,28 @@ do
fi
else
red "tested $i expecting pass" "fail"
- fi
+ fi;
+
+ shopt -s nullglob;
+ for file in $DIR/pass/${i%.sail}/*.sail;
+ do
+ pushd $DIR/pass > /dev/null;
+ if $SAILDIR/sail ${i%.sail}/$(basename $file) 2> result;
+ then
+ red "failing variant of $i $(basename $file) passed" "fail"
+ else
+ if diff ${file%.sail}.expect result;
+ then
+ green "failing variant of $i $(basename $file)" "pass"
+ else
+ yellow "failing variant of $i $(basename $file)" "unexpected error"
+ fi
+ fi;
+ rm -f result;
+ popd > /dev/null
+ done
done
-finish_suite "Expecting pass"
+finish_suite "Typechecking tests"
printf "</testsuites>\n" >> $DIR/tests.xml