diff options
author | Loïc Hoguin <[email protected]> | 2013-08-31 16:22:35 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-08-31 16:22:35 +0200 |
commit | 7ff9a306d6e110af3bf39755321adf0cc0d56c46 (patch) | |
tree | b531c0c439664b1c8116f7711549cb3da4c979c4 | |
parent | ac55fb27f8f47ae2be26cd2ef9dd91853ebe5be6 (diff) | |
download | cowboy-7ff9a306d6e110af3bf39755321adf0cc0d56c46.tar.gz cowboy-7ff9a306d6e110af3bf39755321adf0cc0d56c46.tar.bz2 cowboy-7ff9a306d6e110af3bf39755321adf0cc0d56c46.zip |
Update erlang.mk
-rw-r--r-- | erlang.mk | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -183,14 +183,26 @@ CT_RUN = ct_run \ # -cover test/cover.spec CT_SUITES ?= -CT_SUITES_FULL = $(addsuffix _SUITE,$(CT_SUITES)) + +define test_target +test_$(1): ERLC_OPTS += -DTEST=1 +'{parse_transform, eunit_autoexport}' +test_$(1): clean deps app build-tests + @if [ -d "test" ] ; \ + then \ + mkdir -p logs/ ; \ + $(CT_RUN) -suite $(addsuffix _SUITE,$(1)) ; \ + fi + $(gen_verbose) rm -f test/*.beam +endef + +$(foreach test,$(CT_SUITES),$(eval $(call test_target,$(test)))) tests: ERLC_OPTS += -DTEST=1 +'{parse_transform, eunit_autoexport}' tests: clean deps app build-tests @if [ -d "test" ] ; \ then \ mkdir -p logs/ ; \ - $(CT_RUN) -suite $(CT_SUITES_FULL) ; \ + $(CT_RUN) -suite $(addsuffix _SUITE,$(CT_SUITES)) ; \ fi $(gen_verbose) rm -f test/*.beam |