weekly
8.05 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
#!/bin/sh
#
# set tabsbtop=4
RST=`pwd`/`basename $1`.result
./rebuild_tree
echo "* * * Test run on `hostname` at `pwd` * * *" >> $RST
if [ "$SNPSLMD_LICENSE_FILE" = "" ]; then
echo "#################################################" >> $RST
echo "Test Failed : Please setup vcs environment first" >> $RST
echo "#################################################" >> $RST
exit 1
fi
cd ..
BB_PATH=`pwd`
######## update libbcppli #######
cd ${BB_PATH}/lib/libbcppli
make
######## update sim.ipc #########
cd ${BB_PATH}/hw2
rm -f chip/vsim/External_File.txt
cd chip/vsim
export SIMDEFS='+define+FLASH_BIG +CM+ALL+LIBS +define+VIRAGE_FAST'
make sim.ipc > /dev/null 2>&1 || {
echo "Make sim.ipc Failed" >> $RST
}
echo "+ + + Nightly Test Start(component level) + + +" >> $RST
date >> $RST
######## Component level test come first ##########
#### VI component
cd ${BB_PATH}/rdpsim/test/vi
make rtests > result 2>&1
grep errors result | grep -v "errors:[[:space:]]*0" && {
echo "Failed: vi componet level error" >> $RST
echo "please check file: ${BB_PATH}/rdpsim/test/vi/result" >> $RST
}
grep ERROR result | grep -v "NO ERRORS" && {
echo "Failed: vi componet level error" >> $RST
echo "please check file: ${BB_PATH}/rdpsim/test/vi/result" >> $RST
}
#RSP test
cd $BB_PATH
cd rspsim/vuregre
make clean
# SU TEST
make su >/dev/null 2>&1
grep "Failed :0" rsptest/SUTest/regression.log /dev/null 2>&1 && {
echo "BCP rsp SU test passed" >> $RST
} || {
echo "ERROR: BCP rsp SU test Failed" >> $RST
echo "please refer to ${cur_path}/rsp/rspsim/vuregre/rsptest/SUTest/regression.log" >> $RST
}
# SU SINGLE STEP TEST
make su_single >/dev/null 2>&1
grep "Failed :0" rsptest/SUTestSingle/regression.log /dev/null 2>&1 && {
echo "BCP rsp SU SINGLE STEP test passed" >> $RST
} || {
echo "ERROR: BCP rsp SU SINGLE_STEP test Failed" >> $RST
echo "please refer to ${cur_path}/rsp/rspsim/vuregre/rsptest/SUTestSingle/regression.log" >> $RST
}
# VU TEST
make vu >/dev/null 2>&1
grep "Failed :0" rsptest/VUTest/regression.log /dev/null 2>&1 && {
echo "BCP rsp VU test passed" >> $RST
} || {
echo "ERROR: BCP rsp VU test Failed"
echo "please refer to ${cur_path}/rsp/rspsim/vuregre/rsptest/VUTest/regression.log" >> $RST
}
# VU SINGLE STEP TEST
make vu_single >/dev/null 2>&1
grep "Failed :0" rsptest/VUTestSingle/regression.log > /dev/null 2>&1 && {
echo "BCP rsp VU Single step test passed" >> $RST
} || {
echo "ERROR: BCP rsp VU single step test Failed" >> $RST
echo "please refer to ${cur_path}/rsp/rspsim/vuregre/rsptest/VUTestSingle/regression.log" >> $RST
}
export IOSIM_SERVER=127.0.0.1
export IOSIM_PORT=6767
###### check out new iosim tests ######
cd ${BB_PATH}/include
make headers
cd ${BB_PATH}/iosim
cd src
make
###### START SIM.IPC ########
cd ${BB_PATH}/hw2/chip/vsim
${BB_PATH}/iosim/src/pi_test/gen_ext_rand External_File.txt
./sim.ipc $BBOPTS +vcs+lic+wait +CM+ALL +delay_mode_zero > sim.log&
cd ${BB_PATH}/tests
echo "+ + + Nightly Test Start(base on ipc simulator) + + +" >> $RST
date >> $RST
../iosim/src/iosim -f ../iosim/test/bcp_init.tst
../iosim/src/iosim -f ../iosim/test/bcp_vpll_init.tst
# IOSIM AI test
echo
echo "Start BCP AI test "
../iosim/src/iosim -f ../iosim/test/bcp_ai.tst > tmp.$$ 2>&1
grep -i "Fail" tmp.$$ && {
echo "AI IOSIM test failed" >> $RST
} || {
echo "AI IOSIM test passed" >> $RST
}
cat tmp.$$
#IOSIM ri test
../iosim/src/iosim -f ../iosim/test/bcp_ri.tst > tmp.$$ 2>&1
grep -i "Fail" tmp.$$ && {
echo "RI IOSIM test failed" >> $RST
} || {
echo "RI IOSIM test passed" >> $RST
}
cat tmp.$$
#IOSIM sp test
../iosim/src/iosim -f ../iosim/test/bcp_sp.tst > tmp.$$ 2>&1
grep -i "Fail" tmp.$$ && {
echo "SP IOSIM test failed" >> $RST
} || {
echo "SP IOSIM test passed" >> $RST
}
cat tmp.$$
rm -rf tmp
##### Iosim Vi test ######
### 3 test failed
[ -d ${BB_PATH}/rdpsim/backend/test/Iosim/OutData ] || {
mkdir -p ${BB_PATH}/rdpsim/backend/test/Iosim/OutData
}
cd ${BB_PATH}/rdpsim/backend/test/Iosim/OutData
rm -rf *
cd ..
make clean
make allvi_clean
grep -v equate OutData/Results && {
echo "Failed: Vi iosim test error." >> $RST
} || {
echo "VI IOSIM test passed" >> $RST
}
##### rsp iosim test ######
# dma pin pin_single
#
cd $BB_PATH
cd rspsim/vuregre
# DMA TEST
make dma >/dev/null 2>&1
grep "Failed" rsptest/dmatest/test.result > /dev/null 2>&1 && {
echo "ERROR: BCP rsp DMA test Failed" >> $RST
} || {
echo "BCP rsp DMA test passed" >> $RST
}
# PIN TEST
make pin >/dev/null 2>&1
grep "Failed" rsptest/pinTest/test.result > /dev/null 2>&1 && {
echo "ERROR: BCP rsp PIN test Failed" >> $RST
} || {
echo "BCP rsp PIN test passed" >> $RST
}
# PIN SINGLE STEP TEST
make pin_single >/dev/null 2>&1
grep "Failed" rsptest/pinTestSingle/test.result > /dev/null 2>&1 && {
echo "ERROR: BCP rsp pin Single step test Failed" >> $RST
} || {
echo "BCP rsp PIN Single step test passed" >> $RST
}
##### rdp iosim test #####
# test039_tex cov bit failed
#
# Make dp test one by one again
#
cd ${BB_PATH}/rdpsim/test/rdp
rm -f Outdata/*.cov
rm -f Outdata/*.rgb
rm -f Outdata/*.z
rm -f result.diff
make nightly_rdp_io > result 2>&1
make image_diff_hwio >> result.diff
grep -i error result.diff | grep -v "ERROR: Image files OutData/test039_tex_hw_0.cov" && {
echo "Failed: rdp iosim error" >> $RST
} || {
echo "Succeed: rdp iosim test passed" >> $RST
}
#### MI Tests #################
#
cd ${BB_PATH}/tests
../iosim/src/mi_test/mi_test -r ../hw2/chip/vsim/tests/brom.dat -v ../hw2/chip/vsim/tests/v2.dat > tmp.$$ 2>&1
grep -i "FAIL" tmp.$$ && {
echo "MI IOSIM test failed" >> $RST
} || {
echo "MI IOSIM test passed" >> $RST
}
cat tmp.$$
#### JTAG Tests #################
#
cd ${BB_PATH}/tests
../iosim/src/jtag_test/jtag_test > tmp.$$ 2>&1
grep -i "FAIL" tmp.$$ && {
echo "JTAG IOSIM test failed" >> $RST
} || {
echo "JTAG IOSIM test passed" >> $RST
}
cat tmp.$$
#### SI Tests #################
echo
echo "Start BCP SI Tests "
../iosim/src/iosim -f ../iosim/test/bcp_si.tst > tmp.$$ 2>&1
grep "Failed" tmp.$$ && {
echo "SI IOSIM test failed" >> $RST
} || {
echo "SI IOSIM test passed" >> $RST
}
cat tmp.$$
#### PI Tests #################
#
cd ${BB_PATH}/tests
../iosim/src/pi_test/pi_functest -f ${BB_PATH}/hw2/chip/vsim/External_File.txt > tmp.$$ 2>&1
grep -i "FAIL" tmp.$$ && {
echo "PI IOSIM test failed" >> $RST
} || {
echo "PI IOSIM test passed" >> $RST
}
cat tmp.$$
####### USB Tests ############
#
cd ${BB_PATH}/tests
../iosim/src/iosim -f ../iosim/test/bcp_ui.tst -d 0241 > tmp.$$ 2>&1
usb_fail=0
grep -i "Fail" tmp.$$ && {
echo "USB IOSIM test failed" >> $RST
usb_fail=1
}
cat tmp.$$
../iosim/src/iosim -f ../iosim/test/bcp_ui_ext.tst -d 0241 > tmp.$$ 2>&1
grep -i "Fail" tmp.$$ && {
echo "USB DATA Transfer failed" >> $RST
usb_fail=1
}
cat tmp.$$
../iosim/src/iosim -f ../iosim/test/bcp_ui_dmaerr.tst > tmp.$$ 2>&1
usb_fail_lines=`grep -i failed tmp.$$ | wc -l`
[ $usb_fail_lines -ne 4 ] && {
echo "USB DMA error case failed" >> $RST
usb_fail=1
} || {
usb_fail_lines=`grep -i passed tmp.$$ | wc -l`
[ $usb_fail_lines -ne 4 ] && {
echo "USB DMA error case failed(2)" >> $RST
usb_fail=1
}
}
cat tmp.$$
../iosim/src/iosim -f ../iosim/test/bcp_ui_sec.tst > tmp.$$ 2>&1
grep -i "Fail" tmp.$$ && {
echo "USB Security test failed" >> $RST
usb_fail=1
}
cat tmp.$$
[ $usb_fail -eq 0 ] && {
echo "USB IOSIM test passed" >> $RST
}
cat tmp.$$
cd $BB_PATH/iosim
./src/iosim -f ./test/bcp_quit.tst
###### Add VI iorand test
cd $BB_PATH
cd iosim/data/dma80
make >/dev/null 2>&1
make vitest > test.result 2>&1
count=`grep "total error = 0" test.result | wc -l`
if [ $count -eq 6 ]; then
echo "VI IORAND test passed" >> $RST
else
echo "ERROR: Vi IORAND test Failed" >> $RST
fi
##### cpusim tests #####
#
#
#
echo "+ + + Nightly Test Start(cpusim) + + +" >> $RST
date >> $RST
# build sim.cpu
cd ${BB_PATH}/hw2/chip/vsim
export SIMDEFS='+CM+ALL+LIBS'
make sim.cpu > /dev/null 2>&1 || {
echo "Make sim.cpu Failed" >> $RST
}
# build individual tests
cd ${BB_PATH}/cpusim
make
# run the tests
./RUN >> $RST
echo "+ + + Weekly Test End + + +" >> $RST
date >> $RST