Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 361c71b

Browse files
authored
Merge pull request #63 from openweave/bug/github-61
Address make coverage with build jobs > 1 results in duplicative weave unit test output issue.
2 parents cb07d08 + 0bf344e commit 361c71b

File tree

7 files changed

+50
-14
lines changed

7 files changed

+50
-14
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ DISTCHECK_CONFIGURE_FLAGS = `chmod u+w .. ../third_party`
206206

207207
DISTCHECK_CONFIGURE_FLAGS += --without-bluez --without-happy
208208

209-
dist distcheck distdir install-headers: $(BUILT_SOURCES)
209+
all-recursive check-recursive coverage-recursive install-recursive pretty-recursive pretty-check-recursive dist distcheck distdir install-headers: $(BUILT_SOURCES)
210210

211211
dist-hook: $(distdir)/.dist-version
212212

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ $(distdir)/.dist-version: $(builddir)/.local-version force
12251225
$(distdir)/.dist-version $(builddir)/.local-version:
12261226
$(call check-file,$(@F))
12271227

1228-
dist distcheck distdir install-headers: $(BUILT_SOURCES)
1228+
all-recursive check-recursive coverage-recursive install-recursive pretty-recursive pretty-check-recursive dist distcheck distdir install-headers: $(BUILT_SOURCES)
12291229

12301230
dist-hook: $(distdir)/.dist-version
12311231

src/test-apps/Makefile.am

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,9 @@ endif
359359

360360
check_PROGRAMS += \
361361
TestTDM \
362-
TestPathStore \
363-
TestWdmUpdateEncoder \
364-
TestWdmUpdateResponse \
362+
TestPathStore \
363+
TestWdmUpdateEncoder \
364+
TestWdmUpdateResponse \
365365
$(NULL)
366366

367367
if WEAVE_BUILD_WARM
@@ -402,7 +402,6 @@ check_SCRIPTS += \
402402
$(NULL)
403403
endif # WEAVE_WITH_JAVA
404404

405-
406405
# Test applications that should be built but not installed that
407406
# require no network or complicated setup and should always be
408407
# built to ensure overall "build sanity".
@@ -1596,7 +1595,7 @@ $(WEAVE_LIBS_COVERAGE_SOURCE):
15961595
$(WEAVE_LIBS_COVERAGE_BUNDLE):
15971596
$(call create-directory)
15981597

1599-
$(WEAVE_COVERAGE_INFO): check | $(WEAVE_COVERAGE_BUNDLE)
1598+
$(WEAVE_COVERAGE_INFO): check-local | $(WEAVE_COVERAGE_BUNDLE)
16001599
$(call generate-coverage-report,${abs_top_builddir})
16011600

