summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijay Dandiga <vijay.dandiga@linaro.org>2014-10-09 15:37:14 +0530
committerVijay Dandiga <vijay.dandiga@linaro.org>2014-10-09 15:37:14 +0530
commit370d8c6d1459a9feecee624ae60cdeca72c0b64a (patch)
tree6686ee2f8e28d9d972c22c16de7934a376978b05
parent3161c7e7c01b6c346aaecaaaf57192fa3844916a (diff)
Add latest test script and yaml
-rwxr-xr-xcommon/scripts/coresight-test-new.sh32
-rw-r--r--openembedded/coresight-test-new.yaml16
2 files changed, 48 insertions, 0 deletions
diff --git a/common/scripts/coresight-test-new.sh b/common/scripts/coresight-test-new.sh
new file mode 100755
index 0000000..b2e957a
--- /dev/null
+++ b/common/scripts/coresight-test-new.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+# Script to test coresight
+
+#CORESIGHT_PATH="/sys/kernel/debug/coresight"
+CORESIGHT_PATH="/sys/bus/coresight/devices"
+
+echo "ls $CORESIGHT_PATH"
+ls $CORESIGHT_PATH
+
+echo -e "SOURCE\tSINK\tRESULT"
+echo -e "------\t----\t------"
+for SOURCE in `ls $CORESIGHT_PATH | egrep "etm|ptm"` ; do
+ for SINK in `ls $CORESIGHT_PATH | grep etb` ; do
+
+ 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}'`
+
+ if [ $wrt_ptr1 == $wrt_ptr2 ]
+ then
+ RES="FAIL"
+ else
+ RES="SUCCESS"
+ fi
+
+ echo -e "$SOURCE\t$SINK\t$RES"
+ done
+ echo
+done
+
diff --git a/openembedded/coresight-test-new.yaml b/openembedded/coresight-test-new.yaml
new file mode 100644
index 0000000..35b6af1
--- /dev/null
+++ b/openembedded/coresight-test-new.yaml
@@ -0,0 +1,16 @@
+metadata:
+ format: Lava-Test Test Definition 1.0
+ name: coresight-test
+ description: "To check wether coresight source to sink writes are working"
+ maintainer:
+ - vijay.dandiga@linaro.org
+ os:
+ - openembedded
+ scope:
+ - functional
+ devices:
+ - tc2
+
+run:
+ steps:
+ - "common/scripts/coresight-test-new.sh"