3 # This Makefile differs from the other examples, in the sense that its purpose
4 # is to install the upstream provided googletest sample unit tests.
6 # The release package to use for the tests contained within the directory
8 # This applies to components which rely on ^/projects/release-pkg support
9 # (see UPDATING XXXXXXXXX / svn revision r298107).
12 # Directory into which the Kyuafile provided by this directory will be
15 # This is always a subdirectory of ${TESTSBASE}/. The remainder of the
16 # path has to match the relative path within the source tree in which
17 # these files are found modulo the tests/ component at the end.
19 # For example: if this Makefile were in src/bin/cp/tests/, its TESTSDIR
20 # would point at ${TESTSBASE}/bin/cp/.
21 TESTSDIR= ${TESTSBASE}/share/examples/tests/googletest
23 .PATH: ${SRCTOP}/contrib/googletest/googletest/samples
25 GTEST_MAIN_REQ_TESTS+= sample1_unittest
26 GTEST_MAIN_REQ_TESTS+= sample2_unittest
27 GTEST_MAIN_REQ_TESTS+= sample3_unittest
28 GTEST_MAIN_REQ_TESTS+= sample4_unittest
29 GTEST_MAIN_REQ_TESTS+= sample5_unittest
30 GTEST_MAIN_REQ_TESTS+= sample6_unittest
31 GTEST_MAIN_REQ_TESTS+= sample7_unittest
32 GTEST_MAIN_REQ_TESTS+= sample8_unittest
34 # sample9_unittest's `CustomOutputTest.Fails` fails intentionally to illustrate
35 # how output format can be adjusted with command-line parameters.
36 #GTEST_REQ_TESTS+= sample9_unittest
37 GTEST_REQ_TESTS+= sample10_unittest
39 # List of test programs to build. Note that we can build more than one
40 # test from a single directory, and this is expected.
41 GTESTS+= ${GTEST_MAIN_REQ_TESTS} ${GTEST_REQ_TESTS}
45 .if ${GTEST_MAIN_REQ_TESTS:M$t}
46 LIBADD.$t+= gtest_main
53 # Additional sources for sample testcase 1, 2, 4, and 5.
54 SRCS.sample1_unittest+= sample1.cc
55 SRCS.sample2_unittest+= sample2.cc
56 SRCS.sample4_unittest+= sample4.cc
57 SRCS.sample5_unittest+= sample1.cc
59 .include <bsd.test.mk>