aboutsummaryrefslogtreecommitdiffstats
path: root/test/plugin_ct.mk
diff options
context:
space:
mode:
authorderwinlu <[email protected]>2016-02-08 13:50:40 +0100
committerderwinlu <[email protected]>2016-02-08 19:45:43 +0100
commit8a69d434d90a1d971834ac4c81f060e9702b1252 (patch)
treee44d4d2d61fa4a9475b981ff6c4d221915b9c6bc /test/plugin_ct.mk
parent35e12830150264f76cd21aa5941df3c4df48e5d8 (diff)
downloaderlang.mk-8a69d434d90a1d971834ac4c81f060e9702b1252.tar.gz
erlang.mk-8a69d434d90a1d971834ac4c81f060e9702b1252.tar.bz2
erlang.mk-8a69d434d90a1d971834ac4c81f060e9702b1252.zip
Fix ct for multi-app repositories
* Include $(APPS_DIR)/*/ebin in CT_RUN * test-build before ct-apps * Test that my_lib is accessible from my-app ct
Diffstat (limited to 'test/plugin_ct.mk')
-rw-r--r--test/plugin_ct.mk13
1 files changed, 10 insertions, 3 deletions
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