You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2023/02/17 01:43:57 UTC
[couchdb] branch main updated (50dd63176 -> 645912d0c)
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
from 50dd63176 Chase rename of `dreyfus-test` to `elixir-search` in documentation
new df0699a60 Clean up `make help` output
new 065b86fab Remove the inactive uploader action from `build-report`
new 0feedb66f Fix the `list-eunit-apps` target
new 9b86e7130 Overhaul the Windows Makefile
new 645912d0c Fix typo
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
Makefile | 21 ++++++++++++---------
Makefile.win | 44 +++++++++++++++++++++++++++++++++-----------
README-DEV.rst | 2 +-
3 files changed, 46 insertions(+), 21 deletions(-)
[couchdb] 02/05: Remove the inactive uploader action from `build-report`
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 065b86fab20d89250a15f7848f7f063e103c7311
Author: Gabor Pali <ga...@ibm.com>
AuthorDate: Thu Feb 16 01:01:30 2023 +0100
Remove the inactive uploader action from `build-report`
The report uploads are still broken and the help message for the
target does not either indicate that is happening. This can be
re-introduced later once fixed.
---
Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index 945a542ef..907bbae75 100644
--- a/Makefile
+++ b/Makefile
@@ -292,7 +292,6 @@ elixir-source-checks: elixir-init
# target: build-report - Generate a build report
build-report:
build-aux/show-test-results.py --suites=10 --tests=10 > test-results.log
- #build-aux/logfile-uploader.py
.PHONY: check-qs
# target: check-qs - Run query server tests (ruby and rspec required!)
[couchdb] 04/05: Overhaul the Windows Makefile
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 9b86e713069d201c9b72b12fe3679799014233e3
Author: Gabor Pali <ga...@ibm.com>
AuthorDate: Thu Feb 16 01:11:15 2023 +0100
Overhaul the Windows Makefile
- Port some of the missing functionalities: the `xref`, `help`,
`list-eunit-apps`, and `list-eunit-suites` targets.
- Bring the targets about Elixir source code check in sync with
the UNIX version.
---
Makefile.win | 44 +++++++++++++++++++++++++++++++++-----------
1 file changed, 33 insertions(+), 11 deletions(-)
diff --git a/Makefile.win b/Makefile.win
index 08b373286..c13528bba 100644
--- a/Makefile.win
+++ b/Makefile.win
@@ -101,6 +101,12 @@ TEST_OPTS=-c startup_jitter=0 -c default_security=admin_local
all: couch fauxton docs
+.PHONY: help
+# target: help - Print this help
+help:
+ @powershell -Command 'Select-String Makefile.win -Pattern "^# target: (?<name>.*) - (?<description>.*)" | ForEach-Object { ("{0,-22} - {1}" -f $$_.Matches[0].Groups["name"], $$_.Matches[0].Groups["description"]) } | Sort'
+
+
################################################################################
# Building
################################################################################
@@ -155,7 +161,7 @@ eunit: couch
@cmd /c "FOR %d IN ($(subdirs)) DO set COUCHDB_VERSION=$(COUCHDB_VERSION) & set COUCHDB_GIT_SHA=$(COUCHDB_GIT_SHA) & $(REBAR) -r eunit $(EUNIT_OPTS) apps=%d || exit /b 1"
.PHONY: exunit
-# target: exunit - Run ExUnit tests
+# target: exunit - Run ExUnit tests, use EXUNIT_OPTS to provide custom options
exunit: export BUILDDIR = $(shell echo %cd%)
exunit: export MIX_ENV=test
exunit: export ERL_LIBS = $(shell echo %cd%)\src
@@ -174,10 +180,12 @@ just-eunit: export ERL_AFLAGS = $(shell echo "-config %cd%/rel/files/eunit.confi
just-eunit:
@$(REBAR) -r eunit $(EUNIT_OPTS)
+# target: erlfmt-check - Check source code formatting
erlfmt-check: export ERLFMT_PATH := $(ERLFMT)
erlfmt-check:
@$(PYTHON) dev\format_check.py
+# target: erlfmt-format - Apply source code format standards automatically
erlfmt-format: export ERLFMT_PATH := $(ERLFMT)
erlfmt-format:
@$(PYTHON) dev\format_all.py
@@ -186,7 +194,7 @@ erlfmt-format:
@$(PYTHON) -m venv .venv
@.venv\Scripts\pip3.exe install black || copy /b .venv\Scripts\black.exe +,,
-# Python code formatter - only runs if we're on Python 3.6 or greater
+# target: python-black - Python code formatter, runs only on Python >= 3.6
python-black: .venv/bin/black
@$(PYTHON) -c "import sys; exit(1 if sys.version_info < (3,6) else 0)" || \
echo 'Python formatter not supported on Python < 3.6; check results on a newer platform'
@@ -231,9 +239,10 @@ elixir-cluster-with-quorum: elixir-init elixir-check-formatted elixir-credo devc
--no-eval 'mix test --trace --only with_quorum_test $(EXUNIT_OPTS)'
.PHONY: elixir-suite
+# target: elixir-suite - Run Elixir-based integration tests
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
+elixir-suite: elixir-init devclean
@dev\run -n 1 -q -a adm:pass \
--enable-erlang-views \
--no-join \
@@ -249,14 +258,11 @@ elixir-search: elixir-init devclean
--locald-config test/config/test-config.ini \
--no-eval 'mix test --trace --include test/elixir/test/config/search.elixir'
-.PHONY: elixir-check-formatted
-elixir-check-formatted: elixir-init
+.PHONY: elixir-source-checks
+# target: elixir-source-checks - Check source code formatting of Elixir test files
+elixir-source-checks: export MIX_ENV=integration
+elixir-source-checks: 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
@@ -269,8 +275,20 @@ build-report:
check-qs:
@QS_LANG=js rspec test\view_server\query_server_spec.rb
+.PHONY: list-eunit-apps
+# target: list-eunit-apps - List EUnit target apps
+list-eunit-apps:
+ @powershell -Command 'Get-ChildItem -Path src -Recurse -Filter "*_tests?.erl" | Resolve-Path -Relative | ForEach-Object { $$_.Split("\") | Select -Skip 2 -First 1 } | Sort -Unique'
+
+
+.PHONY: list-eunit-suites
+# target: list-eunit-suites - List EUnit target test suites
+list-eunit-suites:
+ @powershell -Command 'Get-ChildItem -Path src -Recurse -Filter "*_tests?.erl" | ForEach-Object { "{0}" -f $$_.BaseName } | Sort'
+
.PHONY: mango-test
+# target: mango-test - Run Mango tests
mango-test: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
mango-test: devclean all
@cd src\mango && \
@@ -301,6 +319,10 @@ check-plt:
dialyze: .rebar
@$(REBAR) -r dialyze $(DIALYZE_OPTS)
+.PHONY: find_bugs
+# target: find_bugs - Find unused exports etc
+find_bugs:
+ @$(REBAR) --keep-going --recursive xref $(DIALYZE_OPTS)
.PHONY: introspect
# target: introspect - Check for commits difference between rebar.config and repository
@@ -363,7 +385,7 @@ endif
@echo .
.PHONY: install
-# target: install- install CouchDB :)
+# target: install - Install CouchDB :)
install: release
@echo .
@echo Notice: There is no 'make install' command for CouchDB 2.x+.
[couchdb] 01/05: Clean up `make help` output
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit df0699a60819d4c08c22029399c91bc91e6d18b1
Author: Gabor Pali <ga...@ibm.com>
AuthorDate: Thu Feb 16 00:56:52 2023 +0100
Clean up `make help` output
- Turn some of the comments above targets into target descriptions
so that the `help` target could display them.
- Rename `xref` to `find_bugs` as that is the real name.
- Fix rendering of the help message for `install`.
---
Makefile | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 0c5671d99..945a542ef 100644
--- a/Makefile
+++ b/Makefile
@@ -109,7 +109,7 @@ help:
@egrep "^# target: " Makefile \
| sed -e 's/^# target: //g' \
| sort \
- | awk '{printf(" %-20s", $$1); $$1=$$2=""; print "-" $$0}'
+ | awk '{printf(" %-21s", $$1); $$1=$$2=""; print "-" $$0}'
################################################################################
@@ -177,7 +177,7 @@ eunit: couch
.PHONY: exunit
-# target: exunit - Run ExUnit tests
+# target: exunit - Run ExUnit tests, use EXUNIT_OPTS to provide custom options
exunit: export BUILDDIR = $(shell pwd)
exunit: export MIX_ENV=test
exunit: export ERL_LIBS = $(shell pwd)/src
@@ -204,9 +204,11 @@ soak-eunit: couch
@$(REBAR) setup_eunit 2> /dev/null
while [ $$? -eq 0 ] ; do $(REBAR) -r eunit $(EUNIT_OPTS) ; done
+# target: erlfmt-check - Check source code formatting
erlfmt-check:
ERLFMT_PATH=$(ERLFMT) python3 dev/format_check.py
+# target: erlfmt-format - Apply source code format standards automatically
erlfmt-format:
ERLFMT_PATH=$(ERLFMT) python3 dev/format_all.py
@@ -214,7 +216,7 @@ erlfmt-format:
@python3 -m venv .venv
@.venv/bin/pip3 install black || touch .venv/bin/black
-# Python code formatter - only runs if we're on Python 3.6 or greater
+# target: python-black - Python code formatter, runs only on Python >= 3.6
python-black: .venv/bin/black
@python3 -c "import sys; exit(1 if sys.version_info < (3,6) else 0)" || \
echo "Python formatter not supported on Python < 3.6; check results on a newer platform"
@@ -260,6 +262,7 @@ elixir-cluster-with-quorum: elixir-init devclean
--no-eval 'mix test --trace --only with_quorum_test $(EXUNIT_OPTS)'
.PHONY: elixir-suite
+# target: elixir-suite - Run Elixir-based integration tests
elixir-suite: export MIX_ENV=integration
elixir-suite: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
elixir-suite: elixir-init devclean
@@ -279,13 +282,14 @@ elixir-search: elixir-init devclean
--no-eval 'mix test --trace --include test/elixir/test/config/search.elixir'
.PHONY: elixir-source-checks
+# target: elixir-source-checks - Check source code formatting of Elixir test files
elixir-source-checks: export MIX_ENV=integration
elixir-source-checks: elixir-init
@mix format --check-formatted
@mix credo
.PHONY: build-report
-# target: build-report - Generate and upload a build report
+# target: build-report - Generate a build report
build-report:
build-aux/show-test-results.py --suites=10 --tests=10 > test-results.log
#build-aux/logfile-uploader.py
@@ -358,7 +362,7 @@ dialyze: .rebar
.PHONY: find_bugs
-# target: xref - find unused exports etc
+# target: find_bugs - Find unused exports etc
find_bugs:
@$(REBAR) --keep-going --recursive xref $(DIALYZE_OPTS)
@@ -424,7 +428,7 @@ endif
@echo
.PHONY: install
-# target: install- install CouchDB :)
+# target: install - Install CouchDB :)
install: release
@echo
@echo "Notice: There is no 'make install' command for CouchDB 2.x+."
[couchdb] 03/05: Fix the `list-eunit-apps` target
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 0feedb66f90f767a44c7a7fabb777224d362e968
Author: Gabor Pali <ga...@ibm.com>
AuthorDate: Thu Feb 16 01:06:47 2023 +0100
Fix the `list-eunit-apps` target
Due to the double slash in the path that is generated by the
invocation of `find(1)`, the wrong part of the path is going to
be cut. This mistake does not cause trouble for
`list-eunit-suites`, adjusted for consistency only.
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 907bbae75..f44075d86 100644
--- a/Makefile
+++ b/Makefile
@@ -302,7 +302,7 @@ check-qs:
.PHONY: list-eunit-apps
# target: list-eunit-apps - List EUnit target apps
list-eunit-apps:
- @find ./src/ -type f -name *_test.erl -o -name *_tests.erl \
+ @find ./src -type f -name *_test.erl -o -name *_tests.erl \
| cut -d '/' -f 3 \
| sort -u
@@ -310,7 +310,7 @@ list-eunit-apps:
.PHONY: list-eunit-suites
# target: list-eunit-suites - List EUnit target test suites
list-eunit-suites:
- @find ./src/ -type f -name *_test.erl -o -name *_tests.erl -exec basename {} \; \
+ @find ./src -type f -name *_test.erl -o -name *_tests.erl -exec basename {} \; \
| cut -d '.' -f -1 \
| sort
[couchdb] 05/05: Fix typo
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 645912d0c923da8a4d21a8f0bfbddbc4146b7bf5
Author: Gabor Pali <ga...@ibm.com>
AuthorDate: Thu Feb 16 01:14:09 2023 +0100
Fix typo
---
README-DEV.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README-DEV.rst b/README-DEV.rst
index e0f1b8532..7ef844096 100644
--- a/README-DEV.rst
+++ b/README-DEV.rst
@@ -182,7 +182,7 @@ You can also run each test suite individually via the ``eunit``, ``mango-test``,
make eunit
make mango-test
- make elixit-suite
+ make elixir-suite
make weatherreport-test
If you need to run specific Erlang tests, you can pass special "options"