summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2021-11-12 15:28:05 -0500
committerAdam Kocoloski <kocolosk@apache.org>2021-11-15 12:58:33 -0500
commit8f70f12c7de10a7dd2c51cc8a269b54fdf919bc0 (patch)
treecc7824d16cdf781f8e2874262866dcfc0e3a7780
parenta5c35bd262286a2cb2cf81ce69effc8f6b82063e (diff)
downloadcouchdb-8f70f12c7de10a7dd2c51cc8a269b54fdf919bc0.tar.gz
Port changes from Makefile to Makefile.win
I didn't touch the mango-test invocation because it confused me. I'm not sure how Python.exe and dev\run are interacting there. I'm also not sure about forward vs. backslash in these quoted mix invocations. I stuck with the convention I saw already in the Makefile; i.e. forward slashes for regular arguments to dev\run, backslashes for quoted arguments to the mix invocation issued by dev\run.
-rw-r--r--Makefile.win53
1 files changed, 26 insertions, 27 deletions
diff --git a/Makefile.win b/Makefile.win
index 77018ce71..b81bd87df 100644
--- a/Makefile.win
+++ b/Makefile.win
@@ -87,8 +87,6 @@ DIALYZE_OPTS=skip_deps=$(skip_deps)
EXUNIT_OPTS=$(subst $(comma),$(space),$(tests))
-TEST_OPTS=-c startup_jitter=0 -c default_security=admin_local
-
################################################################################
# Main commands
################################################################################
@@ -134,8 +132,9 @@ fauxton: share\www
check: all python-black
@$(MAKE) erlfmt-check
@$(MAKE) eunit
+ @$(MAKE) elixir-suite
+ @$(MAKE) exunit
@$(MAKE) mango-test
- @$(MAKE) elixir
ifdef apps
subdirs = $(apps)
@@ -201,40 +200,40 @@ 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 dev\run dev\format_*.py src\mango\test src\docs\src\conf.py src\docs\ext .
-.PHONY: elixir
-elixir: export MIX_ENV=integration
-elixir: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
-elixir: elixir-init elixir-check-formatted elixir-credo devclean
- @dev\run $(TEST_OPTS) -a adm:pass -n 1 --enable-erlang-views \
- --locald-config test/elixir/test/config/test-config.ini \
- --no-eval 'mix test --trace --exclude pending $(EXUNIT_OPTS)'
+.PHONY: elixir-suite
+elixir-suite: elixir-init elixir-check-formatted elixir-credo elixir-integration
.PHONY: elixir-init
-elixir-init: MIX_ENV=test
-elixir-init: config.erl
+elixir-init:
@mix local.rebar --force && mix local.hex --force && mix deps.get
-.PHONY: elixir-suite
-elixir-suite: export MIX_ENV=integration
-elixir-suite: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
-elixir-suite: elixir-init elixir-check-formatted elixir-credo devclean
- @dev\run -n 1 -q -a adm:pass \
- --enable-erlang-views \
- --no-join \
- --locald-config test/elixir/test/config/test-config.ini \
- --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'
-
.PHONY: elixir-check-formatted
-elixir-check-formatted: elixir-init
+elixir-check-formatted:
@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
+# 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
+ @dev\run -n 1 -q -a adm:pass \
+ --locald-config test/elixir/test/config/test-config.ini \
+ --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: 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: 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: check-qs
# target: check-qs - Run query server tests (ruby and rspec required!)
check-qs: