Skip to content

Commit 3404c9b

Browse files
committed
test deps
1 parent 42763c1 commit 3404c9b

File tree

10 files changed

+22
-50
lines changed

10 files changed

+22
-50
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ apps/excoveralls/
5656
apps/fauxton/
5757
apps/folsom/
5858
apps/hackney/
59-
apps/hqueue/
6059
apps/hyper/
6160
apps/ibrowse/
6261
apps/idna/

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ fauxton: share/www
140140

141141
.PHONY: escriptize
142142
# target: escriptize - Build CLI tools
143-
escriptize:
143+
escriptize: couch
144+
@COUCHDB_VERSION=$(COUCHDB_VERSION) COUCHDB_GIT_SHA=$(COUCHDB_GIT_SHA) $(REBAR3) escriptize -a weatherreport
144145
@cp _build/default/bin/weatherreport bin/weatherreport
145146

146147

@@ -172,7 +173,7 @@ eunit: export COUCHDB_QUERY_SERVER_JAVASCRIPT = $(shell pwd)/bin/couchjs $(shell
172173
eunit: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
173174
eunit: couch
174175
@COUCHDB_VERSION=$(COUCHDB_VERSION) COUCHDB_GIT_SHA=$(COUCHDB_GIT_SHA) $(REBAR3) ic setup_eunit 2> /dev/null
175-
@$(REBAR3) eunit
176+
@COUCHDB_VERSION=$(COUCHDB_VERSION) COUCHDB_GIT_SHA=$(COUCHDB_GIT_SHA) $(REBAR3) eunit || exit 1
176177

177178

178179
.PHONY: exunit
@@ -194,14 +195,14 @@ setup-eunit:
194195
just-eunit: export BUILDDIR = $(shell pwd)
195196
just-eunit: export ERL_AFLAGS = -config $(shell pwd)/rel/files/eunit.config
196197
just-eunit:
197-
@$(REBAR3) eunit $(EUNIT_OPTS)
198+
@$(REBAR3) eunit
198199

199200
.PHONY: soak-eunit
200201
soak-eunit: export BUILDDIR = $(shell pwd)
201202
soak-eunit: export ERL_AFLAGS = -config $(shell pwd)/rel/files/eunit.config
202203
soak-eunit: couch
203-
@$(REBAR3) setup_eunit 2> /dev/null
204-
while [ $$? -eq 0 ] ; do $(REBAR3) eunit $(EUNIT_OPTS) ; done
204+
@$(REBAR3) ic setup_eunit 2> /dev/null
205+
while [ $$? -eq 0 ] ; do $(REBAR3) eunit; done
205206

206207
erlfmt-check:
207208
ERLFMT_PATH=$(ERLFMT) python3 dev/format_check.py

apps/fabric/test/eunit/fabric_db_create_tests.erl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,4 @@ t_handle_shard_doc_conflict() ->
4444
]),
4545
meck:expect(fabric_util, recv, 4, {error, conflict}),
4646
?assertEqual({error, file_exists}, fabric_db_create:go(DbName, [])),
47-
48-
meck:unload(),
49-
ok = fabric:delete_db(DbName).
47+
meck:unload().

