Code coverage measurements require R14 bug23568
authorDavid Wragg <david@rabbitmq.com>
Tue, 01 Feb 2011 14:54:28 +0000
branchbug23568
changeset 251f083a765ca23
parent 250 7136f91bde70
child 252 a3611ba1bb84
Code coverage measurements require R14
common.mk
do-package.mk
     1.1 --- a/common.mk	Tue Feb 01 13:09:43 2011 +0000
     1.2 +++ b/common.mk	Tue Feb 01 14:54:28 2011 +0000
     1.3 @@ -124,3 +124,11 @@
     1.4  all-releasable::
     1.5  all-packages::
     1.6  clean-all-packages::
     1.7 +
     1.8 +# A target to assert that we have erlang R14A or later
     1.9 +.PHONY: assert-erlang-r14
    1.10 +assert-erlang-r14:
    1.11 +	if [ "`erl -noshell -eval 'io:format(lists:map(fun erlang:list_to_integer/1, string:tokens(erlang:system_info(version), ".")) >= [5,8]),halt().'`" != true ] ; then \
    1.12 +	  echo "Need Erlang/OTP R14A or higher" ; \
    1.13 +	  exit 1 ; \
    1.14 +	fi
     2.1 --- a/do-package.mk	Tue Feb 01 13:09:43 2011 +0000
     2.2 +++ b/do-package.mk	Tue Feb 01 14:54:28 2011 +0000
     2.3 @@ -321,8 +321,9 @@
     2.4  $(PACKAGE_DIR)+test: $(PACKAGE_DIR)/dist/.done $(TEST_EBIN_BEAMS) $(PACKAGE_DIR)+pre-test-checks
     2.5  	$(call run_tests)
     2.6  
     2.7 +# Running the coverage tests required Erlang/OTP R14
     2.8  .PHONY: $(PACKAGE_DIR)+coverage
     2.9 -$(PACKAGE_DIR)+coverage: $(PACKAGE_DIR)/dist/.done $(COVERAGE_PATH)/dist/.done $(TEST_EBIN_BEAMS) $(PACKAGE_DIR)+pre-test-checks
    2.10 +$(PACKAGE_DIR)+coverage: $(PACKAGE_DIR)/dist/.done $(COVERAGE_PATH)/dist/.done $(TEST_EBIN_BEAMS) $(PACKAGE_DIR)+pre-test-checks assert-erlang-r14
    2.11  	$(call run_tests,$(COVERAGE_PATH)/dist/*.ez)
    2.12  
    2.13  endef