aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-05-12 19:09:27 +0200
committerLoïc Hoguin <[email protected]>2017-05-12 19:09:27 +0200
commit28ab68285c5e7611ef0e450b5611e666c3253add (patch)
treebd01ab75bbf67d3760b51d9887b2b3d75675f344
parenta40abed1616da47fbd83f1548228e8129bd42deb (diff)
downloaderlang.mk-28ab68285c5e7611ef0e450b5611e666c3253add.tar.gz
erlang.mk-28ab68285c5e7611ef0e450b5611e666c3253add.tar.bz2
erlang.mk-28ab68285c5e7611ef0e450b5611e666c3253add.zip
Fix the test merged in the previous commit
-rw-r--r--plugins/ct.mk3
-rw-r--r--test/plugin_ct.mk5
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/ct.mk b/plugins/ct.mk
index 9276daf..ef649e3 100644
--- a/plugins/ct.mk
+++ b/plugins/ct.mk
@@ -41,10 +41,13 @@ CT_RUN = ct_run \
ifeq ($(CT_SUITES),)
ct: $(if $(IS_APP),,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)
$(verbose) mkdir -p $(CT_LOGS_DIR)
$(gen_verbose) $(CT_RUN) -sname ct_$(PROJECT) -suite $(addsuffix _SUITE,$(CT_SUITES)) $(CT_OPTS)
endif
+endif
ifneq ($(ALL_APPS_DIRS),)
define ct_app_target
diff --git a/test/plugin_ct.mk b/test/plugin_ct.mk
index fe054e9..be44287 100644
--- a/test/plugin_ct.mk
+++ b/test/plugin_ct.mk
@@ -76,7 +76,10 @@ ct-apps: build clean
"call_my_lib(_) -> 4 = my_lib:random_int()." > $(APP)/test/my_root_SUITE.erl
$i "Check that Common Test runs tests"
- $t $(MAKE) -C $(APP) ct $v CT_SUITES=my_root
+ $t $(MAKE) -C $(APP) ct $v
+
+ $i "Check that Common Test runs tests from a specific test suite"
+ $t $(MAKE) -C $(APP) ct CT_SUITES=my_root $v
ct-apps-only: build clean