Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / nlfaultinjection / repo / tests / Makefile.am
1 #
2 #    Copyright 2016-2020 The nlfaultinjection Authors.
3 #
4 #    Licensed under the Apache License, Version 2.0 (the "License");
5 #    you may not use this file except in compliance with the License.
6 #    You may obtain a copy of the License at
7 #
8 #    http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #    Unless required by applicable law or agreed to in writing, software
11 #    distributed under the License is distributed on an "AS IS" BASIS,
12 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #    See the License for the specific language governing permissions and
14 #    limitations under the License.
15 #
16
17 #
18 #    Description:
19 #      This file is the GNU automake template for the
20 #      Nest Labs Fault Injection unit tests
21
22 include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
23
24 #
25 # Local headers to build against and distribute but not to install
26 # since they are not part of the package.
27 #
28 noinst_HEADERS                                 = \
29     $(NULL)
30
31 #
32 # Other files we do want to distribute with the NLFAULTINJECTION SDK.
33 #
34 EXTRA_DIST                                     = \
35     $(NULL)
36
37 if NLFAULTINJECTION_BUILD_TESTS
38 # C preprocessor option flags that will apply to all compiled objects in this
39 # makefile.
40
41 AM_CPPFLAGS                                    = \
42     -I$(top_srcdir)/include                      \
43     $(NULL)
44
45 COMMON_LDADD                                   = \
46         $(top_builddir)/src/libnlfaultinjection.a    \
47     $(NULL)
48
49 # Test applications that should be run when the 'check' target is run.
50
51 check_PROGRAMS                                 = \
52     fault-injection-test                         \
53     $(NULL)
54
55 # Test applications and scripts that should be built and run when the
56 # 'check' target is run.
57
58 TESTS                                          = \
59     $(check_PROGRAMS)                            \
60     $(NULL)
61
62 # The additional environment variables and their values that will be
63 # made available to all programs and scripts in TESTS.
64
65 TESTS_ENVIRONMENT                              = \
66     $(NULL)
67
68 # Source, compiler, and linker options for test programs.
69
70 fault_injection_test_LDADD                         = $(COMMON_LDADD)
71 fault_injection_test_SOURCES                       = TestFaultInjection.cpp
72
73 #
74 # Foreign make dependencies
75 #
76
77 NLFOREIGN_SUBDIR_DEPENDENCIES                  = \
78    $(NLUNIT_TEST_FOREIGN_SUBDIR_DEPENDENCY)      \
79    $(NULL)
80
81 if NLFAULTINJECTION_BUILD_COVERAGE
82 CLEANFILES                                     = $(wildcard *.gcda *.gcno)
83
84 if NLFAULTINJECTION_BUILD_COVERAGE_REPORTS
85 # The bundle should positively be qualified with the absolute build
86 # path. Otherwise, VPATH will get auto-prefixed to it if there is
87 # already such a directory in the non-colocated source tree.
88
89 NLFAULTINJECTION_COVERAGE_BUNDLE                           = ${abs_builddir}/${PACKAGE}${NL_COVERAGE_BUNDLE_SUFFIX}
90 NLFAULTINJECTION_COVERAGE_INFO                             = ${NLFAULTINJECTION_COVERAGE_BUNDLE}/${PACKAGE}${NL_COVERAGE_INFO_SUFFIX}
91
92 $(NLFAULTINJECTION_COVERAGE_BUNDLE):
93         $(call create-directory)
94
95 $(NLFAULTINJECTION_COVERAGE_INFO): check-local | $(NLFAULTINJECTION_COVERAGE_BUNDLE)
96         $(call generate-coverage-report,${top_builddir})
97
98 coverage-local: $(NLFAULTINJECTION_COVERAGE_INFO)
99
100 clean-local: clean-local-coverage
101
102 .PHONY: clean-local-coverage
103 clean-local-coverage:
104         -$(AM_V_at)rm -rf $(NLFAULTINJECTION_COVERAGE_BUNDLE)
105 endif # NLFAULTINJECTION_BUILD_COVERAGE_REPORTS
106 endif # NLFAULTINJECTION_BUILD_COVERAGE
107 endif # NLFAULTINJECTION_BUILD_TESTS
108
109 include $(abs_top_nlbuild_autotools_dir)/automake/post.am