16021601
# collect all the *.gcno & *gcda files of libWeave.a for Weave Library coverage analysis, rename the *h file paths to make it a clean report
@@ -1618,7 +1617,7 @@ $(WEAVE_LIBS_COVERAGE_INFO): $(WEAVE_COVERAGE_INFO) | $(WEAVE_LIBS_COVERAGE_BUND
16181617
$(NL_V_GENHTML)$(GENHTML) $(NL_V_GENHTML_FLAGS) --config-file="$(abs_top_nlbuild_autotools_dir)/etc/lcov.config" $(WEAVE_LIBS_COVERAGE_INFO).clean --output-directory $(WEAVE_LIBS_COVERAGE_BUNDLE)
16191618
$(AM_V_at)rm -rf $(WEAVE_LIBS_COVERAGE_SOURCE)
16201619

1621-
coverage: $(WEAVE_LIBS_COVERAGE_INFO)
1620+
coverage-local: $(WEAVE_LIBS_COVERAGE_INFO)
16221621

16231622
clean-local: clean-local-coverage
16241623

src/test-apps/Makefile.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8507,10 +8507,10 @@ distclean-generic:
85078507
maintainer-clean-generic:
85088508
@echo "This command is intended for maintainers to use"
85098509
@echo "it deletes files that may require special tools to rebuild."
8510-
@WEAVE_BUILD_TESTS_FALSE@uninstall-local:
85118510
@WEAVE_BUILD_COVERAGE_FALSE@clean-local:
85128511
@WEAVE_BUILD_COVERAGE_REPORTS_FALSE@clean-local:
85138512
@WEAVE_BUILD_TESTS_FALSE@clean-local:
8513+
@WEAVE_BUILD_TESTS_FALSE@uninstall-local:
85148514
@WEAVE_BUILD_TESTS_FALSE@install-exec-local:
85158515
clean: clean-recursive
85168516

@@ -8693,7 +8693,7 @@ include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
86938693
@WEAVE_BUILD_COVERAGE_REPORTS_TRUE@@WEAVE_BUILD_COVERAGE_TRUE@@WEAVE_BUILD_TESTS_TRUE@$(WEAVE_LIBS_COVERAGE_BUNDLE):
86948694
@WEAVE_BUILD_COVERAGE_REPORTS_TRUE@@WEAVE_BUILD_COVERAGE_TRUE@@WEAVE_BUILD_TESTS_TRUE@ $(call create-directory)
86958695

8696-
@WEAVE_BUILD_COVERAGE_REPORTS_TRUE@@WEAVE_BUILD_COVERAGE_TRUE@@WEAVE_BUILD_TESTS_TRUE@$(WEAVE_COVERAGE_INFO): check | $(WEAVE_COVERAGE_BUNDLE)
8696+
@WEAVE_BUILD_COVERAGE_REPORTS_TRUE@@WEAVE_BUILD_COVERAGE_TRUE@@WEAVE_BUILD_TESTS_TRUE@$(WEAVE_COVERAGE_INFO): check-local | $(WEAVE_COVERAGE_BUNDLE)
86978697
@WEAVE_BUILD_COVERAGE_REPORTS_TRUE@@WEAVE_BUILD_COVERAGE_TRUE@@WEAVE_BUILD_TESTS_TRUE@ $(call generate-coverage-report,${abs_top_builddir})
86988698

86998699
# collect all the *.gcno & *gcda files of libWeave.a for Weave Library coverage analysis, rename the *h file paths to make it a clean report
@@ -8715,7 +8715,7 @@ include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
87158715
@WEAVE_BUILD_COVERAGE_REPORTS_TRUE@@WEAVE_BUILD_COVERAGE_TRUE@@WEAVE_BUILD_TESTS_TRUE@ $(NL_V_GENHTML)$(GENHTML) $(NL_V_GENHTML_FLAGS) --config-file="$(abs_top_nlbuild_autotools_dir)/etc/lcov.config" $(WEAVE_LIBS_COVERAGE_INFO).clean --output-directory $(WEAVE_LIBS_COVERAGE_BUNDLE)
87168716
@WEAVE_BUILD_COVERAGE_REPORTS_TRUE@@WEAVE_BUILD_COVERAGE_TRUE@@WEAVE_BUILD_TESTS_TRUE@ $(AM_V_at)rm -rf $(WEAVE_LIBS_COVERAGE_SOURCE)
87178717

8718-
@WEAVE_BUILD_COVERAGE_REPORTS_TRUE@@WEAVE_BUILD_COVERAGE_TRUE@@WEAVE_BUILD_TESTS_TRUE@coverage: $(WEAVE_LIBS_COVERAGE_INFO)
8718+
@WEAVE_BUILD_COVERAGE_REPORTS_TRUE@@WEAVE_BUILD_COVERAGE_TRUE@@WEAVE_BUILD_TESTS_TRUE@coverage-local: $(WEAVE_LIBS_COVERAGE_INFO)
87198719

87208720
@WEAVE_BUILD_COVERAGE_REPORTS_TRUE@@WEAVE_BUILD_COVERAGE_TRUE@@WEAVE_BUILD_TESTS_TRUE@clean-local: clean-local-coverage
87218721

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.2
1+
1.6.3

third_party/nlbuild-autotools/repo/CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
1.6.3 (2018-10-19)
2+
3+
* Added support for coverage-local and check-local targets. Added
4+
documentation for all coverage-related targets.
5+
16
1.6.2 (2018-10-09)
27

38
* Take a different approach to version flapping against 'make

third_party/nlbuild-autotools/repo/automake/post/rules/coverage.am

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#
2+
# Copyright 2018 Google LLC. All Rights Reserved.
23
# Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
34
#
45
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -26,9 +27,40 @@
2627
# invocations. The 'check-am' and '$(BUILT_SOURCES)' are the key
2728
# automake-specific dependencies to ensure that happens.
2829
#
30+
# This defines the following make targets:
31+
#
32+
# coverage:
33+
# Execute local and recursive coverage targets across the
34+
# project sub-tree at the current invocation point.
35+
#
36+
# This target is intended to be user-visibile and -invoked.
37+
#
38+
# coverage-local:
39+
# Execute local coverage targets at the current invocation point.
40+
#
41+
# This target is intended to be user-visibile and -invoked.
42+
#
43+
# coverage-recursive:
44+
# Recursively execute the 'coverage' target across the
45+
# project sub-tree at the current invocation point.
46+
#
47+
# This target is NOT intended to be user-visibile and -invoked.
48+
#
49+
# check-local:
50+
# Alias for the 'check-am' target. Execute local check
51+
# targets at the current invocation point. Local coverage targets
52+
# may depend on this to ensure local tests are made before
53+
# coverage targets are made.
54+
#
55+
# This target is intended to be user-visibile and -invoked.
56+
#
57+
58+
.PHONY: coverage coverage-recursive coverage-local check-local
59+
60+
check-local: check-am
61+
62+
coverage: coverage-local
2963

30-
.PHONY: coverage coverage-recursive
31-
3264
coverage: coverage-recursive
3365

3466
coverage: check-am

0 commit comments

Comments
 (0)