summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-05-19 23:07:22 +1000
committerJoel Sherrill <joel@rtems.org>2016-09-04 19:38:15 -0500
commitb9d871f9e1fc105b8123b2ffb41bef17f0fc8005 (patch)
tree055e85e5678a143a071bf0930b60259796718989 /tools
parentChange version to 4.10 to the rtems-bsps. (diff)
downloadrtems-b9d871f9e1fc105b8123b2ffb41bef17f0fc8005.tar.bz2
rtems-test-check: Ignore tests which require real ISR based clock tick
BSPs for simulators which do not include a clock tick interrupt source are incapable of running some tests successfully. This is a common characteristic of some BSPs and a fixed set of tests. There is no point in duplicating this list of tests in those BSPs test configuration. Read testsuites/testdata/require-tick-isr.tcfg for details. Conflicts: testsuites/automake/test-subdirs.am tools/build/rtems-test-check
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build/rtems-test-check76
1 files changed, 76 insertions, 0 deletions
diff --git a/tools/build/rtems-test-check b/tools/build/rtems-test-check
new file mode 100755
index 0000000000..3a485c7dc8
--- /dev/null
+++ b/tools/build/rtems-test-check
@@ -0,0 +1,76 @@
+#! /bin/sh
+#
+# Copyright 2014 Chris Johns <chrisj@rtems.org>
+# All rights reserved
+#
+
+#
+# usage: rtems-test-check <bsp-test-database> <includes> <bsp> <tests..>
+#
+
+if test $# -lt 3; then
+ echo "error: invalid command line" >&2
+ exit 2
+fi
+
+testdata="$1"
+shift
+includepath="$1"
+shift
+bsp="$1"
+shift
+tests="$*"
+bsp_tests=${tests}
+
+#
+# If there is no testdata all tests are valid.
+#
+
+if test -f $testdata; then
+ disabled_tests=""
+ while [ ! -z $testdata ];
+ do
+ for td in $testdata;
+ do
+ ntd=""
+ exec 3<& 0
+ exec 0<$td
+ while read line
+ do
+ line=$(echo $line | sed -e 's/#.*$//' -e '/^$/d')
+ if [ ! -z "$line" ]; then
+ include=$(echo $line | sed -e "s/include:.*/yes/g")
+ if [ "$include" = "yes" ]; then
+ inf=$(echo $line | sed -e "s/include://g" -e 's/^[ \t]//;s/[ \t]$//')
+ if test -f $includepath/$inf; then
+ ntd="$includepath/$inf $ntd"
+ fi
+ else
+ disabled_tests="${disabled_tests} $line"
+ fi
+ fi
+ done
+ done
+ testdata=$ntd
+ done
+
+ bsp_tests=""
+ for t in ${tests};
+ do
+ allow="yes"
+ for dt in ${disabled_tests};
+ do
+ if test ${t} = ${dt}; then
+ allow="no"
+ fi
+ done
+ if test ${allow} = yes; then
+ bsp_tests="${bsp_tests} ${t}"
+ fi
+ done
+fi
+
+echo ${bsp_tests}
+
+exit 0
+