You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2019/06/05 19:03:16 UTC
[couchdb] 01/06: Update build system for FoundationDB
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch prototype/fdb-layer
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 51a396017a224f629154e579f591a3fe86bc7fc9
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Wed Jun 5 13:04:56 2019 -0500
Update build system for FoundationDB
---
.gitignore | 3 +++
Makefile | 6 +++++-
dev/run | 9 ++++++++-
rebar.config.script | 7 ++++++-
rel/files/eunit.config | 3 ++-
test/elixir/run-only | 3 +++
6 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 36bc130..bbb12a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@
.venv
.DS_Store
.rebar/
+.erlfdb/
.eunit/
log
apache-couchdb-*/
@@ -44,6 +45,7 @@ src/couch/priv/couch_js/util.d
src/couch/priv/icu_driver/couch_icu_driver.d
src/mango/src/mango_cursor_text.nocompile
src/docs/
+src/erlfdb/
src/ets_lru/
src/fauxton/
src/folsom/
@@ -51,6 +53,7 @@ src/hqueue/
src/hyper/
src/ibrowse/
src/ioq/
+src/hqueue/
src/jiffy/
src/ken/
src/khash/
diff --git a/Makefile b/Makefile
index 0acf828..0006d2a 100644
--- a/Makefile
+++ b/Makefile
@@ -213,7 +213,11 @@ python-black-update: .venv/bin/black
.PHONY: elixir
elixir: elixir-init elixir-check-formatted elixir-credo devclean
- @dev/run -a adm:pass --no-eval 'test/elixir/run --exclude without_quorum_test --exclude with_quorum_test $(EXUNIT_OPTS)'
+ @dev/run --erlang-config=rel/files/eunit.config -n 1 -a adm:pass --no-eval 'test/elixir/run --exclude without_quorum_test --exclude with_quorum_test $(EXUNIT_OPTS)'
+
+.PHONY: elixir-only
+elixir-only: devclean
+ @dev/run --erlang-config=rel/files/eunit.config -n 1 -a adm:pass --no-eval 'test/elixir/run-only --exclude without_quorum_test --exclude with_quorum_test $(EXUNIT_OPTS)'
.PHONY: elixir-init
elixir-init:
diff --git a/dev/run b/dev/run
index 60e7d5c..72f5a47 100755
--- a/dev/run
+++ b/dev/run
@@ -181,6 +181,12 @@ def setup_argparse():
help="Optional key=val config overrides. Can be repeated",
)
parser.add_option(
+ "--erlang-config",
+ dest="erlang_config",
+ default="rel/files/sys.config",
+ help="Specify an alternative Erlang application configuration"
+ )
+ parser.add_option(
"--degrade-cluster",
dest="degrade_cluster",
type=int,
@@ -222,6 +228,7 @@ def setup_context(opts, args):
"haproxy": opts.haproxy,
"haproxy_port": opts.haproxy_port,
"config_overrides": opts.config_overrides,
+ "erlang_config": opts.erlang_config,
"no_eval": opts.no_eval,
"reset_logs": True,
"procs": [],
@@ -559,7 +566,7 @@ def boot_node(ctx, node):
"-args_file",
os.path.join(node_etcdir, "vm.args"),
"-config",
- os.path.join(reldir, "files", "sys"),
+ os.path.join(ctx["rootdir"], ctx["erlang_config"]),
"-couch_ini",
os.path.join(node_etcdir, "default.ini"),
os.path.join(node_etcdir, "local.ini"),
diff --git a/rebar.config.script b/rebar.config.script
index 254c674..3f3ef46 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -114,7 +114,10 @@ DepDescs = [
{ibrowse, "ibrowse", {tag, "CouchDB-4.0.1-1"}},
{jiffy, "jiffy", {tag, "CouchDB-0.14.11-2"}},
{mochiweb, "mochiweb", {tag, "v2.19.0"}},
-{meck, "meck", {tag, "0.8.8"}}
+{meck, "meck", {tag, "0.8.8"}},
+
+%% TMP - Until this is moved to a proper Apache repo
+{erlfdb, "erlfdb", {branch, "master"}}
],
WithProper = lists:keyfind(with_proper, 1, CouchConfig) == {with_proper, true},
@@ -129,6 +132,8 @@ end,
BaseUrl = "https://github.com/apache/",
MakeDep = fun
+ ({erlfdb, _, Version}) ->
+ {erlfdb, ".*", {git, "https://github.com/cloudant-labs/couchdb-erlfdb", {branch, "master"}}};
({AppName, {url, Url}, Version}) ->
{AppName, ".*", {git, Url, Version}};
({AppName, {url, Url}, Version, Options}) ->
diff --git a/rel/files/eunit.config b/rel/files/eunit.config
index 3c7457d..5e96fae 100644
--- a/rel/files/eunit.config
+++ b/rel/files/eunit.config
@@ -12,5 +12,6 @@
[
{kernel, [{error_logger, silent}]},
- {sasl, [{sasl_error_logger, false}]}
+ {sasl, [{sasl_error_logger, false}]},
+ {fabric, [{eunit_run, true}]}
].
diff --git a/test/elixir/run-only b/test/elixir/run-only
new file mode 100755
index 0000000..7c2a4ae
--- /dev/null
+++ b/test/elixir/run-only
@@ -0,0 +1,3 @@
+#!/bin/bash -e
+cd "$(dirname "$0")"
+mix test --trace "$@"