]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/examples/tests/tests/googletest/Makefile
MFC r345203,r345205,r345353,r345645,r345708,r345709,r345735,r345770,r346574,r346576:
[FreeBSD/FreeBSD.git] / share / examples / tests / tests / googletest / Makefile
1 # $FreeBSD$
2 #
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.
5
6 # The release package to use for the tests contained within the directory
7 #
8 # This applies to components which rely on ^/projects/release-pkg support
9 # (see UPDATING XXXXXXXXX / svn revision r298107).
10 PACKAGE=        tests
11
12 # Directory into which the Kyuafile provided by this directory will be
13 # installed.
14 #
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.
18 #
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
22
23 .PATH: ${SRCTOP}/contrib/googletest/googletest/samples
24
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
33
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
38
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}
42
43
44 .for t in ${GTESTS}
45 .if ${GTEST_MAIN_REQ_TESTS:M$t}
46 LIBADD.$t+=     gtest_main
47 .else
48 LIBADD.$t+=     gtest
49 .endif
50 SRCS.$t+=       $t.cc
51 .endfor
52
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
58
59 .include <bsd.test.mk>