diff options
Diffstat (limited to 'common/scripts/coresight-test.sh')
-rwxr-xr-x | common/scripts/coresight-test.sh | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/common/scripts/coresight-test.sh b/common/scripts/coresight-test.sh index 318b812..eabf6e8 100755 --- a/common/scripts/coresight-test.sh +++ b/common/scripts/coresight-test.sh @@ -9,27 +9,26 @@ ls $CORESIGHT_PATH echo -e "SOURCE\t\tSINK\t\tRESULT" echo -e "------\t\t----\t\t------" for SOURCE in `ls $CORESIGHT_PATH | egrep "etm|ptm"` ; do - for SINK in `ls $CORESIGHT_PATH | egrep "etb|tpiu"` ; do - - echo 1 > $CORESIGHT_PATH/$SINK/enable_sink - - wrt_ptr1=`cat $CORESIGHT_PATH/$SINK/status | grep wrt | awk '{print $NF}'` - echo 1 > $CORESIGHT_PATH/$SOURCE/enable_source - sleep 1 - echo 0 > $CORESIGHT_PATH/$SOURCE/enable_source - wrt_ptr2=`cat $CORESIGHT_PATH/$SINK/status | grep wrt | awk '{print $NF}'` - - echo 0 > $CORESIGHT_PATH/$SINK/enable_sink - - if [ $wrt_ptr1 == $wrt_ptr2 ]; - then - RES="FAIL" - else - RES="SUCCESS" - fi - - echo -e "$SOURCE\t$SINK\t$RES" - done - echo + for SINK in `ls $CORESIGHT_PATH | grep etb` ; do + + echo 1 > $CORESIGHT_PATH/$SINK/enable_sink + + wrt_ptr1=`cat $CORESIGHT_PATH/$SINK/status | grep wrt | awk '{print $NF}'` + echo 1 > $CORESIGHT_PATH/$SOURCE/enable_source + sleep 1 + echo 0 > $CORESIGHT_PATH/$SOURCE/enable_source + wrt_ptr2=`cat $CORESIGHT_PATH/$SINK/status | grep wrt | awk '{print $NF}'` + echo 0 > $CORESIGHT_PATH/$SINK/enable_sink + + if [ $wrt_ptr1 == $wrt_ptr2 ]; then + RES="fail" + else + RES="pass" + fi + + echo -e "$SOURCE\t$SINK\t$RES" + lava-test-case $SOURCE-$SINK --result $RES + done + echo done |