forked from cmhill-zz/assembly-testing
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·40 lines (31 loc) · 922 Bytes
/
run_tests.sh
File metadata and controls
executable file
·40 lines (31 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#! /usr/bin/sh
timestamp=`date +%FT%R:%S`
tests=0
failures=0
for tc in testcases/group_1/* ; do
if [ -d $tc ]
then
tc=`basename ${tc}`
cd ./testcases/group_1/${tc}/
echo $tc
sh run_test.sh
return_code=$?
cd ../../../
tests=$((tests + 1))
if [ ${return_code} -eq 0 ]; then
echo "<testcase name=\"${tc}\" classname=\"None\">" >> tmp.results
echo "</testcase>" >> tmp.results
else
echo "<testcase name=\"${tc} fail\" classname=\"None\">" >> tmp.results
echo "<error message=\"Failed\">Failed.</error>" >> tmp.results
echo "</testcase>" >> tmp.results
failures=$((failures + 1))
fi
fi
done
echo "<testsuites>"
echo "<testsuite name=\"Assembler testing\" tests=\"${tests}\" failures=\"${failures}\" timestamp=\"${timestamp}\">"
cat tmp.results
echo "</testsuite>"
echo "</testsuites>"
rm tmp.results