diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/atf/Makefile | 10 | ||||
-rw-r--r-- | lib/atf/Makefile.inc | 2 | ||||
-rw-r--r-- | lib/atf/libatf-c++/Makefile | 5 | ||||
-rw-r--r-- | lib/atf/libatf-c++/Makefile.inc | 3 | ||||
-rw-r--r-- | lib/atf/libatf-c++/tests/Makefile | 47 | ||||
-rw-r--r-- | lib/atf/libatf-c/Makefile | 5 | ||||
-rw-r--r-- | lib/atf/libatf-c/Makefile.inc | 3 | ||||
-rw-r--r-- | lib/atf/libatf-c/tests/Makefile | 62 | ||||
-rw-r--r-- | lib/atf/tests/Makefile | 12 | ||||
-rw-r--r-- | lib/atf/tests/test-programs/Makefile | 24 |
10 files changed, 168 insertions, 5 deletions
diff --git a/lib/atf/Makefile b/lib/atf/Makefile index 0da9aa8..a191f0d 100644 --- a/lib/atf/Makefile +++ b/lib/atf/Makefile @@ -27,9 +27,13 @@ .include <bsd.own.mk> -SUBDIR= \ - libatf-c \ - libatf-c++ +SUBDIR= libatf-c \ + libatf-c++ \ + ${_tests} + +.if ${MK_TESTS} != "no" +_tests= tests +.endif .ORDER: ${SUBDIR} diff --git a/lib/atf/Makefile.inc b/lib/atf/Makefile.inc index 937187a..15e7517 100644 --- a/lib/atf/Makefile.inc +++ b/lib/atf/Makefile.inc @@ -25,8 +25,6 @@ # # $FreeBSD$ -ATF= ${.CURDIR}/../../../contrib/atf - _CFLAGS:= ${CFLAGS} _CPPFLAGS:= ${CPPFLAGS} _CXXFLAGS:= ${CXXFLAGS} diff --git a/lib/atf/libatf-c++/Makefile b/lib/atf/libatf-c++/Makefile index 37d6073..96f620b 100644 --- a/lib/atf/libatf-c++/Makefile +++ b/lib/atf/libatf-c++/Makefile @@ -36,6 +36,7 @@ LDADD= -latf-c LDFLAGS+= -L${.OBJDIR}/../libatf-c +ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF} .PATH: ${ATF}/atf-c++ .PATH: ${ATF}/atf-c++/detail @@ -73,4 +74,8 @@ INCSDIR_atf-c++.hpp= ${INCLUDEDIR} MAN= atf-c++-api.3 +.if ${MK_TESTS} != "no" +SUBDIR= tests +.endif + .include <bsd.lib.mk> diff --git a/lib/atf/libatf-c++/Makefile.inc b/lib/atf/libatf-c++/Makefile.inc new file mode 100644 index 0000000..265f86d --- /dev/null +++ b/lib/atf/libatf-c++/Makefile.inc @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" diff --git a/lib/atf/libatf-c++/tests/Makefile b/lib/atf/libatf-c++/tests/Makefile new file mode 100644 index 0000000..db10fce --- /dev/null +++ b/lib/atf/libatf-c++/tests/Makefile @@ -0,0 +1,47 @@ +# $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} + +FILESDIR= ${TESTSDIR} +FILES= macros_hpp_test.cpp +FILES+= unused_test.cpp + +# Tests in atf-c++. +.for _T in atf_c++_test \ + build_test \ + check_test \ + config_test \ + macros_test \ + tests_test \ + utils_test +ATF_TESTS_CXX+= ${_T} +SRCS.${_T}= ${_T}.cpp test_helpers.cpp +.endfor + +ATF_TESTS_SH= pkg_config_test + +# Tests in atf-c++/detail. + +.for _T in application_test \ + env_test \ + exceptions_test \ + expand_test \ + fs_test \ + parser_test \ + process_test \ + sanity_test \ + text_test \ + ui_test +ATF_TESTS_CXX+= ${_T} +SRCS.${_T}= ${_T}.cpp test_helpers.cpp +.endfor + +.include <atf.test.mk> diff --git a/lib/atf/libatf-c/Makefile b/lib/atf/libatf-c/Makefile index 26fba5c..b197958 100644 --- a/lib/atf/libatf-c/Makefile +++ b/lib/atf/libatf-c/Makefile @@ -30,6 +30,7 @@ LIB= atf-c SHLIB_MAJOR= 1 +ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF} .PATH: ${ATF}/atf-c .PATH: ${ATF}/atf-c/detail @@ -73,4 +74,8 @@ INCSDIR_atf-c.h= ${INCLUDEDIR} MAN= atf-c-api.3 +.if ${MK_TESTS} != "no" +SUBDIR= tests +.endif + .include <bsd.lib.mk> diff --git a/lib/atf/libatf-c/Makefile.inc b/lib/atf/libatf-c/Makefile.inc new file mode 100644 index 0000000..265f86d --- /dev/null +++ b/lib/atf/libatf-c/Makefile.inc @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" 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> diff --git a/lib/atf/tests/Makefile b/lib/atf/tests/Makefile new file mode 100644 index 0000000..7bc96c9 --- /dev/null +++ b/lib/atf/tests/Makefile @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.include <bsd.own.mk> + +TESTSDIR= ${TESTSBASE}/lib/atf + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +SUBDIR= test-programs + +.include <bsd.test.mk> diff --git a/lib/atf/tests/test-programs/Makefile b/lib/atf/tests/test-programs/Makefile new file mode 100644 index 0000000..f1ba9f5 --- /dev/null +++ b/lib/atf/tests/test-programs/Makefile @@ -0,0 +1,24 @@ +# $FreeBSD$ + +.include <bsd.init.mk> + +TESTSDIR= ${TESTSBASE}/lib/atf/test-programs +KYUAFILE= yes + +ATF= ${.CURDIR:H:H:H:H}/contrib/atf +.PATH: ${ATF}/test-programs + +CFLAGS+= -I${ATF} + +ATF_TESTS_C= c_helpers + +ATF_TESTS_CXX= cpp_helpers +SRCS.cpp_helpers= cpp_helpers.cpp + +ATF_TESTS_SH= sh_helpers +.for _T in config_test expect_test fork_test meta_data_test result_test srcdir_test +ATF_TESTS_SH+= ${_T} +ATF_TESTS_SH_SRC_${_T}= common.sh ${_T}.sh +.endfor + +.include <atf.test.mk> |