aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSedrik <[email protected]>2014-07-29 21:01:32 +0200
committerSedrik <[email protected]>2014-07-29 21:01:32 +0200
commite8d3f9c8e144921221e7ea5ddfa14bb2b765a128 (patch)
treef244ebb7384277ee85f76961bdd1085110056568
parent3d44f83ebb1f15922a2531085b520253aae35548 (diff)
downloaderlang.mk-e8d3f9c8e144921221e7ea5ddfa14bb2b765a128.tar.gz
erlang.mk-e8d3f9c8e144921221e7ea5ddfa14bb2b765a128.tar.bz2
erlang.mk-e8d3f9c8e144921221e7ea5ddfa14bb2b765a128.zip
Only autodetect if we have a test directory.
-rw-r--r--erlang.mk6
-rw-r--r--plugins/ct.mk6
2 files changed, 10 insertions, 2 deletions
diff --git a/erlang.mk b/erlang.mk
index 3b114de..35c117d 100644
--- a/erlang.mk
+++ b/erlang.mk
@@ -232,7 +232,11 @@ CT_RUN = ct_run \
-dir test \
-logdir logs
-CT_SUITES ?= $(sort $(subst _SUITE.erl,,$(shell find test -type f -name \*_SUITE.erl -exec basename {} \;)))
+ifneq ($(wildcard test/),)
+ CT_SUITES ?= $(sort $(subst _SUITE.erl,,$(shell find test -type f -name \*_SUITE.erl -exec basename {} \;)))
+else
+ CT_SUITES ?=
+endif
define test_target
test_$(1): ERLC_OPTS = $(TEST_ERLC_OPTS)
diff --git a/plugins/ct.mk b/plugins/ct.mk
index 91edf4e..a2e64ef 100644
--- a/plugins/ct.mk
+++ b/plugins/ct.mk
@@ -6,7 +6,11 @@
# Configuration.
CT_OPTS ?=
-CT_SUITES ?= $(sort $(subst _SUITE.erl,,$(shell find test -type f -name \*_SUITE.erl -exec basename {} \;)))
+ifneq ($(wildcard test/),)
+ CT_SUITES ?= $(sort $(subst _SUITE.erl,,$(shell find test -type f -name \*_SUITE.erl -exec basename {} \;)))
+else
+ CT_SUITES ?=
+endif
TEST_ERLC_OPTS ?= +debug_info +warn_export_vars +warn_shadow_vars +warn_obsolete_guard
TEST_ERLC_OPTS += -DTEST=1 -DEXTRA=1 +'{parse_transform, eunit_autoexport}'