summaryrefslogtreecommitdiffstats
path: root/lib/atf/libatf-c/tests/Makefile
diff options
context:
space:
mode:
authorjmmv <jmmv@FreeBSD.org>2013-12-28 23:08:58 +0000
committerjmmv <jmmv@FreeBSD.org>2013-12-28 23:08:58 +0000
commit17b80845b0ba13495186831d3505af8c20eeb6ac (patch)
treef67dde62985332519d0ad6763cdb1b68c9793ab3 /lib/atf/libatf-c/tests/Makefile
parentb8ce141a401c502407ab3e076ccfc3b428c8ac61 (diff)
downloadFreeBSD-src-17b80845b0ba13495186831d3505af8c20eeb6ac.zip
FreeBSD-src-17b80845b0ba13495186831d3505af8c20eeb6ac.tar.gz
Plug the ATF tests into the build.
This is a MFC into stable/10 of: - r257849 Add libatf-c++ to the prebuild libs. - r257853 Build and install the atf tests. - r258233 Move all atf directories to the tests mtree. - r258285 Fix the build of some ATF tests. This change is "make tinderbox" clean on ref10-amd64 with the default settings of WITHOUT_TESTS. It is likely for the WITH_TESTS build to still be broken because not all relevant changes have been merged yet.
Diffstat (limited to 'lib/atf/libatf-c/tests/Makefile')
-rw-r--r--lib/atf/libatf-c/tests/Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/lib/atf/libatf-c/tests/Makefile b/lib/atf/libatf-c/tests/Makefile
new file mode 100644
index 0000000..856c3d7
--- /dev/null
+++ b/lib/atf/libatf-c/tests/Makefile
@@ -0,0 +1,62 @@
+# $FreeBSD$
+
+.include <bsd.init.mk>
+
+TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c
+
+ATF= ${.CURDIR:H:H:H:H}/contrib/atf
+.PATH: ${ATF}/atf-c
+.PATH: ${ATF}/atf-c/detail
+
+CFLAGS+= -I${ATF}
+
+.if ${COMPILER_TYPE} == "clang"
+# macros_test.c contains a double 'const const' which will be gone with
+# the import of atf-0.18.
+# TODO(jmmv): Remove this workaround once we do that update.
+CFLAGS+= -Wno-duplicate-decl-specifier
+.endif
+
+FILESDIR= ${TESTSDIR}
+FILES= macros_h_test.c
+FILES+= unused_test.c
+
+# Tests in atf-c.
+
+.for _T in atf_c_test \
+ build_test \
+ check_test \
+ config_test \
+ error_test \
+ macros_test \
+ tc_test \
+ tp_test \
+ utils_test
+ATF_TESTS_C+= ${_T}
+SRCS.${_T}= ${_T}.c test_helpers.c
+.endfor
+
+ATF_TESTS_SH= pkg_config_test
+
+# Tests in atf-c/detail.
+
+.for _T in dynstr_test \
+ env_test \
+ fs_test \
+ list_test \
+ map_test \
+ process_test \
+ sanity_test \
+ test_helpers_test \
+ text_test \
+ user_test
+ATF_TESTS_C+= ${_T}
+SRCS.${_T}= ${_T}.c test_helpers.c
+.endfor
+
+PROGS+= process_helpers
+SRCS.process_helpers= process_helpers.c
+MAN.process_helpers= # defined
+BINDIR.process_helpers= ${TESTSDIR}
+
+.include <atf.test.mk>
OpenPOWER on IntegriCloud