You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2023/07/10 17:46:05 UTC
[couchdb] branch align-makefiles2 created (now 4b830d949)
This is an automated email from the ASF dual-hosted git repository.
ronny pushed a change to branch align-makefiles2
in repository https://gitbox.apache.org/repos/asf/couchdb.git
at 4b830d949 Align Makefile/Makefile.win
This branch includes the following new commits:
new 4b830d949 Align Makefile/Makefile.win
The 1 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.
[couchdb] 01/01: Align Makefile/Makefile.win
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ronny pushed a commit to branch align-makefiles2
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 4b830d9490da98d4ba127b590987c6779a9b8856
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Mon Jul 10 19:44:33 2023 +0200
Align Makefile/Makefile.win
---
Makefile | 3 ++-
Makefile.win | 82 ++++++++++++++++++++++++++++++++++++++++++++---------------
configure | 1 +
configure.ps1 | 7 ++++-
4 files changed, 70 insertions(+), 23 deletions(-)
diff --git a/Makefile b/Makefile
index 1615cac67..8091af170 100644
--- a/Makefile
+++ b/Makefile
@@ -546,13 +546,14 @@ derived:
################################################################################
.PHONY: nouveau
-# Build nouveau
+# target: nouveau - Build nouveau
nouveau:
ifeq ($(with_nouveau), 1)
@cd nouveau && ./gradlew build -x test
endif
.PHONY: nouveau-test
+# target: nouveau-test - Run nouveau tests
nouveau-test: nouveau-test-gradle nouveau-test-elixir
.PHONY: nouveau-test-gradle
diff --git a/Makefile.win b/Makefile.win
index 418a14515..eede001ed 100644
--- a/Makefile.win
+++ b/Makefile.win
@@ -78,7 +78,7 @@ DESTDIR=
# Rebar options
apps=
-skip_deps=folsom,meck,mochiweb,triq,proper,snappy,bcrypt,hyper,ibrowse,local
+skip_deps=folsom,meck,mochiweb,triq,proper,snappy,bcrypt,hyper,ibrowse
suites=
tests=
@@ -95,30 +95,25 @@ TEST_OPTS=-c startup_jitter=0 -c default_security=admin_local
# Main commands
################################################################################
-
.PHONY: all
# target: all - Build everything
-all: couch fauxton docs
-
+all: couch fauxton docs nouveau
.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
################################################################################
-
.PHONY: couch
# target: couch - Build CouchDB core, use ERL_COMPILER_OPTIONS to provide custom compiler's options
couch: config.erl
@set COUCHDB_VERSION=$(COUCHDB_VERSION) && set COUCHDB_GIT_SHA=$(COUCHDB_GIT_SHA) && $(REBAR) compile $(COMPILE_OPTS)
@copy src\couch\priv\couchjs.exe bin
-
.PHONY: docs
# target: docs - Build documentation
ifeq ($(IN_RELEASE), true)
@@ -131,18 +126,18 @@ endif
# target: fauxton - Build Fauxton web UI
fauxton: share\www
-
################################################################################
# Testing
################################################################################
-
.PHONY: check
# target: check - Test everything
check: all
+ @$(MAKE) exunit
@$(MAKE) eunit
@$(MAKE) mango-test
@$(MAKE) elixir-suite
+ @$(MAKE) nouveau-test
ifdef apps
subdirs = $(apps)
@@ -167,8 +162,9 @@ exunit: export MIX_ENV=test
exunit: export ERL_LIBS = $(shell echo %cd%)/src
exunit: export ERL_AFLAGS = -config $(shell echo "%cd%")/rel/files/eunit.config
exunit: export COUCHDB_QUERY_SERVER_JAVASCRIPT = $(shell echo %cd%)/bin/couchjs $(shell echo %cd%)/share/server/main.js
-exunit: couch elixir-init setup-eunit elixir-check-formatted elixir-credo
- @mix test --cover --trace $(EXUNIT_OPTS)
+exunit: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
+exunit: couch elixir-init setup-eunit
+ @mix test --trace $(EXUNIT_OPTS)
setup-eunit: export BUILDDIR = $(shell echo %cd%)
setup-eunit: export ERL_AFLAGS = -config $(shell echo "%cd%")/rel/files/eunit.config
@@ -215,26 +211,27 @@ python-black-update: .venv/bin/black
.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 without_quorum_test --exclude with_quorum_test $(EXUNIT_OPTS)'
+elixir: elixir-init 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 without_quorum_test --exclude with_quorum_test $(EXUNIT_OPTS)'
.PHONY: elixir-init
-elixir-init: MIX_ENV=test
+elixir-init: MIX_ENV=integration
elixir-init: config.erl
@mix local.rebar --force && mix local.hex --force && mix deps.get
.PHONY: elixir-cluster-without-quorum
elixir-cluster-without-quorum: export MIX_ENV=integration
-elixir-cluster-without-quorum: elixir-init elixir-check-formatted elixir-credo devclean
+elixir-cluster-without-quorum: elixir-init devclean
@dev\run -n 3 -q -a adm:pass \
--degrade-cluster 2 \
--no-eval 'mix test --trace --only without_quorum_test $(EXUNIT_OPTS)'
.PHONY: elixir-cluster-with-quorum
elixir-cluster-with-quorum: export MIX_ENV=integration
-elixir-cluster-with-quorum: elixir-init elixir-check-formatted elixir-credo devclean
+elixir-cluster-with-quorum: elixir-init devclean
@dev\run -n 3 -q -a adm:pass \
--degrade-cluster 1 \
--no-eval 'mix test --trace --only with_quorum_test $(EXUNIT_OPTS)'
@@ -269,7 +266,11 @@ elixir-source-checks: elixir-init
.PHONY: build-report
# target: build-report - Generate a build report
build-report:
- @$(PYTHON) build-aux/show-test-results.py --suites=10 --tests=10 > test-results.log
+ @$(PYTHON) build-aux/show-test-results.py --suites=10 --tests=10 > test-results.log || true
+ cat .\dev\logs\node1.log || true
+ cat .\dev\logs\nouveau.log || true
+ cat .\tmp\couch.log || true
+ cat test-results.log || true
.PHONY: check-qs
# target: check-qs - Run query server tests (ruby and rspec required!)
@@ -293,7 +294,7 @@ list-eunit-suites:
mango-test: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
mango-test: devclean all
@cd src\mango && \
- python.exe -m venv .venv && \
+ @$(PYTHON) -m venv .venv && \
.venv\Scripts\pip.exe install -r requirements.txt
@cd src\mango && \
..\..\dev\run $(TEST_OPTS) \
@@ -383,6 +384,12 @@ else
endif
endif
+ifeq ($(with_nouveau), 1)
+ -@mkdir -p rel\couchdb\nouveau
+ @cp nouveau\build\libs\server-*-dist.jar rel\couchdb\nouveau\
+ @cp nouveau\nouveau.yaml rel\couchdb\nouveau\
+endif
+
@echo ... done
@echo .
@echo You can now copy the rel\couchdb directory anywhere on your system.
@@ -423,7 +430,9 @@ clean:
-@rmdir /s/q src\mango\.venv
-@del /f/q src\couch\priv\couch_js\config.h
-@del /f/q dev\boot_node.beam dev\pbkdf2.pyc log\crash.log
-
+ifeq ($(with_nouveau), 1)
+ @cd nouveau && .\gradlew clean
+endif
.PHONY: distclean
# target: distclean - Remove build and release artifacts
@@ -489,3 +498,34 @@ derived:
@echo "ON_TAG: $(ON_TAG)"
@echo "REL_TAG: $(REL_TAG)"
@echo "SUB_VSN: $(SUB_VSN)"
+
+################################################################################
+# Nouveau
+################################################################################
+
+.PHONY: nouveau
+# target: nouveau - Build nouveau
+nouveau:
+ifeq ($(with_nouveau), 1)
+ @cd nouveau && .\gradlew build -x test
+endif
+
+.PHONY: nouveau-test
+# target: nouveau-test - Run nouveau tests
+nouveau-test: nouveau-test-gradle nouveau-test-elixir
+
+.PHONY: nouveau-test-gradle
+nouveau-test-gradle: couch nouveau
+ifeq ($(with_nouveau), 1)
+ @cd nouveau && .\gradlew test
+endif
+
+.PHONY: nouveau-test-elixir
+nouveau-test-elixir: export MIX_ENV=integration
+nouveau-test-elixir: elixir-init devclean
+nouveau-test-elixir: couch nouveau
+ifeq ($(with_nouveau), 1)
+ @dev/run -n 1 -q -a adm:pass --with-nouveau \
+ --locald-config test/config/test-config.ini \
+ --no-eval 'mix test --trace --include test/elixir/test/config/nouveau.elixir'
+endif
diff --git a/configure b/configure
index f90bfce77..59ccc6de8 100755
--- a/configure
+++ b/configure
@@ -60,6 +60,7 @@ Options:
--enable-nouveau enable the new experimental search module
--erlang-md5 use erlang for md5 hash operations
--dev alias for --disable-docs --disable-fauxton
+ --dev-with-nouveau alias for --disable-docs --disable-fauxton --enable-nouveau
--spidermonkey-version VSN specify the version of SpiderMonkey to use (defaults to $SM_VSN)
--skip-deps do not update erlang dependencies
--rebar=PATH use rebar by specified path (version >=2.6.0 && <3.0 required)
diff --git a/configure.ps1 b/configure.ps1
index 576430e4e..ec0b650db 100644
--- a/configure.ps1
+++ b/configure.ps1
@@ -7,6 +7,7 @@
-DisableFauxton request build process skip building Fauxton (default false)
-DisableDocs request build process skip building documentation (default false)
+ -EnableNouveau enable the new experiemtal search module (default false)
-SkipDeps do not update Erlang dependencies (default false)
-CouchDBUser USER set the username to run as (defaults to current user)
-SpiderMonkeyVersion VSN select the version of SpiderMonkey to use (default 91)
@@ -43,6 +44,7 @@ Param(
[switch]$Test = $false,
[switch]$DisableFauxton = $false, # do not build Fauxton
[switch]$DisableDocs = $false, # do not build any documentation or manpages
+ [switch]$EnableNouveau = $false, # dont use new search module by default
[switch]$SkipDeps = $false, # do not update erlang dependencies
[switch]$DisableProper = $false, # a compilation pragma. proper is a kind of automated test suite
[switch]$EnableErlangMD5 = $false, # don't use Erlang for md5 hash operations by default
@@ -127,6 +129,7 @@ $InstallDir="$LibDir\couchdb"
$LogFile="$LogDir\couch.log"
$BuildFauxton = [int](-not $DisableFauxton)
$BuildDocs = [int](-not $DisableDocs)
+$BuildNouveau = $(If ($EnableNouveau) {1} else {0})
$Hostname = [System.Net.Dns]::GetHostEntry([string]"localhost").HostName
$WithProper = (-not $DisableProper).ToString().ToLower()
$ErlangMD5 = ($EnableErlangMD5).ToString().ToLower()
@@ -151,11 +154,12 @@ $CouchDBConfig = @"
{prefix, "."}.
{data_dir, "./data"}.
{view_index_dir, "./data"}.
+{state_dir, "./data"}.
{log_file, ""}.
{fauxton_root, "./share/www"}.
{user, "$CouchDBUser"}.
{spidermonkey_version, "$SpiderMonkeyVersion"}.
-{node_name, "-name couchdb@localhost"}.
+{node_name, "-name couchdb@127.0.0.1"}.
{cluster_port, 5984}.
{backend_port, 5986}.
{prometheus_port, 17986}.
@@ -196,6 +200,7 @@ man_dir = $ManDir
with_fauxton = $BuildFauxton
with_docs = $BuildDocs
+with_nouveau = $BuildNouveau
user = $CouchDBUser
spidermonkey_version = $SpiderMonkeyVersion