summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriilyak <iilyak@users.noreply.github.com>2018-12-19 02:58:14 -0800
committerGitHub <noreply@github.com>2018-12-19 02:58:14 -0800
commit92adefaa42c3a4b145e646a312c6692e0743f76a (patch)
tree530228bcccb950c71eacac2ed6c8a5552c461ea8
parentc911f0652c3b33ad5a28fde2df54f3b20ae324f3 (diff)
parent82c921952202d0f511812edeb23670a069070f0b (diff)
downloadcouchdb-92adefaa42c3a4b145e646a312c6692e0743f76a.tar.gz
Merge pull request #1800 from cloudant/allow-specifying-individual-elixir-tests
Support specifying individual Elixir tests to run
-rw-r--r--Makefile8
-rw-r--r--Makefile.win9
-rwxr-xr-xtest/elixir/run2
-rw-r--r--test/elixir/run.cmd2
4 files changed, 17 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 5af99740d..04c40e7fe 100644
--- a/Makefile
+++ b/Makefile
@@ -59,6 +59,11 @@ COUCHDB_VERSION = $(RELTAG)$(DIRTY)
endif
endif
+# needed to do text substitutions
+comma:= ,
+empty:=
+space:= $(empty) $(empty)
+
DESTDIR=
# Rebar options
@@ -80,6 +85,7 @@ DIALYZE_OPTS=$(shell echo "\
apps=$(apps) \
skip_deps=$(skip_deps) \
" | sed -e 's/[a-z]\{1,\}= / /g')
+EXUNIT_OPTS=$(subst $(comma),$(space),$(tests))
#ignore javascript tests
ignore_js_suites=
@@ -195,7 +201,7 @@ python-black-update: .venv/bin/black
.PHONY: elixir
elixir: elixir-check-formatted elixir-credo devclean
- @dev/run -a adm:pass --no-eval test/elixir/run
+ @dev/run -a adm:pass --no-eval test/elixir/run $(EXUNIT_OPTS)
.PHONY: elixir-check-formatted
elixir-check-formatted:
diff --git a/Makefile.win b/Makefile.win
index a42ec7027..0ffbfa971 100644
--- a/Makefile.win
+++ b/Makefile.win
@@ -60,6 +60,11 @@ COUCHDB_VERSION = $(RELTAG)$(DIRTY)
endif
endif
+# needed to do text substitutions
+comma:= ,
+empty:=
+space:= $(empty) $(empty)
+
DESTDIR=
# Rebar options
@@ -72,6 +77,8 @@ tests=
EUNIT_OPTS=skip_deps=$(skip_deps)
DIALYZE_OPTS=skip_deps=$(skip_deps)
+EXUNIT_OPTS=$(subst $(comma),$(space),$(tests))
+
################################################################################
# Main commands
################################################################################
@@ -166,7 +173,7 @@ python-black-update: .venv/bin/black
.PHONY: elixir
elixir: elixir-check-formatted elixir-credo devclean
- @dev\run -a adm:pass --no-eval test\elixir\run.cmd
+ @dev\run -a adm:pass --no-eval test\elixir\run.cmd $(EXUNIT_OPTS)
.PHONY: elixir-check-formatted
elixir-check-formatted:
diff --git a/test/elixir/run b/test/elixir/run
index 2d8464c18..a9c2efa4d 100755
--- a/test/elixir/run
+++ b/test/elixir/run
@@ -3,4 +3,4 @@ cd "$(dirname "$0")"
mix local.hex --force
mix local.rebar --force
mix deps.get
-mix test --trace
+mix test --trace "$@"
diff --git a/test/elixir/run.cmd b/test/elixir/run.cmd
index a99df8c6c..f1789adce 100644
--- a/test/elixir/run.cmd
+++ b/test/elixir/run.cmd
@@ -4,4 +4,4 @@ cd %~dp0
call mix local.hex --force
call mix local.rebar --force
call mix deps.get
-call mix test --trace
+call mix test --trace %*