diff options
author | Chris Johns <chrisj@rtems.org> | 2018-04-09 08:18:46 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2018-04-10 08:24:54 +1000 |
commit | 18f77699a8bff801e0e3f6eed3539b1887cf91a6 (patch) | |
tree | 945e5f01184ed92bdcb44beaba8eee18f27aad09 /testsuites/aclocal | |
parent | Require the user to provide a BSP list when build SMP or MP. (diff) | |
download | rtems-18f77699a8bff801e0e3f6eed3539b1887cf91a6.tar.bz2 |
testsuite: Autoconf test check support.
The autoconf function checks the state of a test for the BSP and
controls the building of the test.
This change is part of the testsuite Makefile.am reorganisation.
Update #3382
Diffstat (limited to 'testsuites/aclocal')
-rw-r--r-- | testsuites/aclocal/rtems-test-check.m4 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuites/aclocal/rtems-test-check.m4 b/testsuites/aclocal/rtems-test-check.m4 new file mode 100644 index 0000000000..7c7192573b --- /dev/null +++ b/testsuites/aclocal/rtems-test-check.m4 @@ -0,0 +1,31 @@ +dnl +dnl Check a test getting it's status. +dnl +AC_DEFUN([RTEMS_TEST_CHECK], +[AC_REQUIRE([RTEMS_ENV_RTEMSBSP]) + AC_REQUIRE([RTEMS_SOURCE_TOP]) + AC_MSG_CHECKING([${RTEMS_CPU}/${RTEMS_BSP} $1 test]) + tcheck="${RTEMS_SOURCE_ROOT}/tools/build/rtems-test-check-py" + tdata="${RTEMS_BSP}-testsuite.tcfg" + tincludes="${RTEMS_SOURCE_ROOT}/c/src/lib/libbsp/${RTEMS_CPU}/${RTEMS_BSP_FAMILY}/make/custom:${RTEMS_SOURCE_ROOT}/testsuites" + if test -f $tcheck; then + check_result=`$tcheck exclude ${RTEMS_BSP} $tdata $tincludes $1` + else + check_result=$1 + fi + if test "$1" = "$check_result"; then + if test -f $tcheck; then + test_FLAGS=`$tcheck flags ${RTEMS_BSP} $tdata $tincludes $1` + fi + if test -z "$test_FLAGS"; then + result_msg="PASS" + else + result_msg="$test_FLAGS" + fi + else + result_msg="EXCLUDED" + fi + AC_MSG_RESULT([$result_msg]) + AM_CONDITIONAL([TEST_$1], [test "$result_msg" != "EXCLUDED"]) + AC_SUBST([TEST_FLAGS_$1], [$test_FLAGS]) +]) |