mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-26 10:44:22 +08:00
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
This commit is contained in:
@@ -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])
|
||||
])
|
||||
Reference in New Issue
Block a user