summaryrefslogtreecommitdiffstats
path: root/tools/build/rtems-test-check
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-04-04 08:11:24 +1000
committerChris Johns <chrisj@rtems.org>2017-04-04 08:24:22 +1000
commit258bda306ba25741624488d24a2785c055a9fab0 (patch)
tree66301d9e50cf6dbc08539b441cab8b41ffe2f895 /tools/build/rtems-test-check
parentbsp/qoriq: Fix L1 cache flush (diff)
downloadrtems-258bda306ba25741624488d24a2785c055a9fab0.tar.bz2
testsuite: Add a common test configuration. Fix configure.ac and Makefile.am errors.
- Add a top level test configuration file for test states that are common to all BSPs. This saves adding a test configuration (tcfg) file for every BSP. - Add the test states 'user-input' and 'benchmark'. This lets 'rtems-test' stop the test rather than waiting for a timeout or letting a benchmark run without the user asking for it to run. - Implement rtems-test-check in Python to make it faster. The shell script had grown to a point it was noticably slowing the build down. - Fix the configure.ac and Makefile.am files for a number of the test directories. The files are difficiult to keep in sync with the number of tests and mistakes can happen such as tests being left out of the build. The test fsrofs01 is an example. Also a there was a mix of SUBDIRS and _SUBDIRS being used and only _SUBDIRS should be used. - Fix the test fsrofs01 so it compiles. Closes #2963.
Diffstat (limited to 'tools/build/rtems-test-check')
-rwxr-xr-xtools/build/rtems-test-check81
1 files changed, 65 insertions, 16 deletions
diff --git a/tools/build/rtems-test-check b/tools/build/rtems-test-check
index 923af49306..988556d59e 100755
--- a/tools/build/rtems-test-check
+++ b/tools/build/rtems-test-check
@@ -53,17 +53,29 @@ case ${mode} in
esac
#
+# Read the common settings first.
+#
+if [ -f $includepath/testdata/rtems.tcfg ]; then
+ testdata="$includepath/testdata/rtems.tcfg $testdata"
+fi
+
+#
# If there is no testdata all tests are valid and must pass.
#
-if test -f $testdata; then
+if [ ! -z "$testdata" ]; then
excluded_tests=""
expected_fails=""
+ user_inputs=""
indeterminates=""
+ benchmarks=""
while [ ! -z "$testdata" ];
do
for td in $testdata;
do
+ if [ ! -f $td ]; then
+ continue
+ fi
ntd=""
exec 3<& 0
exec 0<$td
@@ -87,10 +99,18 @@ if test -f $testdata; then
line=$(echo $line | sed -e 's/expected-fail://g;s/[[:blank:]]//g')
expected_fails="${expected_fails} $line"
;;
+ user-input)
+ line=$(echo $line | sed -e 's/user-input://g;s/[[:blank:]]//g')
+ user_inputs="${user_inputs} $line"
+ ;;
indeterminate)
line=$(echo $line | sed -e 's/indeterminate://g;s/[[:blank:]]//g')
indeterminates="${indeterminates} $line"
;;
+ benchmark)
+ line=$(echo $line | sed -e 's/benchmark://g;s/[[:blank:]]//g')
+ benchmarks="${benchmarks} $line"
+ ;;
*)
echo "error: invalid test state: $state in $td" 1>&2
echo "INVALID-TEST-DATA"
@@ -119,26 +139,55 @@ if test -f $testdata; then
fi
;;
flags)
- allow="no"
- for et in ${expected_fails};
+ allow="yes"
+ for et in ${excluded_tests};
do
if test ${t} = ${et}; then
- allow="yes"
+ allow="no"
fi
done
- if test ${allow} = yes; then
- output="-DTEST_STATE_EXPECTED_FAIL=1"
- fi
- allow="no"
- for it in ${indeterminates};
- do
- if test ${t} = ${it}; then
- allow="yes"
+ if test ${allow} = yes; then
+ allow="no"
+ for et in ${expected_fails};
+ do
+ if test ${t} = ${et}; then
+ allow="yes"
+ fi
+ done
+ if test ${allow} = yes; then
+ output="-DTEST_STATE_EXPECTED_FAIL=1"
fi
- done
- if test ${allow} = yes; then
- output="${output} -DTEST_STATE_INDETERMINATE=1"
- fi
+ allow="no"
+ for ut in ${user_inputs};
+ do
+ if test ${t} = ${ut}; then
+ allow="yes"
+ fi
+ done
+ if test ${allow} = yes; then
+ output="-DTEST_STATE_USER_INPUT=1"
+ fi
+ allow="no"
+ for it in ${indeterminates};
+ do
+ if test ${t} = ${it}; then
+ allow="yes"
+ fi
+ done
+ if test ${allow} = yes; then
+ output="${output} -DTEST_STATE_INDETERMINATE=1"
+ fi
+ allow="no"
+ for bt in ${benchmarks};
+ do
+ if test ${t} = ${bt}; then
+ allow="yes"
+ fi
+ done
+ if test ${allow} = yes; then
+ output="${output} -DTEST_STATE_BENCHMARK=1"
+ fi
+ fi
;;
*)
echo "error: invalid mode" 1>&2