Build and install the atf tests.
Reviewed by: freebsd-testing Approved by: rpaulo (mentor)
This commit is contained in:
parent
cc21b86f50
commit
fba3cde907
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257853
@ -6,7 +6,27 @@
|
|||||||
/set type=dir uname=root gname=wheel mode=0755
|
/set type=dir uname=root gname=wheel mode=0755
|
||||||
.
|
.
|
||||||
lib
|
lib
|
||||||
|
atf
|
||||||
|
libatf-c
|
||||||
|
..
|
||||||
|
libatf-c++
|
||||||
|
..
|
||||||
|
test-programs
|
||||||
|
..
|
||||||
|
..
|
||||||
libcrypt
|
libcrypt
|
||||||
..
|
..
|
||||||
..
|
..
|
||||||
|
libexec
|
||||||
|
atf
|
||||||
|
atf-check
|
||||||
|
..
|
||||||
|
..
|
||||||
|
..
|
||||||
|
usr.bin
|
||||||
|
atf
|
||||||
|
atf-sh
|
||||||
|
..
|
||||||
|
..
|
||||||
|
..
|
||||||
..
|
..
|
||||||
|
@ -27,9 +27,13 @@
|
|||||||
|
|
||||||
.include <bsd.own.mk>
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
SUBDIR= \
|
SUBDIR= libatf-c \
|
||||||
libatf-c \
|
libatf-c++ \
|
||||||
libatf-c++
|
${_tests}
|
||||||
|
|
||||||
|
.if ${MK_TESTS} != "no"
|
||||||
|
_tests= tests
|
||||||
|
.endif
|
||||||
|
|
||||||
.ORDER: ${SUBDIR}
|
.ORDER: ${SUBDIR}
|
||||||
|
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
#
|
#
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
ATF= ${.CURDIR}/../../../contrib/atf
|
|
||||||
|
|
||||||
_CFLAGS:= ${CFLAGS}
|
_CFLAGS:= ${CFLAGS}
|
||||||
_CPPFLAGS:= ${CPPFLAGS}
|
_CPPFLAGS:= ${CPPFLAGS}
|
||||||
_CXXFLAGS:= ${CXXFLAGS}
|
_CXXFLAGS:= ${CXXFLAGS}
|
||||||
|
@ -36,6 +36,7 @@ LDADD= -latf-c
|
|||||||
|
|
||||||
LDFLAGS+= -L${.OBJDIR}/../libatf-c
|
LDFLAGS+= -L${.OBJDIR}/../libatf-c
|
||||||
|
|
||||||
|
ATF= ${.CURDIR:H:H:H}/contrib/atf
|
||||||
.PATH: ${ATF}
|
.PATH: ${ATF}
|
||||||
.PATH: ${ATF}/atf-c++
|
.PATH: ${ATF}/atf-c++
|
||||||
.PATH: ${ATF}/atf-c++/detail
|
.PATH: ${ATF}/atf-c++/detail
|
||||||
@ -73,4 +74,8 @@ INCSDIR_atf-c++.hpp= ${INCLUDEDIR}
|
|||||||
|
|
||||||
MAN= atf-c++-api.3
|
MAN= atf-c++-api.3
|
||||||
|
|
||||||
|
.if ${MK_TESTS} != "no"
|
||||||
|
SUBDIR= tests
|
||||||
|
.endif
|
||||||
|
|
||||||
.include <bsd.lib.mk>
|
.include <bsd.lib.mk>
|
||||||
|
3
lib/atf/libatf-c++/Makefile.inc
Normal file
3
lib/atf/libatf-c++/Makefile.inc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.include "../Makefile.inc"
|
47
lib/atf/libatf-c++/tests/Makefile
Normal file
47
lib/atf/libatf-c++/tests/Makefile
Normal file
@ -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>
|
@ -30,6 +30,7 @@
|
|||||||
LIB= atf-c
|
LIB= atf-c
|
||||||
SHLIB_MAJOR= 1
|
SHLIB_MAJOR= 1
|
||||||
|
|
||||||
|
ATF= ${.CURDIR:H:H:H}/contrib/atf
|
||||||
.PATH: ${ATF}
|
.PATH: ${ATF}
|
||||||
.PATH: ${ATF}/atf-c
|
.PATH: ${ATF}/atf-c
|
||||||
.PATH: ${ATF}/atf-c/detail
|
.PATH: ${ATF}/atf-c/detail
|
||||||
@ -73,4 +74,8 @@ INCSDIR_atf-c.h= ${INCLUDEDIR}
|
|||||||
|
|
||||||
MAN= atf-c-api.3
|
MAN= atf-c-api.3
|
||||||
|
|
||||||
|
.if ${MK_TESTS} != "no"
|
||||||
|
SUBDIR= tests
|
||||||
|
.endif
|
||||||
|
|
||||||
.include <bsd.lib.mk>
|
.include <bsd.lib.mk>
|
||||||
|
3
lib/atf/libatf-c/Makefile.inc
Normal file
3
lib/atf/libatf-c/Makefile.inc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.include "../Makefile.inc"
|
62
lib/atf/libatf-c/tests/Makefile
Normal file
62
lib/atf/libatf-c/tests/Makefile
Normal file
@ -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>
|
12
lib/atf/tests/Makefile
Normal file
12
lib/atf/tests/Makefile
Normal file
@ -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>
|
24
lib/atf/tests/test-programs/Makefile
Normal file
24
lib/atf/tests/test-programs/Makefile
Normal file
@ -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>
|
@ -28,6 +28,7 @@ SUBDIR= ${_atf} \
|
|||||||
talkd \
|
talkd \
|
||||||
tcpd \
|
tcpd \
|
||||||
${_telnetd} \
|
${_telnetd} \
|
||||||
|
${_tests} \
|
||||||
tftpd \
|
tftpd \
|
||||||
${_tftp-proxy} \
|
${_tftp-proxy} \
|
||||||
ulog-helper \
|
ulog-helper \
|
||||||
@ -74,6 +75,7 @@ _telnetd= telnetd
|
|||||||
|
|
||||||
.if ${MK_TESTS} != "no"
|
.if ${MK_TESTS} != "no"
|
||||||
_atf= atf
|
_atf= atf
|
||||||
|
_tests= tests
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.include <bsd.subdir.mk>
|
.include <bsd.subdir.mk>
|
||||||
|
@ -25,6 +25,6 @@
|
|||||||
#
|
#
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
SUBDIR= atf-check
|
SUBDIR= atf-check tests
|
||||||
|
|
||||||
.include <bsd.subdir.mk>
|
.include <bsd.subdir.mk>
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
#
|
#
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
ATF = ${.CURDIR}/../../../contrib/atf
|
|
||||||
|
|
||||||
CFLAGS+= -DHAVE_CONFIG_H
|
CFLAGS+= -DHAVE_CONFIG_H
|
||||||
|
|
||||||
WARNS?= 3
|
WARNS?= 3
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
.include <bsd.init.mk>
|
.include <bsd.init.mk>
|
||||||
|
|
||||||
|
ATF= ${.CURDIR:H:H:H}/contrib/atf
|
||||||
.PATH: ${ATF}/atf-sh
|
.PATH: ${ATF}/atf-sh
|
||||||
|
|
||||||
BINDIR= /usr/libexec
|
BINDIR= /usr/libexec
|
||||||
@ -42,4 +43,8 @@ LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c++
|
|||||||
LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c
|
LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c
|
||||||
LDADD+= -latf-c++ -latf-c
|
LDADD+= -latf-c++ -latf-c
|
||||||
|
|
||||||
|
.if ${MK_TESTS} != "no"
|
||||||
|
SUBDIR+= tests
|
||||||
|
.endif
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
3
libexec/atf/atf-check/Makefile.inc
Normal file
3
libexec/atf/atf-check/Makefile.inc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.include "../Makefile.inc"
|
12
libexec/atf/atf-check/tests/Makefile
Normal file
12
libexec/atf/atf-check/tests/Makefile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.include <bsd.init.mk>
|
||||||
|
|
||||||
|
TESTSDIR= ${TESTSBASE}/libexec/atf/atf-check
|
||||||
|
|
||||||
|
ATF= ${.CURDIR:H:H:H:H}/contrib/atf
|
||||||
|
.PATH: ${ATF}/atf-sh
|
||||||
|
|
||||||
|
ATF_TESTS_SH= atf-check_test
|
||||||
|
|
||||||
|
.include <atf.test.mk>
|
10
libexec/atf/tests/Makefile
Normal file
10
libexec/atf/tests/Makefile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
|
TESTSDIR= ${TESTSBASE}/libexec/atf
|
||||||
|
|
||||||
|
.PATH: ${.CURDIR:H:H:H}/tests
|
||||||
|
KYUAFILE= yes
|
||||||
|
|
||||||
|
.include <bsd.test.mk>
|
10
libexec/tests/Makefile
Normal file
10
libexec/tests/Makefile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
|
TESTSDIR= ${TESTSBASE}/libexec
|
||||||
|
|
||||||
|
.PATH: ${.CURDIR:H:H}/tests
|
||||||
|
KYUAFILE= yes
|
||||||
|
|
||||||
|
.include <bsd.test.mk>
|
@ -160,6 +160,7 @@ SUBDIR= alias \
|
|||||||
tar \
|
tar \
|
||||||
tcopy \
|
tcopy \
|
||||||
tee \
|
tee \
|
||||||
|
${_tests} \
|
||||||
tftp \
|
tftp \
|
||||||
time \
|
time \
|
||||||
tip \
|
tip \
|
||||||
@ -330,6 +331,7 @@ SUBDIR+= telnet
|
|||||||
|
|
||||||
.if ${MK_TESTS} != "no"
|
.if ${MK_TESTS} != "no"
|
||||||
_atf= atf
|
_atf= atf
|
||||||
|
_tests= tests
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${MK_TEXTPROC} != "no"
|
.if ${MK_TEXTPROC} != "no"
|
||||||
|
@ -25,6 +25,6 @@
|
|||||||
#
|
#
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
SUBDIR= atf-sh
|
SUBDIR= atf-sh tests
|
||||||
|
|
||||||
.include <bsd.subdir.mk>
|
.include <bsd.subdir.mk>
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
ATF= ${.CURDIR}/../../../contrib/atf
|
|
||||||
|
|
||||||
BINDIR?= /usr/bin
|
BINDIR?= /usr/bin
|
||||||
WARNS?= 3
|
WARNS?= 3
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
.include <bsd.init.mk>
|
.include <bsd.init.mk>
|
||||||
|
|
||||||
|
ATF= ${.CURDIR:H:H:H}/contrib/atf
|
||||||
.PATH: ${ATF}/atf-sh
|
.PATH: ${ATF}/atf-sh
|
||||||
|
|
||||||
PROG_CXX= atf-sh
|
PROG_CXX= atf-sh
|
||||||
@ -44,4 +45,8 @@ FILESGROUPS= SUBR
|
|||||||
SUBRDIR= ${SHAREDIR}/atf
|
SUBRDIR= ${SHAREDIR}/atf
|
||||||
SUBR= libatf-sh.subr
|
SUBR= libatf-sh.subr
|
||||||
|
|
||||||
|
.if ${MK_TESTS} != "no"
|
||||||
|
SUBDIR+= tests
|
||||||
|
.endif
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
18
usr.bin/atf/atf-sh/tests/Makefile
Normal file
18
usr.bin/atf/atf-sh/tests/Makefile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.include <bsd.init.mk>
|
||||||
|
|
||||||
|
TESTSDIR= ${TESTSBASE}/usr.bin/atf/atf-sh
|
||||||
|
|
||||||
|
ATF= ${.CURDIR:H:H:H:H}/contrib/atf
|
||||||
|
.PATH: ${ATF}/atf-sh
|
||||||
|
|
||||||
|
ATF_TESTS_SH+= atf_check_test
|
||||||
|
ATF_TESTS_SH+= config_test
|
||||||
|
ATF_TESTS_SH+= integration_test
|
||||||
|
ATF_TESTS_SH+= misc_helpers
|
||||||
|
ATF_TESTS_SH+= normalize_test
|
||||||
|
ATF_TESTS_SH+= tc_test
|
||||||
|
ATF_TESTS_SH+= tp_test
|
||||||
|
|
||||||
|
.include <atf.test.mk>
|
10
usr.bin/atf/tests/Makefile
Normal file
10
usr.bin/atf/tests/Makefile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
|
TESTSDIR= ${TESTSBASE}/usr.bin/atf
|
||||||
|
|
||||||
|
.PATH: ${.CURDIR:H:H:H}/tests
|
||||||
|
KYUAFILE= yes
|
||||||
|
|
||||||
|
.include <bsd.test.mk>
|
10
usr.bin/tests/Makefile
Normal file
10
usr.bin/tests/Makefile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
|
TESTSDIR= ${TESTSBASE}/usr.bin
|
||||||
|
|
||||||
|
.PATH: ${.CURDIR:H:H}/tests
|
||||||
|
KYUAFILE= yes
|
||||||
|
|
||||||
|
.include <bsd.test.mk>
|
Loading…
Reference in New Issue
Block a user