Skip to content

Commit 4d56418

Browse files
committed
squash! partial revert for arm addons buildbot
1 parent d427cac commit 4d56418

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

Makefile

+26-15
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,17 @@ endif
6666
# to check for changes.
6767
.PHONY: $(NODE_EXE) $(NODE_G_EXE)
6868

69+
# The -r/-L check stops it recreating the link if it is already in place,
70+
# otherwise $(NODE_EXE) being a .PHONY target means it is always re-run.
71+
# Without the check there is a race condition between the link being deleted
72+
# and recreated which can break the addons build when running test-ci
6973
$(NODE_EXE): config.gypi out/Makefile
7074
$(MAKE) -C out BUILDTYPE=Release V=$(V)
71-
ln -fs out/Release/$(NODE_EXE) $@
75+
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Release/$(NODE_EXE) $@; fi
7276

7377
$(NODE_G_EXE): config.gypi out/Makefile
7478
$(MAKE) -C out BUILDTYPE=Debug V=$(V)
75-
ln -fs out/Debug/$(NODE_EXE) $@
79+
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
7680

7781
out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \
7882
deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \
@@ -186,7 +190,8 @@ v8:
186190
tools/make-v8.sh
187191
$(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)
188192

189-
test: build-addons
193+
test: all
194+
$(MAKE) build-addons
190195
$(MAKE) cctest
191196
$(PYTHON) tools/test.py --mode=release -J \
192197
doctool inspector known_issues message pseudo-tty parallel sequential $(CI_NATIVE_SUITES)
@@ -198,6 +203,10 @@ test-parallel: all
198203
test-valgrind: all
199204
$(PYTHON) tools/test.py --mode=release --valgrind sequential parallel message
200205

206+
# Builds test/addons, test/addons-napi and test/gc.
207+
build-addons: $(NODE_EXE)
208+
./$< tools/build-addons.js
209+
201210
clear-stalled:
202211
# Clean up any leftover processes but don't error if found.
203212
ps awwx | grep Release/node | grep -v grep | cat
@@ -206,25 +215,26 @@ clear-stalled:
206215
echo $${PS_OUT} | xargs kill; \
207216
fi
208217

209-
test-gc: build-addons
218+
test-gc: test-build
210219
$(PYTHON) tools/test.py --mode=release gc
211220

212-
# Builds test/addons, test/addons-napi and test/gc.
213-
build-addons: $(NODE_EXE)
214-
./$< tools/build-addons.js
221+
test-gc-clean:
222+
$(RM) -r test/gc/build
223+
224+
test-build: | all build-addons
215225

216-
test-all: build-addons
226+
test-all: test-build
217227
$(PYTHON) tools/test.py --mode=debug,release
218228

219-
test-all-valgrind: build-addons
229+
test-all-valgrind: test-build
220230
$(PYTHON) tools/test.py --mode=debug,release --valgrind
221231

222232
CI_NATIVE_SUITES := addons addons-napi
223233
CI_JS_SUITES := doctool inspector known_issues message parallel pseudo-tty sequential
224234

225235
# Build and test addons without building anything else
226236
test-ci-native: LOGLEVEL := info
227-
test-ci-native: build-addons
237+
test-ci-native: | build-addons
228238
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
229239
--mode=release --flaky-tests=$(FLAKY_TESTS) \
230240
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES)
@@ -254,13 +264,13 @@ test-ci: | clear-stalled build-addons
254264
echo $${PS_OUT} | xargs kill; exit 1; \
255265
fi
256266

257-
test-release: build-addons
267+
test-release: test-build
258268
$(PYTHON) tools/test.py --mode=release
259269

260-
test-debug: build-addons
270+
test-debug: test-build
261271
$(PYTHON) tools/test.py --mode=debug
262272

263-
test-message: build-addons
273+
test-message: test-build
264274
$(PYTHON) tools/test.py message
265275

266276
test-simple: | cctest # Depends on 'all'.
@@ -294,10 +304,10 @@ test-npm: $(NODE_EXE)
294304
test-npm-publish: $(NODE_EXE)
295305
npm_package_config_publishtest=true $(NODE) deps/npm/test/run.js
296306

297-
test-addons: build-addons
307+
test-addons: test-build
298308
$(PYTHON) tools/test.py --mode=release addons
299309

300-
test-addons-napi: build-addons
310+
test-addons-napi: test-build
301311
$(PYTHON) tools/test.py --mode=release addons-napi
302312

303313
test-addons-clean:
@@ -871,6 +881,7 @@ endif
871881
test-ci-js \
872882
test-ci-native \
873883
test-gc \
884+
test-gc-clean \
874885
test-v8 \
875886
test-v8-all \
876887
test-v8-benchmarks \

0 commit comments

Comments
 (0)