Index: projects/import-googletest-1.8.1/share/mk/Makefile =================================================================== --- projects/import-googletest-1.8.1/share/mk/Makefile (revision 344327) +++ projects/import-googletest-1.8.1/share/mk/Makefile (revision 344328) @@ -1,82 +1,83 @@ # $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/8/93 # Only parse this if executing make in this directory, not in other places # in src that lack a Makefile, such as sys/dev/*. Otherwise the MAKESYSPATH # will read this Makefile since it auto includes it into -I. .if ${.CURDIR} == ${.PARSEDIR} # Avoid creating a Makefile.depend here as it would get included anywhere # in the build, similar to the problem above. It would cause dirdeps.mk # to be included more times than desired. UPDATE_DEPENDFILE= no .include FILES= \ auto.obj.mk \ bsd.README \ bsd.arch.inc.mk \ bsd.clang-analyze.mk \ bsd.compiler.mk \ bsd.confs.mk \ bsd.cpu.mk \ bsd.crunchgen.mk \ bsd.dep.mk \ bsd.dirs.mk \ bsd.doc.mk \ bsd.dtb.mk \ bsd.endian.mk \ bsd.files.mk \ bsd.incs.mk \ bsd.info.mk \ bsd.init.mk \ bsd.kmod.mk \ bsd.lib.mk \ bsd.libnames.mk \ bsd.linker.mk \ bsd.links.mk \ bsd.man.mk \ bsd.mkopt.mk \ bsd.nls.mk \ bsd.obj.mk \ bsd.opts.mk \ bsd.own.mk \ bsd.port.mk \ bsd.port.options.mk \ bsd.port.post.mk \ bsd.port.pre.mk \ bsd.port.subdir.mk \ bsd.prog.mk \ bsd.progs.mk \ bsd.snmpmod.mk \ bsd.subdir.mk \ bsd.suffixes-posix.mk \ bsd.suffixes.mk \ bsd.symver.mk \ bsd.sys.mk \ bsd.test.mk \ dirdeps.mk \ dirdeps-options.mk \ gendirdeps.mk \ install-new.mk \ meta.autodep.mk \ meta.stage.mk \ meta.subdir.mk \ meta.sys.mk \ stage-install.sh \ sys.mk \ sys.dependfile.mk \ version_gen.awk FILESDIR= ${BINDIR}/mk .if ${MK_TESTS} != "no" FILES+= atf.test.mk +FILES+= googletest.test.mk FILES+= plain.test.mk FILES+= suite.test.mk FILES+= tap.test.mk .endif .include .endif # CURDIR == PARSEDIR Index: projects/import-googletest-1.8.1/share/mk/bsd.test.mk =================================================================== --- projects/import-googletest-1.8.1/share/mk/bsd.test.mk (revision 344327) +++ projects/import-googletest-1.8.1/share/mk/bsd.test.mk (revision 344328) @@ -1,102 +1,103 @@ # $FreeBSD$ # # Generic build infrastructure for test programs. # # This is the only public file that should be included by Makefiles when # tests are to be built. All other *.test.mk files are internal and not # to be included directly. .include ____: # Third-party software (kyua, etc) prefix. LOCALBASE?= /usr/local # Tests install directory TESTSDIR?= ${TESTSBASE}/${RELDIR:H} PACKAGE?= tests FILESGROUPS+= ${PACKAGE}FILES ${PACKAGE}FILESPACKAGE= ${PACKAGE} ${PACKAGE}FILESDIR= ${TESTSDIR} # List of subdirectories containing tests into which to recurse. This has the # same semantics as SUBDIR at build-time. However, the directories listed here # get registered into the run-time test suite definitions so that the test # engines know to recurse into these directories. # # In other words: list here any directories that contain test programs but use # SUBDIR for directories that may contain helper binaries and/or data files. TESTS_SUBDIRS?= # If defined, indicates that the tests built by the Makefile are not part of # the FreeBSD Test Suite. The implication of this is that the tests won't be # installed under /usr/tests/ and that Kyua won't be able to run them. #NOT_FOR_TEST_SUITE= # List of variables to pass to the tests at run-time via the environment. TESTS_ENV?= # Force all tests in a separate distribution file. # # We want this to be the case even when the distribution name is already # overridden. For example: we want the tests for programs in the 'games' # distribution to end up in the 'tests' distribution; the test programs # themselves have all the necessary logic to detect that the games are not # installed and thus won't cause false negatives. DISTRIBUTION:= tests # Ordered list of directories to construct the PATH for the tests. TESTS_PATH+= ${DESTDIR}/bin ${DESTDIR}/sbin \ ${DESTDIR}/usr/bin ${DESTDIR}/usr/sbin TESTS_ENV+= PATH=${TESTS_PATH:tW:C/ +/:/g} # Ordered list of directories to construct the LD_LIBRARY_PATH for the tests. TESTS_LD_LIBRARY_PATH+= ${DESTDIR}/lib ${DESTDIR}/usr/lib TESTS_ENV+= LD_LIBRARY_PATH=${TESTS_LD_LIBRARY_PATH:tW:C/ +/:/g} # List of all tests being built. The various *.test.mk modules extend this # variable as needed. _TESTS= # Pull in the definitions of all supported test interfaces. .include +.include .include .include # Sort the tests alphabetically, so the results are deterministically formed # across runs. _TESTS:= ${_TESTS:O} # kyua automatically descends directories; only run make check on the # top-level directory .if !make(check) .for ts in ${TESTS_SUBDIRS} .if empty(SUBDIR:M${ts}) SUBDIR+= ${ts} .endif .endfor SUBDIR_PARALLEL= t .endif # it is rare for test cases to have man pages .if !defined(MAN) MAN= .endif .if !defined(NOT_FOR_TEST_SUITE) .include .endif .if !target(realcheck) realcheck: .PHONY @echo "$@ not defined; skipping" .endif beforecheck realcheck aftercheck check: .PHONY .ORDER: beforecheck realcheck aftercheck check: beforecheck realcheck aftercheck .include Index: projects/import-googletest-1.8.1/share/mk/googletest.test.mk =================================================================== --- projects/import-googletest-1.8.1/share/mk/googletest.test.mk (nonexistent) +++ projects/import-googletest-1.8.1/share/mk/googletest.test.mk (revision 344328) @@ -0,0 +1,38 @@ +# $FreeBSD$ +# +# You must include bsd.test.mk instead of this file from your Makefile. +# +# Logic to build and install GoogleTest based test programs. +# +# GoogleTest is a C++ test framework, thus, it does not describe/articulate how +# to write tests in other languages, e.g., C or shell, unlike the ATF, plain, +# and TAP raw test interfaces. +# +# For now this is a thin wrapper around the `plain` test interface, but in the +# future this will rely on a newer version of kyua which will integrate in +# GoogleTest support. + +.if !target(____) +.error googletest.test.mk cannot be included directly. +.endif + +# List of GoogleTest test programs to build. +# +# Programs listed here are built according to the semantics of bsd.progs.mk for +# PROGS_CXX. +# +# Test programs registered in this manner are set to be installed into TESTSDIR +# (which should be overridden by the Makefile) and are not required to provide a +# manpage. +GTESTS?= + +.if !empty(GTESTS) +PROGS_CXX+= ${GTESTS} +_TESTS+= ${GTESTS} +.for _T in ${GTESTS} +BINDIR.${_T}= ${TESTSDIR} +MAN.${_T}?= # empty +SRCS.${_T}?= ${_T}.cc +TEST_INTERFACE.${_T}= plain +.endfor +.endif Property changes on: projects/import-googletest-1.8.1/share/mk/googletest.test.mk ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property