From 17b80845b0ba13495186831d3505af8c20eeb6ac Mon Sep 17 00:00:00 2001 From: jmmv Date: Sat, 28 Dec 2013 23:08:58 +0000 Subject: 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. --- libexec/Makefile | 2 ++ libexec/atf/Makefile | 2 +- libexec/atf/Makefile.inc | 2 -- libexec/atf/atf-check/Makefile | 5 +++++ libexec/atf/atf-check/Makefile.inc | 3 +++ libexec/atf/atf-check/tests/Makefile | 12 ++++++++++++ libexec/atf/tests/Makefile | 10 ++++++++++ libexec/tests/Makefile | 10 ++++++++++ 8 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 libexec/atf/atf-check/Makefile.inc create mode 100644 libexec/atf/atf-check/tests/Makefile create mode 100644 libexec/atf/tests/Makefile create mode 100644 libexec/tests/Makefile (limited to 'libexec') diff --git a/libexec/Makefile b/libexec/Makefile index 576335f..cf5c120 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -28,6 +28,7 @@ SUBDIR= ${_atf} \ talkd \ tcpd \ ${_telnetd} \ + ${_tests} \ tftpd \ ${_tftp-proxy} \ ulog-helper \ @@ -74,6 +75,7 @@ _telnetd= telnetd .if ${MK_TESTS} != "no" _atf= atf +_tests= tests .endif .include diff --git a/libexec/atf/Makefile b/libexec/atf/Makefile index dc222c3..6749db5 100644 --- a/libexec/atf/Makefile +++ b/libexec/atf/Makefile @@ -25,6 +25,6 @@ # # $FreeBSD$ -SUBDIR= atf-check +SUBDIR= atf-check tests .include diff --git a/libexec/atf/Makefile.inc b/libexec/atf/Makefile.inc index a28f546..392bbb2 100644 --- a/libexec/atf/Makefile.inc +++ b/libexec/atf/Makefile.inc @@ -25,8 +25,6 @@ # # $FreeBSD$ -ATF = ${.CURDIR}/../../../contrib/atf - CFLAGS+= -DHAVE_CONFIG_H WARNS?= 3 diff --git a/libexec/atf/atf-check/Makefile b/libexec/atf/atf-check/Makefile index fafb1e4..0cfa863 100644 --- a/libexec/atf/atf-check/Makefile +++ b/libexec/atf/atf-check/Makefile @@ -27,6 +27,7 @@ .include +ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF}/atf-sh BINDIR= /usr/libexec @@ -42,4 +43,8 @@ LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c++ LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c LDADD+= -latf-c++ -latf-c +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include diff --git a/libexec/atf/atf-check/Makefile.inc b/libexec/atf/atf-check/Makefile.inc new file mode 100644 index 0000000..265f86d --- /dev/null +++ b/libexec/atf/atf-check/Makefile.inc @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" diff --git a/libexec/atf/atf-check/tests/Makefile b/libexec/atf/atf-check/tests/Makefile new file mode 100644 index 0000000..0f237e6 --- /dev/null +++ b/libexec/atf/atf-check/tests/Makefile @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.include + +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 diff --git a/libexec/atf/tests/Makefile b/libexec/atf/tests/Makefile new file mode 100644 index 0000000..7aa9601 --- /dev/null +++ b/libexec/atf/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/libexec/atf + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include diff --git a/libexec/tests/Makefile b/libexec/tests/Makefile new file mode 100644 index 0000000..665efab --- /dev/null +++ b/libexec/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/libexec + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include -- cgit v1.1