-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest
More file actions
executable file
·37 lines (33 loc) · 725 Bytes
/
test
File metadata and controls
executable file
·37 lines (33 loc) · 725 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
#!/bin/bash
if [[ "$1" = "all" ]]
then
i=1
while [[ $i -le 8 ]]
do
#if [[ $i -eq 2 ]]
#then
# continue
#fi
docker run -it --rm -v $(pwd):/root/compiler maxxing/compiler-dev autotest -riscv -s lv${i} /root/compiler > alltest/out$i
#file="alltest/out$i"
while read line
do
str="${line:0:7}"
if [[ "$str" = "running" ]]
then
#echo "line: $line"
str1=${line/PASSED/OK}
#echo "str1: $str1"
if [[ $line = $str1 ]]
then
echo "lv$i failed"
break
fi
fi
done < "alltest/out$i"
#echo "$i finish"
let i=i+1
done
else
docker run -it --rm -v $(pwd):/root/compiler maxxing/compiler-dev autotest -${1} -s lv$2 /root/compiler > out$2
fi