Skip to content

Commit d263a75

Browse files
authored
Remove JS tests + support for harness (#3197) (#3203)
1 parent 8da8306 commit d263a75

File tree

141 files changed

+30
-18463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+30
-18463
lines changed

INSTALL.Unix.md

+12-15
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ You should have the following installed:
4545
* https://archive.mozilla.org/pub/firefox/releases/60.9.0esr/source/ (src/js)
4646
* GNU Make (http://www.gnu.org/software/make/)
4747
* GNU Compiler Collection (http://gcc.gnu.org/)
48-
* libcurl (http://curl.haxx.se/libcurl/)
49-
* help2man (http://www.gnu.org/s/help2man/)
5048
* Python (>=2.7) (http://python.org/)
5149

5250
To build Fauxton, you should have the following installed:
@@ -56,20 +54,20 @@ To build Fauxton, you should have the following installed:
5654
To build the documentation, you should have the following installed:
5755
* Python Sphinx (>=1.5) (http://pypi.python.org/pypi/Sphinx)
5856

59-
It is recommended that you install Erlang OTP R16B03-1 or above where
60-
possible. You will only need libcurl if you plan to run the
61-
JavaScript test suite. And help2man is only need if you plan on
62-
installing the CouchDB man pages. Python and Sphinx are only required
63-
for building the online documentation. Documentation build can be disabled
64-
by adding the `--disable-docs` flag to the `configure` script.
57+
It is recommended that you install Erlang OTP R16B03-1 or above where possible.
58+
Python and Sphinx are only required for building the online documentation.
59+
Documentation build can be disabled by adding the `--disable-docs` flag to the
60+
`configure` script.
6561

6662
### Debian-based Systems
6763

6864
You can install the dependencies by running:
6965

7066
sudo apt-get --no-install-recommends -y install \
7167
build-essential pkg-config erlang erlang-reltool \
72-
libicu-dev libmozjs185-dev libcurl4-openssl-dev
68+
libicu-dev libmozjs-60-dev
69+
70+
Your distribution may have libmozjs-68-dev instead of 60. Both are supported.
7371

7472
You can install the Node.JS dependencies via [NodeSource](https://github.com/nodesource/distributions#installation-instructions).
7573

@@ -89,9 +87,8 @@ packages.
8987
You can install the dependencies by running:
9088

9189
sudo yum install autoconf autoconf-archive automake \
92-
curl-devel erlang-asn1 erlang-erts erlang-eunit \
93-
erlang-xmerl help2man \
94-
js-devel-1.8.5 libicu-devel libtool perl-Test-Harness
90+
erlang-asn1 erlang-erts erlang-eunit erlang-xmerl \
91+
libmozjs-60-dev libicu-devel libtool perl-Test-Harness
9592

9693
You can install the Node.JS dependencies via [NodeSource](https://github.com/nodesource/distributions#rpminstall).
9794

@@ -111,7 +108,7 @@ the Command Line Tools:
111108
You can then install the other dependencies by running:
112109

113110
brew install autoconf autoconf-archive automake libtool \
114-
erlang icu4c spidermonkey curl pkg-config
111+
erlang icu4c spidermonkey pkg-config
115112

116113
You can install the Node.JS dependencies via the
117114
[official Macintosh installer](https://nodejs.org/en/download/).
@@ -143,8 +140,8 @@ You can install this by running:
143140

144141
You can install the remaining dependencies by running:
145142

146-
pkg install help2man openssl icu curl git bash \
147-
autoconf automake libtool node spidermonkey185 \
143+
pkg install openssl icu git bash \
144+
autoconf automake libtool node spidermonkey60 \
148145
erlang node8 npm-node8 lang/python py27-sphinx py27-pip
149146
pip install --upgrade sphinx_rtd_theme nose requests hypothesis
150147

INSTALL.Windows.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Build & Test
1313
Once all dependencies are built and installed per the documentation in
1414
couchdb-glazier, these commands will configure and build CouchDB:
1515

16-
powershell -ExecutionPolicy Bypass .\configure.ps1 -WithCurl
16+
powershell -ExecutionPolicy Bypass .\configure.ps1
1717
make -f Makefile.win check
1818

1919
This will build couchdb, as well as run the eunit and javascript tests.
2020

21-
As of CouchDB 2.0 RC1, all eunit and javascript tests should pass.
21+
As of CouchDB 2.0 RC1, all tests should pass.

Makefile

+2-51
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ DIALYZE_OPTS=$(shell echo "\
9090
" | sed -e 's/[a-z]\{1,\}= / /g')
9191
EXUNIT_OPTS=$(subst $(comma),$(space),$(tests))
9292

93-
#ignore javascript tests
94-
ignore_js_suites=
95-
9693
TEST_OPTS="-c 'startup_jitter=0' -c 'default_security=admin_local'"
9794

9895
################################################################################
@@ -208,15 +205,15 @@ python-black: .venv/bin/black
208205
@python3 -c "import sys; exit(1 if sys.version_info >= (3,6) else 0)" || \
209206
LC_ALL=C.UTF-8 LANG=C.UTF-8 .venv/bin/black --check \
210207
--exclude="build/|buck-out/|dist/|_build/|\.git/|\.hg/|\.mypy_cache/|\.nox/|\.tox/|\.venv/|src/rebar/pr2relnotes.py|src/fauxton" \
211-
build-aux/*.py dev/run test/javascript/run src/mango/test/*.py src/docs/src/conf.py src/docs/ext/*.py .
208+
build-aux/*.py dev/run src/mango/test/*.py src/docs/src/conf.py src/docs/ext/*.py .
212209

213210
python-black-update: .venv/bin/black
214211
@python3 -c "import sys; exit(1 if sys.version_info < (3,6) else 0)" || \
215212
echo "Python formatter not supported on Python < 3.6; check results on a newer platform"
216213
@python3 -c "import sys; exit(1 if sys.version_info >= (3,6) else 0)" || \
217214
LC_ALL=C.UTF-8 LANG=C.UTF-8 .venv/bin/black \
218215
--exclude="build/|buck-out/|dist/|_build/|\.git/|\.hg/|\.mypy_cache/|\.nox/|\.tox/|\.venv/|src/rebar/pr2relnotes.py|src/fauxton" \
219-
build-aux/*.py dev/run test/javascript/run src/mango/test/*.py src/docs/src/conf.py src/docs/ext/*.py .
216+
build-aux/*.py dev/run src/mango/test/*.py src/docs/src/conf.py src/docs/ext/*.py .
220217

221218
.PHONY: elixir
222219
elixir: export MIX_ENV=integration
@@ -256,44 +253,6 @@ elixir-check-formatted: elixir-init
256253
elixir-credo: elixir-init
257254
@mix credo
258255

259-
.PHONY: javascript
260-
# target: javascript - Run JavaScript test suites or specific ones defined by suites option
261-
javascript: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
262-
javascript:
263-
264-
@$(MAKE) devclean
265-
@mkdir -p share/www/script/test
266-
ifeq ($(IN_RELEASE), true)
267-
@cp test/javascript/tests/lorem*.txt share/www/script/test/
268-
else
269-
@mkdir -p src/fauxton/dist/release/test
270-
@cp test/javascript/tests/lorem*.txt src/fauxton/dist/release/test/
271-
endif
272-
@dev/run -n 1 -q --with-admin-party-please \
273-
--enable-erlang-views \
274-
"$(TEST_OPTS)" \
275-
'test/javascript/run --suites "$(suites)" \
276-
--ignore "$(ignore_js_suites)"'
277-
278-
279-
.PHONY: soak-javascript
280-
soak-javascript: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
281-
soak-javascript:
282-
@mkdir -p share/www/script/test
283-
ifeq ($(IN_RELEASE), true)
284-
@cp test/javascript/tests/lorem*.txt share/www/script.test/
285-
else
286-
@mkdir -p src/fauxton/dist/release/test
287-
@cp test/javascript/tests/lorem*.txt src/fauxton/dist/release/test/
288-
endif
289-
@rm -rf dev/lib
290-
while [ $$? -eq 0 ]; do \
291-
dev/run -n 1 -q --with-admin-party-please \
292-
"$(TEST_OPTS)" \
293-
'test/javascript/run --suites "$(suites)" \
294-
--ignore "$(ignore_js_suites)"' \
295-
done
296-
297256
.PHONY: build-report
298257
# target: build-report - Generate and upload a build report
299258
build-report:
@@ -322,14 +281,6 @@ list-eunit-suites:
322281
| sort
323282

324283

325-
.PHONY: list-js-suites
326-
# target: list-js-suites - List JavaScript test suites
327-
list-js-suites:
328-
@find ./test/javascript/tests/ -type f -name *.js -exec basename {} \; \
329-
| cut -d '.' -f -1 \
330-
| sort
331-
332-
333284
.PHONY: build-test
334285
# target: build-test - Test build script
335286
build-test:

Makefile.win

+3-26
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ DIALYZE_OPTS=skip_deps=$(skip_deps)
8686

8787
EXUNIT_OPTS=$(subst $(comma),$(space),$(tests))
8888

89-
#ignore javascript tests
90-
ignore_js_suites=
91-
9289
TEST_OPTS=-c startup_jitter=0 -c default_security=admin_local
9390

9491
################################################################################
@@ -185,15 +182,15 @@ python-black: .venv/bin/black
185182
@python.exe -c "import sys; exit(1 if sys.version_info >= (3,6) else 0)" || \
186183
.venv\Scripts\black.exe --check \
187184
--exclude="build/|buck-out/|dist/|_build/|\.git/|\.hg/|\.mypy_cache/|\.nox/|\.tox/|\.venv/|src/rebar/pr2relnotes.py|src/fauxton" \
188-
build-aux dev\run test\javascript\run src\mango\test src\docs\src\conf.py src\docs\ext .
185+
build-aux dev\run src\mango\test src\docs\src\conf.py src\docs\ext .
189186

190187
python-black-update: .venv/bin/black
191188
@python.exe -c "import sys; exit(1 if sys.version_info < (3,6) else 0)" || \
192189
echo 'Python formatter not supported on Python < 3.6; check results on a newer platform'
193190
@python.exe -c "import sys; exit(1 if sys.version_info >= (3,6) else 0)" || \
194191
.venv\Scripts\black.exe \
195192
--exclude="build/|buck-out/|dist/|_build/|\.git/|\.hg/|\.mypy_cache/|\.nox/|\.tox/|\.venv/|src/rebar/pr2relnotes.py|src/fauxton" \
196-
build-aux dev\run test\javascript\run src\mango\test src\docs\src\conf.py src\docs\ext .
193+
build-aux dev\run src\mango\test src\docs\src\conf.py src\docs\ext .
197194

198195
.PHONY: elixir
199196
elixir: export MIX_ENV=integration
@@ -232,26 +229,6 @@ elixir-check-formatted: elixir-init
232229
elixir-credo: elixir-init
233230
@mix credo
234231

235-
236-
.PHONY: javascript
237-
# target: javascript - Run JavaScript test suites or specific ones defined by suites option
238-
javascript: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
239-
javascript:
240-
@$(MAKE) devclean
241-
-@mkdir share\www\script\test
242-
ifeq ($(IN_RELEASE), true)
243-
@copy test\javascript\tests\lorem*.txt share\www\script\test
244-
else
245-
-@mkdir src\fauxton\dist\release\test
246-
@copy test\javascript\tests\lorem*.txt src\fauxton\dist\release\test
247-
endif
248-
@python dev\run -n 1 -q --with-admin-party-please \
249-
--enable-erlang-views \
250-
$(TEST_OPTS) \
251-
'python test\javascript\run --suites "$(suites)" \
252-
--ignore "$(ignore_js_suites)"'
253-
254-
255232
.PHONY: check-qs
256233
# target: check-qs - Run query server tests (ruby and rspec required!)
257234
check-qs:
@@ -422,7 +399,7 @@ devclean:
422399
config.erl:
423400
@echo Apache CouchDB has not been configured.
424401
@echo Try "powershell -ExecutionPolicy Bypass .\configure.ps1 -?" for help.
425-
@echo You probably want "powershell -ExecutionPolicy Bypass .\configure.ps1 -WithCurl".
402+
@echo You probably want "powershell -ExecutionPolicy Bypass .\configure.ps1".
426403
@echo.
427404
@false
428405

build-aux/Jenkinsfile.full

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mkdir build
2121
cd build
2222
tar -xf ${WORKSPACE}/apache-couchdb-*.tar.gz
2323
cd apache-couchdb-*
24-
./configure --with-curl --spidermonkey-version ${sm_ver}
24+
./configure --spidermonkey-version ${sm_ver}
2525
make check || (make build-report && false)
2626
'''
2727

@@ -93,7 +93,7 @@ pipeline {
9393
sh '''
9494
set
9595
rm -rf apache-couchdb-*
96-
./configure --with-curl
96+
./configure
9797
make dist
9898
chmod -R a+w * .
9999
'''
@@ -140,7 +140,7 @@ pipeline {
140140
cd build
141141
tar -xf $WORKSPACE/apache-couchdb-*.tar.gz
142142
cd apache-couchdb-*
143-
./configure --with-curl
143+
./configure
144144
gmake check || (build-aux/logfile-uploader.py && false)
145145
146146
# No package build for FreeBSD at this time
@@ -177,7 +177,7 @@ pipeline {
177177
cd build
178178
tar -xzf $WORKSPACE/apache-couchdb-*.tar.gz
179179
cd apache-couchdb-*
180-
./configure --with-curl --spidermonkey-version 60
180+
./configure --spidermonkey-version 60
181181
make check || (build-aux/logfile-uploader.py && false)
182182
183183
# No package build for macOS at this time

build-aux/Jenkinsfile.pr

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cd build
2121
tar -xf ${WORKSPACE}/apache-couchdb-*.tar.gz
2222
cd apache-couchdb-*
2323
. /usr/local/kerl/${KERL_VER}/activate
24-
./configure --with-curl --spidermonkey-version 60
24+
./configure --spidermonkey-version 60
2525
make check || (make build-report && false)
2626
'''
2727

@@ -80,7 +80,7 @@ pipeline {
8080
set
8181
rm -rf apache-couchdb-*
8282
. /usr/local/kerl/${LOW_ERLANG_VER}/activate
83-
./configure --with-curl
83+
./configure
8484
make dist
8585
chmod -R a+w * .
8686
'''

configure

+1-11
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ basename=`basename $0`
2222
PACKAGE_AUTHOR_NAME="The Apache Software Foundation"
2323

2424
# TEST=0
25-
WITH_CURL="false"
2625
WITH_PROPER="true"
2726
WITH_FAUXTON=1
2827
WITH_DOCS=1
@@ -47,11 +46,10 @@ Options:
4746
4847
-h | --help display a short help message and exit
4948
-u | --user USER set the username to run as (defaults to $COUCHDB_USER)
50-
-c | --with-curl request that couchjs is linked to cURL (default false)
5149
--disable-fauxton do not build Fauxton
5250
--disable-docs do not build any documentation or manpages
5351
--erlang-md5 use erlang for md5 hash operations
54-
--dev alias for --with-curl --disable-docs --disable-fauxton
52+
--dev alias for --disable-docs --disable-fauxton
5553
--spidermonkey-version VSN specify the version of SpiderMonkey to use (defaults to $SM_VSN)
5654
--skip-deps do not update erlang dependencies
5755
--rebar=PATH use rebar by specified path (version >=2.6.0 && <3.0 required)
@@ -66,12 +64,6 @@ parse_opts() {
6664
exit
6765
;;
6866

69-
--with-curl|-c)
70-
WITH_CURL="true"
71-
shift
72-
continue
73-
;;
74-
7567
--without-proper)
7668
WITH_PROPER="false"
7769
shift
@@ -99,7 +91,6 @@ parse_opts() {
9991
--dev)
10092
WITH_DOCS=0
10193
WITH_FAUXTON=0
102-
WITH_CURL="true"
10394
shift
10495
continue
10596
;;
@@ -238,7 +229,6 @@ spidermonkey_version = $SM_VSN
238229
EOF
239230

240231
cat > $rootdir/config.erl << EOF
241-
{with_curl, $WITH_CURL}.
242232
{with_proper, $WITH_PROPER}.
243233
{erlang_md5, $ERLANG_MD5}.
244234
{spidermonkey_version, "$SM_VSN"}.

configure.ps1

-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
This command is responsible for generating the build
66
system for Apache CouchDB.
77
8-
-WithCurl request that couchjs is linked to cURL (default false)
98
-DisableFauxton request build process skip building Fauxton (default false)
109
-DisableDocs request build process skip building documentation (default false)
1110
-SkipDeps do not update Erlang dependencies (default false)
@@ -42,7 +41,6 @@
4241

4342
Param(
4443
[switch]$Test = $false,
45-
[switch]$WithCurl = $false, # request that couchjs is linked to cURL (default false)
4644
[switch]$DisableFauxton = $false, # do not build Fauxton
4745
[switch]$DisableDocs = $false, # do not build any documentation or manpages
4846
[switch]$SkipDeps = $false, # do not update erlang dependencies
@@ -183,9 +181,7 @@ spidermonkey_version = $SpiderMonkeyVersion
183181
"@
184182
$InstallMk | Out-File "$rootdir\install.mk" -encoding ascii
185183

186-
$lowercurl = "$WithCurl".ToLower()
187184
$ConfigERL = @"
188-
{with_curl, $lowercurl}.
189185
{spidermonkey_version, "$SpiderMonkeyVersion"}.
190186
"@
191187
$ConfigERL | Out-File "$rootdir\config.erl" -encoding ascii

src/couch/priv/couch_js/1.8.5/help.h

-7
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,9 @@ static const char USAGE_TEMPLATE[] =
4646
"\n"
4747
" -h display a short help message and exit\n"
4848
" -V display version information and exit\n"
49-
" -H enable %s cURL bindings (only avaiable\n"
50-
" if package was built with cURL available)\n"
51-
" -T enable test suite specific functions (these\n"
52-
" should not be enabled for production systems)\n"
5349
" -S SIZE specify that the runtime should allow at\n"
5450
" most SIZE bytes of memory to be allocated\n"
5551
" default is 64 MiB\n"
56-
" -u FILE path to a .uri file containing the address\n"
57-
" (or addresses) of one or more servers\n"
5852
" --eval Enable runtime code evaluation (dangerous!)\n"
5953
"\n"
6054
"Report bugs at <%s>.\n";
@@ -78,7 +72,6 @@ static const char USAGE_TEMPLATE[] =
7872
basename, \
7973
basename, \
8074
PACKAGE_NAME, \
81-
basename, \
8275
PACKAGE_BUGREPORT)
8376

8477
#define DISPLAY_USAGE couch_usage(BASENAME)

0 commit comments

Comments
 (0)