From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 14:33:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2A7C564A; Fri, 8 Nov 2013 14:33:47 +0000 (UTC) (envelope-from jmmv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 130B32D20; Fri, 8 Nov 2013 14:33:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8EXl6l017794; Fri, 8 Nov 2013 14:33:47 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8EXfOD017761; Fri, 8 Nov 2013 14:33:41 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201311081433.rA8EXfOD017761@svn.freebsd.org> From: Julio Merino Date: Fri, 8 Nov 2013 14:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257853 - in head: etc/mtree lib/atf lib/atf/libatf-c lib/atf/libatf-c++ lib/atf/libatf-c++/tests lib/atf/libatf-c/tests lib/atf/tests lib/atf/tests/test-programs libexec libexec/atf li... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 14:33:47 -0000 Author: jmmv Date: Fri Nov 8 14:33:41 2013 New Revision: 257853 URL: http://svnweb.freebsd.org/changeset/base/257853 Log: Build and install the atf tests. Reviewed by: freebsd-testing Approved by: rpaulo (mentor) Added: head/lib/atf/libatf-c++/Makefile.inc (contents, props changed) head/lib/atf/libatf-c++/tests/ head/lib/atf/libatf-c++/tests/Makefile (contents, props changed) head/lib/atf/libatf-c/Makefile.inc (contents, props changed) head/lib/atf/libatf-c/tests/ head/lib/atf/libatf-c/tests/Makefile (contents, props changed) head/lib/atf/tests/ head/lib/atf/tests/Makefile (contents, props changed) head/lib/atf/tests/test-programs/ head/lib/atf/tests/test-programs/Makefile (contents, props changed) head/libexec/atf/atf-check/Makefile.inc (contents, props changed) head/libexec/atf/atf-check/tests/ head/libexec/atf/atf-check/tests/Makefile (contents, props changed) head/libexec/atf/tests/ head/libexec/atf/tests/Makefile (contents, props changed) head/libexec/tests/ head/libexec/tests/Makefile (contents, props changed) head/usr.bin/atf/atf-sh/tests/ head/usr.bin/atf/atf-sh/tests/Makefile (contents, props changed) head/usr.bin/atf/tests/ head/usr.bin/atf/tests/Makefile (contents, props changed) head/usr.bin/tests/ head/usr.bin/tests/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/lib/atf/Makefile head/lib/atf/Makefile.inc head/lib/atf/libatf-c++/Makefile head/lib/atf/libatf-c/Makefile head/libexec/Makefile head/libexec/atf/Makefile head/libexec/atf/Makefile.inc head/libexec/atf/atf-check/Makefile head/usr.bin/Makefile head/usr.bin/atf/Makefile head/usr.bin/atf/Makefile.inc head/usr.bin/atf/atf-sh/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Fri Nov 8 14:29:06 2013 (r257852) +++ head/etc/mtree/BSD.tests.dist Fri Nov 8 14:33:41 2013 (r257853) @@ -6,7 +6,27 @@ /set type=dir uname=root gname=wheel mode=0755 . lib + atf + libatf-c + .. + libatf-c++ + .. + test-programs + .. + .. libcrypt .. .. + libexec + atf + atf-check + .. + .. + .. + usr.bin + atf + atf-sh + .. + .. + .. .. Modified: head/lib/atf/Makefile ============================================================================== --- head/lib/atf/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/lib/atf/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -27,9 +27,13 @@ .include -SUBDIR= \ - libatf-c \ - libatf-c++ +SUBDIR= libatf-c \ + libatf-c++ \ + ${_tests} + +.if ${MK_TESTS} != "no" +_tests= tests +.endif .ORDER: ${SUBDIR} Modified: head/lib/atf/Makefile.inc ============================================================================== --- head/lib/atf/Makefile.inc Fri Nov 8 14:29:06 2013 (r257852) +++ head/lib/atf/Makefile.inc Fri Nov 8 14:33:41 2013 (r257853) @@ -25,8 +25,6 @@ # # $FreeBSD$ -ATF= ${.CURDIR}/../../../contrib/atf - _CFLAGS:= ${CFLAGS} _CPPFLAGS:= ${CPPFLAGS} _CXXFLAGS:= ${CXXFLAGS} Modified: head/lib/atf/libatf-c++/Makefile ============================================================================== --- head/lib/atf/libatf-c++/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/lib/atf/libatf-c++/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -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 Added: head/lib/atf/libatf-c++/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/libatf-c++/Makefile.inc Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Added: head/lib/atf/libatf-c++/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/libatf-c++/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,47 @@ +# $FreeBSD$ + +.include + +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 Modified: head/lib/atf/libatf-c/Makefile ============================================================================== --- head/lib/atf/libatf-c/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/lib/atf/libatf-c/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -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 Added: head/lib/atf/libatf-c/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/libatf-c/Makefile.inc Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Added: head/lib/atf/libatf-c/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/libatf-c/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,62 @@ +# $FreeBSD$ + +.include + +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 Added: head/lib/atf/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/lib/atf + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +SUBDIR= test-programs + +.include Added: head/lib/atf/tests/test-programs/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/tests/test-programs/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +.include + +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 Modified: head/libexec/Makefile ============================================================================== --- head/libexec/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/libexec/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -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 Modified: head/libexec/atf/Makefile ============================================================================== --- head/libexec/atf/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/libexec/atf/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -25,6 +25,6 @@ # # $FreeBSD$ -SUBDIR= atf-check +SUBDIR= atf-check tests .include Modified: head/libexec/atf/Makefile.inc ============================================================================== --- head/libexec/atf/Makefile.inc Fri Nov 8 14:29:06 2013 (r257852) +++ head/libexec/atf/Makefile.inc Fri Nov 8 14:33:41 2013 (r257853) @@ -25,8 +25,6 @@ # # $FreeBSD$ -ATF = ${.CURDIR}/../../../contrib/atf - CFLAGS+= -DHAVE_CONFIG_H WARNS?= 3 Modified: head/libexec/atf/atf-check/Makefile ============================================================================== --- head/libexec/atf/atf-check/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/libexec/atf/atf-check/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -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/ LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c LDADD+= -latf-c++ -latf-c +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/libexec/atf/atf-check/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/atf/atf-check/Makefile.inc Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Added: head/libexec/atf/atf-check/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/atf/atf-check/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -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 Added: head/libexec/atf/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/atf/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/libexec/atf + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include Added: head/libexec/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/libexec + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/usr.bin/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -160,6 +160,7 @@ SUBDIR= alias \ tar \ tcopy \ tee \ + ${_tests} \ tftp \ time \ tip \ @@ -330,6 +331,7 @@ SUBDIR+= telnet .if ${MK_TESTS} != "no" _atf= atf +_tests= tests .endif .if ${MK_TEXTPROC} != "no" Modified: head/usr.bin/atf/Makefile ============================================================================== --- head/usr.bin/atf/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/usr.bin/atf/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -25,6 +25,6 @@ # # $FreeBSD$ -SUBDIR= atf-sh +SUBDIR= atf-sh tests .include Modified: head/usr.bin/atf/Makefile.inc ============================================================================== --- head/usr.bin/atf/Makefile.inc Fri Nov 8 14:29:06 2013 (r257852) +++ head/usr.bin/atf/Makefile.inc Fri Nov 8 14:33:41 2013 (r257853) @@ -1,6 +1,4 @@ # $FreeBSD$ -ATF= ${.CURDIR}/../../../contrib/atf - BINDIR?= /usr/bin WARNS?= 3 Modified: head/usr.bin/atf/atf-sh/Makefile ============================================================================== --- head/usr.bin/atf/atf-sh/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/usr.bin/atf/atf-sh/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -27,6 +27,7 @@ .include +ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF}/atf-sh PROG_CXX= atf-sh @@ -44,4 +45,8 @@ FILESGROUPS= SUBR SUBRDIR= ${SHAREDIR}/atf SUBR= libatf-sh.subr +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/usr.bin/atf/atf-sh/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/atf/atf-sh/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +.include + +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 Added: head/usr.bin/atf/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/atf/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/usr.bin/atf + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include Added: head/usr.bin/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/usr.bin + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include