diff options
author | Loïc Hoguin <[email protected]> | 2018-11-25 14:24:22 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-11-25 14:27:16 +0100 |
commit | 77c0ec834fcf57aaf8460a515829066377756b63 (patch) | |
tree | d440ca25638d595f7ab43a42461c185c3222477f /plugins | |
parent | a59058e20c7c703d7bb9f6bcd2ac471d4d950d03 (diff) | |
download | erlang.mk-77c0ec834fcf57aaf8460a515829066377756b63.tar.gz erlang.mk-77c0ec834fcf57aaf8460a515829066377756b63.tar.bz2 erlang.mk-77c0ec834fcf57aaf8460a515829066377756b63.zip |
Build issues testing multi-apps projects
I've reworked how the multi-apps projects are built. In particular
I've made sure the test build is made from the top-level once, and
then only tests are run on this build. It used to build multiple
times and some builds would not include test mode, not good. I've
also fixed issues with running tests in parallel.
All tests now pass with -j8 on my machine. It's possible more
issues remain that are not covered by tests yet though.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ct.mk | 8 | ||||
-rw-r--r-- | plugins/eunit.mk | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/ct.mk b/plugins/ct.mk index 63f61fa..b9199e9 100644 --- a/plugins/ct.mk +++ b/plugins/ct.mk @@ -41,11 +41,11 @@ CT_RUN = ct_run \ -logdir $(CT_LOGS_DIR) ifeq ($(CT_SUITES),) -ct: $(if $(IS_APP),,apps-ct) +ct: $(if $(IS_APP)$(ROOT_DIR),,apps-ct) else # We do not run tests if we are in an apps/* with no test directory. ifneq ($(IS_APP)$(wildcard $(TEST_DIR)),1) -ct: test-build $(if $(IS_APP),,apps-ct) +ct: test-build $(if $(IS_APP)$(ROOT_DIR),,apps-ct) $(verbose) mkdir -p $(CT_LOGS_DIR) $(gen_verbose) $(CT_RUN) -sname ct_$(PROJECT) -suite $(addsuffix _SUITE,$(CT_SUITES)) $(CT_OPTS) endif @@ -53,13 +53,13 @@ endif ifneq ($(ALL_APPS_DIRS),) define ct_app_target -apps-ct-$1: +apps-ct-$1: test-build $(MAKE) -C $1 ct IS_APP=1 endef $(foreach app,$(ALL_APPS_DIRS),$(eval $(call ct_app_target,$(app)))) -apps-ct: test-build $(addprefix apps-ct-,$(ALL_APPS_DIRS)) +apps-ct: $(addprefix apps-ct-,$(ALL_APPS_DIRS)) endif ifndef t diff --git a/plugins/eunit.mk b/plugins/eunit.mk index c94c63d..8c08334 100644 --- a/plugins/eunit.mk +++ b/plugins/eunit.mk @@ -69,7 +69,7 @@ ifneq ($(wildcard src/ $(TEST_DIR)),) endif ifneq ($(ALL_APPS_DIRS),) -apps-eunit: +apps-eunit: test-build $(verbose) eunit_retcode=0 ; for app in $(ALL_APPS_DIRS); do $(MAKE) -C $$app eunit IS_APP=1; \ [ $$? -ne 0 ] && eunit_retcode=1 ; done ; \ exit $$eunit_retcode |