check 3.03 KB
#!/bin/sh
#
# set tabsbtop=4

RST=`pwd`/`basename $1`.result

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`

export IOSIM_SERVER=127.0.0.1
export IOSIM_PORT=6767
###### check out new iosim tests ######
cd ${BB_PATH}/hw2/chip/vsim
${BB_PATH}/iosim/src/pi_test/gen_ext_rand External_File.txt
./sim.ipc +vcs+lic+wait $BBOPTS &
sleep 10

cd ${BB_PATH}/tests
echo "+ + + 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 "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 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 lan1.rgb
make scalew-1.rgb
make laf1.rgb
make lpf2.rgb
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/regression2
rm -rf testsuite
rm -rf small_testsuite
cp simple_check testsuite
grep -v DMA simple_check > small_testsuite 
cd ..

# 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 regression2 
cvs update testsuite
cvs update small_testsuite

cd ${BB_PATH}/rdpsim/test/rdp
./testit -b -m -n 015 -t att -s io
./testit -b -m -n 038 -t tex -s io
./testit -b -m -n 017 -t ms -s io
./testit -b -m -n 028 -t cov -s io
./testit -b -m -n 126 -t ew -s io
./nightly_image_diff.sh -b -s hwio test015_att > tmp.$$
./nightly_image_diff.sh -b -s hwio test038_tex >> tmp.$$
./nightly_image_diff.sh -b -s hwio test017_ms >> tmp.$$
./nightly_image_diff.sh -b -s hwio test028_cov >> tmp.$$
./nightly_image_diff.sh -b -s hwio test126_ew >> tmp.$$

grep -i ERROR tmp.$$ && {
	echo "RDP test Failed" >> $RST 
} || {
	echo "RDP test Passed" >> $RST
}

cd $BB_PATH/iosim
./src/iosim -f ./test/bcp_quit.tst

echo "+ + +  Test  End + + +" >> $RST
date >> $RST