[PATCH 01/14] testsuite: Autoconf test check support.

Chris Johns chrisj at rtems.org
Mon Apr 9 04:42:10 UTC 2018


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

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])
+])
-- 
2.15.1




More information about the devel mailing list