Skip to content

Commit

Permalink
build,test: refacor coverage-test to implicit dependancy
Browse files Browse the repository at this point in the history
  • Loading branch information
refack committed Jan 10, 2019
1 parent 29d3d1e commit 6f9fc90
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ coverage-clean:
# For C++ coverage reporting, this needs to be run in conjunction with configure # For C++ coverage reporting, this needs to be run in conjunction with configure
# --coverage. html coverage reports will be created under coverage/ # --coverage. html coverage reports will be created under coverage/
# Related CI job: node-test-commit-linux-coverage # Related CI job: node-test-commit-linux-coverage
coverage: coverage-test ## Run the tests and generate a coverage report. coverage: # Run the tests and generate a coverage report.
$(MAKE) coverage-build
$(MAKE) coverage-test


.PHONY: coverage-build .PHONY: coverage-build
coverage-build: all coverage-build: all
Expand All @@ -218,7 +220,9 @@ coverage-build: all
$(MAKE) $(MAKE)


.PHONY: coverage-test .PHONY: coverage-test
coverage-test: coverage-build # Implicitly dependant on the node binary built with '--coverage'.
coverage-test:
$(NODE) -p "process.exit(!process.config.variables.coverage)"
$(RM) -r out/$(BUILDTYPE)/.coverage $(RM) -r out/$(BUILDTYPE)/.coverage
$(RM) -r .cov_tmp $(RM) -r .cov_tmp
$(RM) out/$(BUILDTYPE)/obj.target/node/gen/*.gcda $(RM) out/$(BUILDTYPE)/obj.target/node/gen/*.gcda
Expand Down

0 comments on commit 6f9fc90

Please sign in to comment.