nightly
14.4 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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
#!/bin/sh -x
#
# set tabsbtop=4
RST=`pwd`/`basename $1`.result
SIMLOG=`pwd`/sim.log
boardid=
./rebuild_tree > /dev/null 2>&1
export SIMDEFS="$BBDDR"
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
make sim.ipc > /dev/null 2>&1 || {
echo "Make sim.ipc Failed" >> $RST
}
[ -s race.out.static ] && { echo "sim.ipc has race condition" >> $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 +vcs+lic+wait +cbus_mon $BBOPTS >$SIMLOG 2>&1 &
cd ${BB_PATH}/tests
echo "+ + + Nightly Test Start(base on ipc simulator) + + +" >> $RST
date >> $RST
../iosim/src/iosim -f ../iosim/test/bcp_ri_reset.tst > tmp.$$
grep -i "Fail" tmp.$$ && {
echo "RI IOSIM reset test failed" >> $RST
}
../iosim/src/iosim -f ../iosim/test/bcp_init.tst
../iosim/src/iosim -f ../iosim/test/bcp_vpll_init.tst
./sim_msg "AI TEST STARTING "
# 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
./sim_msg "RI TEST STARTING "
../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/src/iosim -f ../iosim/test/bcp_9th_on.tst
#IOSIM sp test
./sim_msg "SP1 TEST STARTING "
../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/src/iosim -f ../iosim/test/bcp_9th_off.tst
./sim_msg "VI SPAN R/W test start"
../iosim/src/iosim -f ../iosim/test/vi_span_rw.tst > tmp.$$ 2>&1
grep -i "Fail" tmp.$$ && {
echo "VI Span R/W test failed" >> $RST
} || {
echo "VI Span R/W test passed" >> $RST
}
cat tmp.$$
rm -rf tmp
./sim_msg "VI TEST STARTING "
##### 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}/tests
../iosim/src/iosim -f ../iosim/test/bcp_9th_on.tst
./sim_msg "SP2 TEST STARTING "
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
}
cd ${BB_PATH}/tests
../iosim/src/iosim -f ../iosim/test/bcp_9th_off.tst
./sim_msg "DP TEST STARTING "
##### 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
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
}
############# Interrupt testing #############
cd ${BB_PATH}/tests
../iosim/src/mi_test/mi_intr_test > tmp.$$ 2>&1
grep -i "FAIL" tmp.$$ && {
echo "MI Interrupt test failed" >> $RST
} || {
echo "MI Interrupt test passed" >> $RST
}
cat tmp.$$
cd $BB_PATH/iosim
./src/iosim -f ./test/bcp_quit.tst
###### START SIM.IPC.FAST ########
cd ${BB_PATH}/hw2/chip/vsim
export IOSIM_PORT=6768
export SIMDEFS="+define+RSP_DUMMY +define+RDP_DUMMY +define+VI_DUMMY +define+AI_DUMMY +define+FLASH_BIG +CM+ALL+LIBS +define+VIRAGE_FAST $BBDDR"
make sim.ipc > /dev/null 2>&1 || {
echo "Make sim.ipc(reduced) Failed" >> $RST
}
[ -s race.out.static ] && { echo "reduced sim.ipc has race condition" >> $RST; }
./sim.ipc +CM +delay_mode_zero +vcs+lic+wait +cbus_mon $BBOPTS >>$SIMLOG 2>&1 &
cd ${BB_PATH}/tests
echo "+ + + Nightly Test Start(base on ipc reduced simulator) + + +" >> $RST
date >> $RST
../iosim/src/iosim -f ../iosim/test/bcp_init.tst
./sim_msg "RI2 TEST STARTING "
#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.$$
#### MI Tests #################
#
cd ${BB_PATH}/tests
../iosim/src/iosim -f ../iosim/test/bcp_9th_on.tst
./sim_msg "MI TEST STARTING "
../iosim/src/mi_test/mi_test -s 20 -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.$$
../iosim/src/iosim -f ../iosim/test/bcp_9th_off.tst
#### JTAG Tests #################
#
cd ${BB_PATH}/tests
./sim_msg "JTAG TEST STARTING "
../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 "
./sim_msg "SI TEST STARTING "
../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.$$
####### USB Tests ############
#
cd ${BB_PATH}/tests
usb_fail=0
../iosim/src/iosim -f ../iosim/test/bcp_9th_on.tst
./sim_msg "USB TEST STARTING "
echo $BBOPTS | grep "sysclk=10416" && {
../iosim/src/iosim -f ../iosim/test/bcp_ui_clk.tst > tmp.$$ 2>&1
grep -i "Fail" tmp.$$ && {
echo "USB sysclk/2 test failed" >> $RST
usb_fail=1
} || usb_fail=0
} || {
../iosim/src/iosim -f ../iosim/test/bcp_ui.tst -d 0241 > tmp.$$ 2>&1
grep -i "Fail" tmp.$$ && {
echo "USB IOSIM test failed" >> $RST
usb_fail=1
} || usb_fail=0
}
cat tmp.$$
../iosim/src/iosim -f ../iosim/test/bcp_9th_off.tst
../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.$$
#### PI Tests #################
#
cd ${BB_PATH}/tests
./sim_msg "PI TEST STARTING "
../iosim/src/iosim -f ../iosim/test/bcp_9th_on.tst
echo $BBOPTS | grep "sysclk=16000" && {
../iosim/src/pi_test/pi_functest -f ${BB_PATH}/hw2/chip/vsim/External_File.txt > tmp.$$ 2>&1
grep "FAIL" tmp.$$ && {
echo "PI IOSIM test failed" >> $RST
} || {
echo "PI IOSIM test passed" >> $RST
}
cat tmp.$$
}
../iosim/src/mi_test/mi_rng > tmp.$$ 2>&1
./sim_msg "MI random number TEST STARTING "
grep -i "FAIL" tmp.$$ && {
echo "MI RANDOM test failed" >> $RST
} || {
echo "MI RANDOM test passed" >> $RST
}
cat tmp.$$
../iosim/src/iosim -f ../iosim/test/bcp_9th_off.tst
./sim_msg "MI random number TEST ENDING"
cd $BB_PATH/iosim
./src/iosim -f ./test/bcp_quit.tst
#### Run PI test sperately for non 62.5MHz Case ####
echo $BBOPTS | grep "sysclk=16000" || {
export IOSIM_PORT=6769
cd ${BB_PATH}/hw2/chip/vsim
./sim.ipc +vcs+lic+wait +cbus_mon +sysclk=16000 >>$SIMLOG 2>&1 &
cd $BB_PATH/tests
../iosim/src/pi_test/pi_functest -f ${BB_PATH}/hw2/chip/vsim/External_File.txt > tmp.$$ 2>&1
grep "FAIL" tmp.$$ && {
echo "PI IOSIM test failed" >> $RST
} || {
echo "PI IOSIM test passed" >> $RST
}
cat tmp.$$
cd $BB_PATH/iosim
./src/iosim -f ./test/bcp_quit.tst
}
##### rebuild simulator
cd ${BB_PATH}/hw2/chip/vsim
export SIMDEFS="$BBDDR"
make sim.ipc || {
echo "Make sim.ipc(reduced) Failed" >> $RST
}
###### 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
env SIMDEFS="+define+RDP_DUMMY +define+RSP_DUMMY +define+VI_DUMMY +define+AI_DUMMY +define+VIRAGE_FAST +CM+ALL+LIBS $BBDDR" make sim.cpu > /dev/null 2>&1 || {
echo "Make sim.cpu Failed" >> $RST
}
# build individual tests
cd ${BB_PATH}/cpusim
make
##### Add patch for virage test ####
cd mi
export CPU_625=1
rm -rf viragerw.dat
make viragerw.dat
cd ..
[ -s race.out.static ] && { echo "sim.cpu has race condition" >> $RST; }
# run the tests
export BBOPTS=""
./RUN >> $RST
##### sim.cpu.ipc tests ######
#
#
#
echo "+ + + Nightly Test Start(sim.cpu.ipc) + + +" >> $RST
date >> $RST
# build sim.cpu.ipc
cd ${BB_PATH}/hw2/chip/vsim
env SIMDEFS="+define+RDP_DUMMY +define+RSP_DUMMY +define+VI_DUMMY +define+AI_DUMMY +define+VIRAGE_FAST +CM+ALL+LIBS $BBDDR" make sim.cpu.ipc > /dev/null 2>&1 || {
echo "Make sim.cpu.ipc Failed" >> $RST
}
[ -s race.out.static ] && { echo "sim.cpu.ipc has race condition" >> $RST; }
# Build tests - in case the above cpusim is moved around
cd ${BB_PATH}/cpusim
make
# run the tests
cd ${BB_PATH}
[ -n "$BBDDR" ] && boardid="+boardid=61562"
./hw2/chip/vsim/sim.cpu.ipc +brom=./cpusim/jtag/jtag_debug.dat +CM +vcs+lic+wait $BBOPTS $boardid >>$SIMLOG 2>&1 &
cd ${BB_PATH}
./iosim/src/jtag_test/jtag_cpu_test -c ./cpusim/jtag/jtag_reset.dat > tmp.$$ 2>&1
grep -i "FAIL" tmp.$$ && {
echo "JTAG CPU test failed" >> $RST
} || {
echo "JTAG CPU test passed" >> $RST
}
cat tmp.$$
cd $BB_PATH
./iosim/src/iosim -f ./iosim/test/bcp_quit.tst
##### video encoder tests #####
#
#
#
echo "+ + + Nightly Test Start (video encoder) + + +" >> $RST
date >> $RST
cd ${BB_PATH}/hw2/chip/vsim
env SIMDEFS="+define+RDP_DUMMY +define+RSP_DUMMY $BBDDR" make sim.ipc || {
echo "Make sim.ipc Failed" >> $RST
}
cd ${BB_PATH}
sleep 30
./hw2/chip/vsim/sim.ipc +vcs+lic+wait +dac_mon=ntsc_output +vclk=69841 &
./iosim/src/iosim -f iosim/test/venc_ntsc.tst
diff ntsc_output iosim/test/venc_result/ntsc_output 2>&1 && {
echo "NTSC encoder test PASS" >> $RST
rm ntsc_output
} || {
echo "NTSC encoder test FAIL" >> $RST
}
sleep 30
./hw2/chip/vsim/sim.ipc +vcs+lic+wait +dac_mon=pal_output +vclk=56387 &
./iosim/src/iosim -f iosim/test/venc_pal.tst
diff pal_output iosim/test/venc_result/pal_output 2>&1 && {
echo "PAL encoder test PASS" >> $RST
rm pal_output
} || {
echo "PAL encoder test FAIL" >> $RST
}
sleep 30
./hw2/chip/vsim/sim.ipc +vcs+lic+wait +dac_mon=mpal_output +vclk=69918 &
./iosim/src/iosim -f iosim/test/venc_mpal.tst
diff mpal_output iosim/test/venc_result/mpal_output 2>&1 && {
echo "MPAL encoder test PASS" >> $RST
rm mpal_output
} || {
echo "MPAL encoder test FAIL" >> $RST
}
sleep 30
./hw2/chip/vsim/sim.ipc +vcs+lic+wait +dac_mon=ntsc_trap_output +vclk=69841 &
./iosim/src/iosim -f iosim/test/venc_ntsc_trap.tst
diff ntsc_trap_output iosim/test/venc_result/ntsc_trap_output 2>&1 && {
echo "NTSC trap encoder test PASS" >> $RST
rm ntsc_trap_output
} || {
echo "NTSC trap encoder test FAIL" >> $RST
}
echo "+ + + Nightly Test End + + +" >> $RST
date >> $RST