[rtems commit] testsuite: Autoconf test check support.
Chris Johns
chrisj at rtems.org
Mon Apr 9 22:36:23 UTC 2018
Module: rtems
Branch: master
Commit: 18f77699a8bff801e0e3f6eed3539b1887cf91a6
Changeset: http://git.rtems.org/rtems/commit/?id=18f77699a8bff801e0e3f6eed3539b1887cf91a6
Author: Chris Johns <chrisj at rtems.org>
Date: Mon Apr 9 08:18:46 2018 +1000
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(+)
diff --git a/testsuites/aclocal/rtems-test-check.m4 b/testsuites/aclocal/rtems-test-check.m4
new file mode 100644
index 0000000..7c71925
--- /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])
+])
More information about the vc
mailing list