source: rtems/tools/build/rtems-test-check @ 431bb85d

4.11
Last change on this file since 431bb85d was 431bb85d, checked in by Chris Johns <chrisj@…>, on May 19, 2014 at 1:07:22 PM

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.

  • Property mode set to 100755
File size: 1.3 KB
Line 
1#! /bin/sh
2#
3# Copyright 2014 Chris Johns <chrisj@rtems.org>
4# All rights reserved
5#
6
7#
8# usage: rtems-test-check <bsp-test-database> <includes> <bsp> <tests..>
9#
10
11if test $# -lt 3; then
12  echo "error: invalid command line" >&2
13  exit 2
14fi
15
16testdata="$1"
17shift
18includepath="$1"
19shift
20bsp="$1"
21shift
22tests="$*"
23bsp_tests=${tests}
24
25#
26# If there is no testdata all tests are valid.
27#
28
29if test -f $testdata; then
30  disabled_tests=""
31  while [ ! -z $testdata ];
32  do
33    for td in $testdata;
34    do
35      ntd=""
36      exec 3<& 0
37      exec 0<$td
38      while read line
39      do
40        line=$(echo $line | sed -e 's/#.*$//' -e '/^$/d')
41        if [ ! -z "$line" ]; then
42          include=$(echo $line | sed -e "s/include:.*/yes/g")
43          if [ "$include" = "yes" ]; then
44            inf=$(echo $line | sed -e "s/include://g" -e 's/^[ \t]//;s/[ \t]$//')
45            if test -f $includepath/$inf; then
46              ntd="$includepath/$inf $ntd"
47            fi
48          else
49            disabled_tests="${disabled_tests} $line"
50          fi
51        fi
52      done
53    done
54    testdata=$ntd
55  done
56
57  bsp_tests=""
58  for t in ${tests};
59  do
60    allow="yes"
61    for dt in ${disabled_tests};
62    do
63      if test ${t} = ${dt}; then
64        allow="no"
65      fi
66    done
67    if test ${allow} = yes; then
68      bsp_tests="${bsp_tests} ${t}"
69    fi
70  done
71fi
72
73echo ${bsp_tests}
74
75exit 0
76
Note: See TracBrowser for help on using the repository browser.