Skip to content

Commit bf38437

Browse files
tour/u_* apps in CI
1 parent 2791b4f commit bf38437

File tree

2 files changed

+108
-2
lines changed

2 files changed

+108
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6-
setup:
6+
setup-and-test-tour:
77
runs-on: ubuntu-latest
88
env:
99
qemu-version: 9.2.1

scripts/tour.sh

Lines changed: 107 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ make pflash_img
99
make disk_img
1010

1111
u1=false
12+
u2=false
13+
u3=false
14+
u4=false
15+
u5=false
16+
u6=false
17+
u61=false
18+
u7=false
19+
u8=false
1220

1321
make run A=tour/u_1_0 > a.txt 2>/dev/null
1422
context=$(tail -n 1 ./a.txt )
@@ -22,7 +30,105 @@ fi
2230

2331
rm a.txt -f
2432

25-
if [[ "$u1" == true ]]; then
33+
34+
make run A=tour/u_2_0 > a.txt 2>/dev/null
35+
context=$(tail -n 2 ./a.txt )
36+
# echo $context
37+
if [[ "$context" =~ "Hello, axalloc!" && "$context" =~ "[0, 1, 2, 3]" ]]; then
38+
echo "u2 passed"
39+
u2=true
40+
else
41+
echo "u2 failed"
42+
fi
43+
44+
rm a.txt -f
45+
46+
make run A=tour/u_3_0 > a.txt 2>/dev/null
47+
context=$(tail -n 2 ./a.txt )
48+
# echo $context
49+
if [[ "$context" =~ "0xFFFFFFC022000000" && "$context" =~ "0x646C6670" && "$context" =~ "pfld" ]]; then
50+
echo "u3 passed"
51+
u3=true
52+
else
53+
echo "u3 failed"
54+
fi
55+
56+
rm a.txt -f
57+
58+
make run A=tour/u_4_0 > a.txt 2>/dev/null
59+
context=$(tail -n 1 ./a.txt )
60+
# echo $context
61+
if [[ "$context" =~ "Multi-task OK!" ]]; then
62+
echo "u4 passed"
63+
u4=true
64+
else
65+
echo "u4 failed"
66+
fi
67+
68+
rm a.txt -f
69+
70+
71+
make run A=tour/u_5_0 > a.txt 2>/dev/null
72+
context=$(tail -n 5 ./a.txt )
73+
# echo $context
74+
if [[ "$context" =~ "worker1 ok!" && "$context" =~ "worker2 ok!" && "$context" =~ "Multi-task OK!" ]]; then
75+
echo "u5 passed"
76+
u5=true
77+
else
78+
echo "u5 failed"
79+
fi
80+
81+
rm a.txt -f
82+
83+
make run A=tour/u_6_0 > a.txt 2>/dev/null
84+
context=$(tail -n 5 ./a.txt )
85+
#vecho $context
86+
if [[ "$context" =~ "Multi-task(Preemptible) ok!" ]]; then
87+
echo "u6 passed"
88+
u6=true
89+
else
90+
echo "u6 failed"
91+
fi
92+
93+
rm a.txt -f
94+
95+
make run A=tour/u_6_1 > a.txt 2>/dev/null
96+
context=$(tail -n 5 ./a.txt )
97+
#vecho $context
98+
if [[ "$context" =~ "WaitQ ok!" ]]; then
99+
echo "u61 passed"
100+
u61=true
101+
else
102+
echo "u61 failed"
103+
fi
104+
105+
rm a.txt -f
106+
107+
make run A=tour/u_7_0 BLK=y > a.txt 2>/dev/null
108+
context=$(tail -n 1 ./a.txt )
109+
#vecho $context
110+
if [[ "$context" =~ "Load app from disk ok!" ]]; then
111+
echo "u7 passed"
112+
u7=true
113+
else
114+
echo "u7 failed"
115+
fi
116+
117+
rm a.txt -f
118+
119+
make run A=tour/u_8_0 BLK=y > a.txt 2>/dev/null
120+
context=$(tail -n 5 ./a.txt )
121+
#vecho $context
122+
if [[ "$context" =~ "Load app from disk ok!" && "$context" =~ "worker1 ok!" ]]; then
123+
echo "u8 passed"
124+
u8=true
125+
else
126+
echo "u8 failed"
127+
fi
128+
129+
rm a.txt -f
130+
131+
if [[ "$u1" == true && "$u2" == true && "$u3" == true && "$u4" == true && "$u5" == true && "$u6" == true && "$u61" == true && "$u7" == true && "$u8" == true ]]; then
26132
echo "tours passed"
27133
exit 0
28134
else

0 commit comments

Comments
 (0)