From 18f77699a8bff801e0e3f6eed3539b1887cf91a6 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Mon, 9 Apr 2018 08:18:46 +1000 Subject: 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 --- testsuites/aclocal/rtems-test-check.m4 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 testsuites/aclocal/rtems-test-check.m4 (limited to 'testsuites/aclocal') 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]) +]) -- cgit v1.2.3