aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-26 23:46:31 +0100
committerLoïc Hoguin <[email protected]>2018-11-26 23:46:31 +0100
commitf07636e66759ecdaff4ee4e9097ecbf88eb6b217 (patch)
treef3dea02e4a3d0bc9f77ff83d4381eb2a4358e816 /test
parent2277830e3f2b5b8c71438c6c7f991037d04949ba (diff)
downloaderlang.mk-f07636e66759ecdaff4ee4e9097ecbf88eb6b217.tar.gz
erlang.mk-f07636e66759ecdaff4ee4e9097ecbf88eb6b217.tar.bz2
erlang.mk-f07636e66759ecdaff4ee4e9097ecbf88eb6b217.zip
Allow running test cases without groups in CT
Diffstat (limited to 'test')
-rw-r--r--test/plugin_ct.mk19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/plugin_ct.mk b/test/plugin_ct.mk
index e58f01b..0aaf1ea 100644
--- a/test/plugin_ct.mk
+++ b/test/plugin_ct.mk
@@ -151,6 +151,25 @@ ct-case: build clean
$i "Check that we can run Common Test on a specific test case"
$t $(MAKE) -C $(APP) ct-$(APP) t=mygroup:ok $v
+ct-case-without-group: build clean
+
+ $i "Bootstrap a new OTP application named $(APP)"
+ $t mkdir $(APP)/
+ $t cp ../erlang.mk $(APP)/
+ $t $(MAKE) -C $(APP) -f erlang.mk bootstrap $v
+
+ $i "Generate a Common Test suite with two cases that are not part of any group"
+ $t mkdir $(APP)/test
+ $t printf "%s\n" \
+ "-module($(APP)_SUITE)." \
+ "-export([all/0, ok/1, bad/1])." \
+ "all() -> [ok, bad]." \
+ "ok(_) -> ok." \
+ "bad(_) -> throw(fail)." > $(APP)/test/$(APP)_SUITE.erl
+
+ $i "Check that we can run Common Test on a specific test case"
+ $t $(MAKE) -C $(APP) ct-$(APP) c=ok $v
+
ct-check: build clean
$i "Bootstrap a new OTP application named $(APP)"