-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun-tests.sh
executable file
·38 lines (33 loc) · 1.11 KB
/
run-tests.sh
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
#!/usr/bin/env bash
# Print the system version.
echo "System version:" $(uname -smr)
# Run each test file
for f in Tests/Test*.m; do
declare cmd="magma -b $f"
echo -n "$cmd ... "
# For some reason passing batch:=true here (or any other argument) causes magma to segfault.
$cmd
if [ $? -ne 0 ]; then
exit
fi
done
# Run each example file at least once, to make sure they all execute properly.
declare -a examples=(
"magma -b type:=A3 Examples/PrintCanonicalBasis.m"
"magma -b type:=A3 tabular:=true Examples/PrintCanonicalBasis.m"
"magma -b type:=G2 Examples/GraphLeftCells.m"
"magma -b type:=G2 prime:=2 Examples/GraphLeftCells.m"
"magma -b type:=G2 prime:=3 Examples/GraphLeftCells.m"
"magma -b type:=A3 Examples/BenchmarkCanInStd.m"
"magma -b type:=A3 notable:=true Examples/BenchmarkCanCanMultiplication.m"
"magma -b type:=A5 Tests/LongTestMusCorrect.m"
)
for cmd in "${examples[@]}"; do
if ! $cmd > /dev/null; then
echo "Example failed, rerun:" $cmd
exit
else
echo "Example successful:" $cmd
fi
done
echo "All tests successful."