diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2016-03-29 20:23:33 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2016-03-30 16:19:06 +0300 |
commit | d50d367e4c3d94a0bc47958e7ad4ab305065e14a (patch) | |
tree | 87a849bcd307f91f5a853c77eeaaccb09613e392 /test | |
parent | 359f0a4e6f325229a0460985789ff0def9d35111 (diff) |
configure: move test_vald to its own m4 file
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Tested-and-reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/m4/configure.m4 | 1 | ||||
-rw-r--r-- | test/m4/validation.m4 | 44 |
2 files changed, 45 insertions, 0 deletions
diff --git a/test/m4/configure.m4 b/test/m4/configure.m4 index 4e16b82ba..e5b291a0a 100644 --- a/test/m4/configure.m4 +++ b/test/m4/configure.m4 @@ -1,5 +1,6 @@ m4_include([test/m4/miscellaneous.m4]) m4_include([test/m4/performance.m4]) +m4_include([test/m4/validation.m4]) AC_CONFIG_FILES([test/Makefile test/miscellaneous/Makefile diff --git a/test/m4/validation.m4 b/test/m4/validation.m4 new file mode 100644 index 000000000..b13711826 --- /dev/null +++ b/test/m4/validation.m4 @@ -0,0 +1,44 @@ +########################################################################## +# Enable/disable Unit tests +########################################################################## +cunit_support=no +test_vald=no +AC_ARG_ENABLE([test_vald], + [ --enable-test-vald run test in test/validation], + [if test x$enableval = xyes; then + test_vald=yes + cunit_support=yes + fi]) + +########################################################################## +# Enable/disable Unit tests +########################################################################## +AC_ARG_ENABLE([cunit_support], + [ --enable-cunit-support include cunit infrastructure], + [if test x$enableval = xyes; then + cunit_support=yes + fi]) + +########################################################################## +# Set optional CUnit path +########################################################################## +AC_ARG_WITH([cunit-path], +AC_HELP_STRING([--with-cunit-path=DIR path to CUnit libs and headers], + [(or in the default path if not specified).]), + [CUNIT_PATH=$withval + AM_CPPFLAGS="$AM_CPPFLAGS -I$CUNIT_PATH/include" + AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib" + cunit_support=yes],[]) + +########################################################################## +# Check for CUnit availability +########################################################################## +if test x$cunit_support = xyes +then + AC_CHECK_LIB([cunit],[CU_get_error], [], + [AC_MSG_ERROR([CUnit libraries required])]) + AC_CHECK_HEADERS([CUnit/Basic.h], [], + [AC_MSG_FAILURE(["can't find cunit headers"])]) +else + cunit_support=no +fi |