2 # Copyright 2016-2020 The nlfaultinjection Authors.
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
19 # This file is the GNU automake template for the
20 # Nest Labs Fault Injection unit tests
22 include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
25 # Local headers to build against and distribute but not to install
26 # since they are not part of the package.
32 # Other files we do want to distribute with the NLFAULTINJECTION SDK.
37 if NLFAULTINJECTION_BUILD_TESTS
38 # C preprocessor option flags that will apply to all compiled objects in this
42 -I$(top_srcdir)/include \
46 $(top_builddir)/src/libnlfaultinjection.a \
49 # Test applications that should be run when the 'check' target is run.
52 fault-injection-test \
55 # Test applications and scripts that should be built and run when the
56 # 'check' target is run.
62 # The additional environment variables and their values that will be
63 # made available to all programs and scripts in TESTS.
68 # Source, compiler, and linker options for test programs.
70 fault_injection_test_LDADD = $(COMMON_LDADD)
71 fault_injection_test_SOURCES = TestFaultInjection.cpp
74 # Foreign make dependencies
77 NLFOREIGN_SUBDIR_DEPENDENCIES = \
78 $(NLUNIT_TEST_FOREIGN_SUBDIR_DEPENDENCY) \
81 if NLFAULTINJECTION_BUILD_COVERAGE
82 CLEANFILES = $(wildcard *.gcda *.gcno)
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.
89 NLFAULTINJECTION_COVERAGE_BUNDLE = ${abs_builddir}/${PACKAGE}${NL_COVERAGE_BUNDLE_SUFFIX}
90 NLFAULTINJECTION_COVERAGE_INFO = ${NLFAULTINJECTION_COVERAGE_BUNDLE}/${PACKAGE}${NL_COVERAGE_INFO_SUFFIX}
92 $(NLFAULTINJECTION_COVERAGE_BUNDLE):
93 $(call create-directory)
95 $(NLFAULTINJECTION_COVERAGE_INFO): check-local | $(NLFAULTINJECTION_COVERAGE_BUNDLE)
96 $(call generate-coverage-report,${top_builddir})
98 coverage-local: $(NLFAULTINJECTION_COVERAGE_INFO)
100 clean-local: clean-local-coverage
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
109 include $(abs_top_nlbuild_autotools_dir)/automake/post.am