build-aux/Jenkinsfile.pr

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,6 @@ cd build
2121
tar -xf ${WORKSPACE}/apache-couchdb-*.tar.gz
2222
cd apache-couchdb-*
2323
./configure
24-
make couch || (make build-report && false)
25-
make fauxton || (make build-report && false)
26-
make docs || (make build-report && false)
27-
make escriptize || (make build-report && false)
28-
make python-black || (make build-report && false)
29-
make exunit || (make build-report && false)
30-
make eunit || (make build-report && false)
31-
make mango-test || (make build-report && false)
32-
make elixir-suite || (make build-report && false)
33-
make elixir-suite || (make build-report && false)
34-
make weatherreport-test || (make build-report && false)
3524
make check || (make build-report && false)
3625
'''
3726

@@ -96,7 +85,6 @@ pipeline {
9685
post {
9786
cleanup {
9887
// UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894
99-
sh 'echo ${WORKSPACE}'
10088
sh 'rm -rf ${WORKSPACE}/*'
10189
}
10290
}
@@ -169,25 +157,13 @@ pipeline {
169157
}
170158
steps {
171159
unstash 'tarball'
172-
sh 'mkdir -p ${ERLANG_VERSION}'
173-
sh 'cd ${ERLANG_VERSION}}'
174-
sh 'rm -rf build'
175-
sh 'mkdir build'
176-
sh 'cd build'
177-
sh 'tar -xf ${WORKSPACE}/apache-couchdb-*.tar.gz'
178-
sh 'cd apache-couchdb-*'
179-
sh 'echo #######################################'
180-
sh 'echo " +++ ./configure"'
181-
sh './configure'
182-
sh 'echo " +++ make couch"'
183-
sh 'make couch || (make build-report && false)'
160+
sh( script: build_and_test )
184161
}
185162
post {
186163
always {
187164
junit '_build/test/*.xml'
188165
}
189166
cleanup {
190-
sh 'echo ${WORKSPACE}'
191167
sh 'rm -rf ${WORKSPACE}/*'
192168
}
193169
}

build-aux/couchdb-build-release.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
1818

1919
# copy sources over
2020
git archive ${CURRENT_BRANCH} | tar -xC ${REL_DIR}/ -f -
21-
cd _build/default/lib/
21+
cd apps
2222
for repo in *; do
2323
cd ${repo}
2424
if [ -d ".git" ]; then
25-
mkdir -p ../../../../${REL_DIR}/apps/${repo}
25+
mkdir -p ../../${REL_DIR}/apps/${repo}
2626
git_ish=`git rev-parse --short HEAD`
2727
git archive ${git_ish} \
28-
| tar --exclude '*do_not_compile.erl' -xC ../../../../${REL_DIR}/apps/${repo}/ -f -
28+
| tar --exclude '*do_not_compile.erl' -xC ../../${REL_DIR}/apps/${repo}/ -f -
2929
fi
3030
set +e
31-
grep -rl '{vsn, git}' ../../../../${REL_DIR}/apps/${repo}/ 2>/dev/null \
31+
grep -rl '{vsn, git}' ../../${REL_DIR}/apps/${repo}/ 2>/dev/null \
3232
| xargs sed -ie "s/{vsn, git}/{vsn, \"${VERSION}\"}/" 2>/dev/null
3333
set -e
3434
cd ..
@@ -53,5 +53,4 @@ if test -e .git; then
5353
fi
5454

5555
# copy our rebar
56-
cd ../..
5756
cp bin/rebar3 ${REL_DIR}/bin/rebar3

build-aux/show-test-results.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
TEST_COLLECTIONS = {
12-
"EUnit": "_build/test/lib/**/.eunit/*.xml",
12+
"EUnit": "_build/test/*.xml",
1313
"EXUnit": "_build/integration/lib/couchdbtest/*.xml",
1414
"Mango": "src/mango/*.xml",
1515
"JavaScript": "test/javascript/*.xml",

configure

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ if [ -z "${ERLFMT}" ]; then
306306
fi
307307

308308
install_dependencies() {
309-
echo "==> Installing dependencies"
310309
regex='(https?|ftp|file)://[-[:alnum:]\+&@#/%?=~_|!:,.;]*[-[:alnum:]\+&@#/%=~_|]'
311310

312311
while IFS= read -r deps; do
@@ -322,22 +321,25 @@ install_dependencies() {
322321
done < "deps.txt"
323322

324323
if [ ! -d "${rootdir}/apps/proper" ] && [ $WITH_PROPER == "true" ]; then
325-
echo "==> Fetching proper}"
324+
echo "==> Fetching proper"
326325
git clone --depth 1 --branch v1.4 https://github.com/proper-testing/proper "${rootdir}/apps/proper"
327326
fi
328327

329328
if [ ! -d "${rootdir}/apps/fauxton" ] && [ $WITH_FAUXTON == 1 ]; then
330-
echo "==> Fetching fauxton}"
329+
echo "==> Fetching fauxton"
331330
git clone --depth 1 --branch v1.2.8 https://github.com/apache/couchdb-fauxton "${rootdir}/apps/fauxton"
332331
fi
333332

334333
if [ ! -d "${rootdir}/apps/docs" ] && [ $WITH_DOCS == 1 ]; then
335-
echo "==> Fetching couchdb-documentation}"
334+
echo "==> Fetching couchdb-documentation"
336335
git clone --depth 1 --branch 82-rebar3 https://github.com/jiahuili430/couchdb-documentation "${rootdir}/apps/docs"
337336
fi
338337
}
339338

340-
install_dependencies
339+
if [ $SKIP_DEPS -ne 1 ]; then
340+
echo "==> installing dependencies"
341+
install_dependencies
342+
fi
341343

342344
# only update dependencies, when we are not in a release tarball
343345
if [ -d .git -a $SKIP_DEPS -ne 1 ]; then

deps.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
config config tag 2.1.9
1+
config config https://github.com/jiahuili430/couchdb-config.git 82-rebar3
22
b64url b64url tag 1.0.3
33
ets_lru ets-lru tag 1.1.0
44
khash khash https://github.com/jiahuili430/couchdb-khash 82-rebar3

rebar.config.script

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ AddConfig = [
168168
{application, couch_epi}
169169
]},
170170
{profiles, [{test, [{extra_src_dirs, [{"test", [{recursive, true}]}]}]}]},
171-
{escript_main_app, weatherreport},
172171
{dialyzer, [
173172
{plt_location, local},
174173
{plt_location, COUCHDB_ROOT},
@@ -267,8 +266,6 @@ AddConfig = [
267266
{template, "rel/files/couchdb.cmd.in", "bin/couchdb.cmd"}
268267
]}
269268
]},
270-
{provider_hooks, [{post, [{compile, escriptize}]}]},
271-
{artifacts, ["bin/weatherreport"]},
272269
{post_hooks, [{compile, "escript support/build_js.escript"}]}
273270
].
274271

rel/overlay/etc/default.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ view_index_dir = {{view_index_dir}}
1414
; The actual limit may be slightly lower depending on how
1515
; many schedulers you have as the allowance is divided evenly
1616
; among them.
17-
;max_dbs_open = 500
17+
max_dbs_open = 500
1818

1919
; Method used to compress everything that is appended to database and view index files, except
2020
; for attachments (see the attachments section). Available methods are:

0 commit comments

Comments
 (0)