This repository was archived by the owner on Feb 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtravis_run.sh
More file actions
executable file
·91 lines (82 loc) · 2.33 KB
/
Copy pathtravis_run.sh
File metadata and controls
executable file
·91 lines (82 loc) · 2.33 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
#set -x
#
# MIPS
#
echo ""
echo " MIPS: examples"
MIPS_TEST="002 003 004 005 006 007 008 011 012 020 021 023 024 025 026 030 031"
for I in $MIPS_TEST;
do
echo -n " * ./travis/mips/correct/test-mips-$I: "
./creator.sh -a ./architecture/MIPS-32.json \
-s ./travis/mips/correct/test-mips-$I.s -o min > /tmp/e-$I.out
diff /tmp/e-$I.out ./travis/mips/correct/test-mips-$I.out
if [ $? -ne 0 ]; then
echo "Different: Error $I with different outputs...";
error=1
else
echo "Equals";
fi
rm /tmp/e-$I.out
done
echo ""
echo " MIPS: common errors"
MIPS_TEST="001 002 003 004 005 006 007 008 009 010 011 031 032 033 034 035 037 039 040 041 042 043 044 045 046 047 048 049"
for I in $MIPS_TEST;
do
echo -n " * ./travis/mips/error/testerror-mips-$I: "
./creator.sh -a ./architecture/MIPS-32.json \
-s ./travis/mips/error/testerror-mips-$I.s -o min > /tmp/e-$I.out
diff /tmp/e-$I.out ./travis/mips/error/testerror-mips-$I.out
if [ $? -ne 0 ]; then
echo "Different: Error $I with different outputs...";
error=1
else
echo "Equals";
fi
rm /tmp/e-$I.out
done
echo ""
echo " MIPS: passing convention"
MIPS_TEST="001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032"
for I in $MIPS_TEST;
do
echo -n " * ./travis/mips/sentinel/testsentinel-mips-$I: "
./creator.sh -a ./architecture/MIPS-32.json \
-s ./travis/mips/sentinel/testsentinel-mips-$I.s -o min > /tmp/e-$I.out
diff /tmp/e-$I.out ./travis/mips/sentinel/testsentinel-mips-$I.out
if [ $? -ne 0 ]; then
echo "Different: Error $I with different outputs...";
error=1
else
echo "Equals";
fi
rm /tmp/e-$I.out
done
#
# RISC-V
#
echo ""
echo " RISC-V:"
RV_TEST="002 003 004 005 006 007 008 011 012"
for I in $RV_TEST;
do
echo -n " * ./travis/riscv/correct/test-riscv-$I: "
./creator.sh -a "./architecture/RISC-V (RV32IMFD).json" \
-s ./travis/riscv/correct/test-riscv-$I.s -o min > /tmp/e-$I.out
diff /tmp/e-$I.out ./travis/riscv/correct/test-riscv-$I.out
if [ $? -ne 0 ]; then
echo "Different: Error $I with different outputs...";
error=1
else
echo "Equals";
fi
rm /tmp/e-$I.out
done
#
# Return
#
if [[ -v error ]]; then
exit -1
fi