summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2021-11-12 14:32:29 -0500
committerAdam Kocoloski <kocolosk@apache.org>2021-11-15 12:58:33 -0500
commitf54c4301c095d861951c70f5e81dfaf5e017dadf (patch)
treedfb00596790e04388ba379eb2a8644a38ba57a0c
parentb765d195bdf73a242a66160b34678e98b0758175 (diff)
downloadcouchdb-f54c4301c095d861951c70f5e81dfaf5e017dadf.tar.gz
Reorder tests for clarity, reduce dependencies
I removed the `elixir-init` dependency from everything except the `elixir-suite` target. The other targets are likely to be run interactively, in which case mix will ask if the local rebar / rebar3 etc. should be installed if they're not already (and they almost always will be). A little less log cruft, a little more speed. I also removed `MIX_ENV` exports where their inclusion didn't seem to matter, e.g. on the code formatting and static analysis checks.
-rw-r--r--Makefile38
1 files changed, 18 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index cb81e1729..54a583860 100644
--- a/Makefile
+++ b/Makefile
@@ -233,6 +233,22 @@ python-black-update: .venv/bin/black
--exclude="build/|buck-out/|dist/|_build/|\.git/|\.hg/|\.mypy_cache/|\.nox/|\.tox/|\.venv/|src/erlfmt|src/rebar/pr2relnotes.py|src/fauxton" \
build-aux/*.py dev/run dev/format_*.py src/mango/test/*.py src/docs/src/conf.py src/docs/ext/*.py .
+.PHONY: elixir-suite
+elixir-suite: elixir-init elixir-check-formatted elixir-credo elixir-integration
+
+.PHONY: elixir-init
+elixir-init: config.erl
+ @mix local.rebar --force && mix local.hex --force && mix deps.get
+
+.PHONY: elixir-check-formatted
+elixir-check-formatted:
+ @mix format --check-formatted
+
+.PHONY: elixir-credo
+# target: elixir-credo: Run the Credo static code analysis tool on Elixir files
+elixir-credo:
+ @mix credo
+
.PHONY: elixir-integration
elixir-integration: export MIX_ENV=integration
elixir-integration: devclean
@@ -241,34 +257,16 @@ elixir-integration: devclean
--erlang-config rel/files/eunit.config \
--no-eval 'mix test --trace --include test/elixir/test/config/suite.elixir --exclude test/elixir/test/config/skip.elixir $(EXUNIT_OPTS)'
-.PHONY: elixir-init
-elixir-init: MIX_ENV=test
-elixir-init: config.erl
- @mix local.rebar --force && mix local.hex --force && mix deps.get
-
-.PHONY: elixir-suite
-elixir-suite: export MIX_ENV=integration
-elixir-suite: elixir-init elixir-check-formatted elixir-credo elixir-integration
-
.PHONY: buggify-elixir-integration
+# target: buggify-elixir-integration - Run ExUnit integration tests while FoundationDB randomly throws errors
buggify-elixir-integration: export MIX_ENV=integration
-buggify-elixir-integration: elixir-init devclean
+buggify-elixir-integration: devclean
@dev/run -n 1 -q -a adm:pass \
--locald-config test/elixir/test/config/test-config.ini \
--locald-config test/elixir/test/config/buggify-test-config.ini \
--erlang-config rel/files/buggify-eunit.config \
--no-eval 'mix test --trace --include test/elixir/test/config/suite.elixir --exclude test/elixir/test/config/skip.elixir $(EXUNIT_OPTS)'
-.PHONY: elixir-check-formatted
-elixir-check-formatted: elixir-init
- @mix format --check-formatted
-
-# Credo is a static code analysis tool for Elixir.
-# We use it in our tests
-.PHONY: elixir-credo
-elixir-credo: elixir-init
- @mix credo
-
.PHONY: build-report
# target: build-report - Generate and upload a build report
build-report: