diff options
author | Loïc Hoguin <[email protected]> | 2016-03-19 12:13:31 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-03-19 12:13:31 +0100 |
commit | d52bf8576c3b38e5219b361ee58c960a30225c4b (patch) | |
tree | 3d5aedd216942eb4b7f25402300e695829ec7ff0 | |
parent | 6e5ff123aeb78e8bbb5092b83577ffdfb5feb9b3 (diff) | |
parent | 8a69d434d90a1d971834ac4c81f060e9702b1252 (diff) | |
download | erlang.mk-d52bf8576c3b38e5219b361ee58c960a30225c4b.tar.gz erlang.mk-d52bf8576c3b38e5219b361ee58c960a30225c4b.tar.bz2 erlang.mk-d52bf8576c3b38e5219b361ee58c960a30225c4b.zip |
Merge branch 'multi_app_ct' of https://github.com/ingwinlu/erlang.mk
-rw-r--r-- | plugins/ct.mk | 4 | ||||
-rw-r--r-- | test/plugin_ct.mk | 13 |
2 files changed, 12 insertions, 5 deletions
diff --git a/plugins/ct.mk b/plugins/ct.mk index c8f7bf8..4d0c020 100644 --- a/plugins/ct.mk +++ b/plugins/ct.mk @@ -31,7 +31,7 @@ help:: CT_RUN = ct_run \ -no_auto_compile \ -noinput \ - -pa $(CURDIR)/ebin $(DEPS_DIR)/*/ebin $(TEST_DIR) \ + -pa $(CURDIR)/ebin $(DEPS_DIR)/*/ebin $(APPS_DIR)/*/ebin $(TEST_DIR) \ -dir $(TEST_DIR) \ -logdir $(CURDIR)/logs @@ -51,7 +51,7 @@ endef $(foreach app,$(ALL_APPS_DIRS),$(eval $(call ct_app_target,$(app)))) -apps-ct: $(addprefix apps-ct-,$(ALL_APPS_DIRS)) +apps-ct: test-build $(addprefix apps-ct-,$(ALL_APPS_DIRS)) endif ifndef t diff --git a/test/plugin_ct.mk b/test/plugin_ct.mk index dd36801..c32fa36 100644 --- a/test/plugin_ct.mk +++ b/test/plugin_ct.mk @@ -63,6 +63,12 @@ ct-apps-only: build clean $i "Create a new library named my_lib" $t $(MAKE) -C $(APP) new-lib in=my_lib $v + $i "Populate my_lib" + $t printf "%s\n" \ + "-module(my_lib)." \ + "-export([random_int/0])." \ + "random_int() -> 4." > $(APP)/apps/my_lib/src/my_lib.erl + $i "Check that Common Test detects no tests" $t $(MAKE) -C $(APP) ct | grep -q "Nothing to be done for 'ct'." @@ -70,9 +76,10 @@ ct-apps-only: build clean $t mkdir $(APP)/apps/my_app/test $t printf "%s\n" \ "-module(my_app_SUITE)." \ - "-export([all/0, ok/1])." \ - "all() -> [ok]." \ - "ok(_) -> ok." > $(APP)/apps/my_app/test/my_app_SUITE.erl + "-export([all/0, ok/1, call_my_lib/1])." \ + "all() -> [ok, call_my_lib]." \ + "ok(_) -> ok." \ + "call_my_lib(_) -> 4 = my_lib:random_int()." > $(APP)/apps/my_app/test/my_app_SUITE.erl $i "Generate a Common Test suite in my_lib" $t mkdir $(APP)/apps/my_lib/test |