40
40
COUCHDB_GIT_SHA=$(shell git rev-parse --short --verify HEAD)
41
41
# IN_RC contains the -RCx suffix in the name if present
42
42
IN_RC = $(shell git describe --tags --always --first-parent \
43
- | grep -Eo -- '-RC[0-9]+' 2>/dev/null )
43
+ | grep -Eo -- '-RC[0-9]+' 2>nul )
44
44
# ON_TAG matches *ONLY* if we are on a release or RC tag
45
45
ON_TAG = $(shell git describe --tags --always --first-parent \
46
- | grep -Eo -- '^[0-9]+\.[0-9]\.[0-9]+(-RC[0-9]+)?$$' 2>/dev/null )
46
+ | grep -Eo -- '^[0-9]+\.[0-9]\.[0-9]+(-RC[0-9]+)?$$' 2>nul )
47
47
# RELTAG contains the #.#.# from git describe, which might be used
48
48
RELTAG = $(shell git describe --tags --always --first-parent \
49
- | grep -Eo -- '^[0-9]+\.[0-9]\.[0-9]+' 2>/dev/null )
49
+ | grep -Eo -- '^[0-9]+\.[0-9]\.[0-9]+' 2>nul )
50
50
# DIRTY identifies if we're not on a commit
51
- DIRTY = $(shell git describe --dirty | grep -Eo -- '-dirty' 2>/dev/null )
51
+ DIRTY = $(shell git describe --dirty | grep -Eo -- '-dirty' 2>nul )
52
52
53
53
ifeq ($(ON_TAG),)
54
54
# 4. Not on a tag.
@@ -115,34 +115,62 @@ fauxton: share\www
115
115
.PHONY: check
116
116
# target: check - Test everything
117
117
check: all
118
+ @$(MAKE) -f Makefile.win test-cluster-with-quorum
119
+ @$(MAKE) -f Makefile.win test-cluster-without-quorum
118
120
@$(MAKE) -f Makefile.win eunit
119
121
@$(MAKE) -f Makefile.win javascript
120
122
121
123
122
124
.PHONY: eunit
123
125
# target: eunit - Run EUnit tests, use EUNIT_OPTS to provide custom options
124
- eunit: export ERL_AFLAGS = $(shell echo "-config rel/files/eunit.config")
125
- eunit: export BUILDDIR = $(shell echo %cd%)
126
126
eunit: couch
127
- @$(REBAR) setup_eunit 2> nul
128
- @$(REBAR) -r eunit $(EUNIT_OPTS)
127
+ @set ERL_AFLAGS="-config rel/files/eunit.config" && set BUILDDIR = $(shell echo %cd%) && $(REBAR) setup_eunit 2> nul
128
+ @set ERL_AFLAGS="-config rel/files/eunit.config" && set BUILDDIR = $(shell echo %cd%) && $(REBAR) -r eunit $(EUNIT_OPTS)
129
129
130
- setup-eunit: export BUILDDIR = $(shell pwd)
131
- setup-eunit: export ERL_AFLAGS = $(shell echo "-config rel/files/eunit.config")
132
130
setup-eunit:
133
- @$(REBAR) setup_eunit 2> nul
131
+ @set ERL_AFLAGS="-config rel/files/eunit.config" && set BUILDDIR = $(shell echo %cd%) && $(REBAR) setup_eunit 2> nul
134
132
135
- just-eunit: export BUILDDIR = $(shell pwd)
136
- just-eunit: export ERL_AFLAGS = $(shell echo "-config rel/files/eunit.config")
137
133
just-eunit:
138
- @$(REBAR) -r eunit $(EUNIT_OPTS)
134
+ @set ERL_AFLAGS="-config rel/files/eunit.config" && set BUILDDIR = $(shell echo %cd%) && $(REBAR) -r eunit $(EUNIT_OPTS)
135
+
139
136
140
137
.PHONY: elixir
141
138
elixir:
142
139
@del /s/q dev\lib 2> nul
143
140
@dev\run -a adm:pass --no-eval test\elixir\run.cmd
144
141
145
142
143
+ .PHONY: test-cluster-with-quorum
144
+ test-cluster-with-quorum: devclean
145
+ -@mkdir share\www\script\test
146
+ ifeq ($(IN_RELEASE), true)
147
+ @copy test\javascript\tests\lorem*.txt share\www\script\test
148
+ else
149
+ -@mkdir src\fauxton\dist\release\test
150
+ @copy test\javascript\tests\lorem*.txt src\fauxton\dist\release\test
151
+ endif
152
+ @dev\run -n 3 -q --with-admin-party-please \
153
+ --enable-erlang-views --degrade-cluster 1 \
154
+ -c "startup_jitter=0" \
155
+ "python test\javascript\run --suites \"$(suites)\" \
156
+ --ignore \"$(ignore_js_suites)\" \
157
+ --path test\javascript\tests-cluster\with-quorum"
158
+
159
+ .PHONY: test-cluster-without-quorum
160
+ test-cluster-without-quorum: devclean
161
+ -@mkdir share\www\script\test
162
+ ifeq ($(IN_RELEASE), true)
163
+ @copy test\javascript\tests\lorem*.txt share\www\script\test
164
+ else
165
+ -@mkdir src\fauxton\dist\release\test
166
+ @copy test\javascript\tests\lorem*.txt src\fauxton\dist\release\test
167
+ endif
168
+ @dev\run -n 3 -q --with-admin-party-please \
169
+ --enable-erlang-views --degrade-cluster 2 \
170
+ -c "startup_jitter=0" \
171
+ "python test\javascript\run --suites \"$(suites)\" \
172
+ --ignore \"$(ignore_js_suites)\" \
173
+ --path test\javascript\tests-cluster\without-quorum"
146
174
147
175
148
176
.PHONY: javascript
@@ -162,6 +190,11 @@ endif
162
190
python test\javascript\run $(suites)
163
191
164
192
193
+ .PHONY: mango-test
194
+ mango-test: devclean all
195
+ @cd src\mango && ..\..\dev\run -n 1 --admin=testuser:testpass nosetests
196
+
197
+
165
198
.PHONY: check-qs
166
199
# target: check-qs - Run query server tests (ruby and rspec required!)
167
200
check-qs:
0 commit comments