-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug mode tests #3293
Debug mode tests #3293
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,15 @@ OSTYPE := $(shell uname -s | tr '[A-Z]' '[a-z]') | |
EXEEXT := $(shell $(PYTHON) -c \ | ||
"import sys; print('.exe' if sys.platform == 'win32' else '')") | ||
|
||
NODE ?= ./node$(EXEEXT) | ||
NODE_EXE = node$(EXEEXT) | ||
NODE_G_EXE = node_g$(EXEEXT) | ||
|
||
ifeq ($(BUILDTYPE),Release) | ||
NODE ?= ./$(NODE_EXE) | ||
else | ||
NODE ?= ./$(NODE_G_EXE) | ||
endif | ||
|
||
# Flags for packaging. | ||
BUILD_DOWNLOAD_FLAGS ?= --download=all | ||
BUILD_INTL_FLAGS ?= --with-intl=small-icu | ||
|
@@ -34,7 +39,7 @@ V ?= 1 | |
ifeq ($(BUILDTYPE),Release) | ||
all: out/Makefile $(NODE_EXE) | ||
else | ||
all: out/Makefile $(NODE_EXE) $(NODE_G_EXE) | ||
all: out/Makefile $(NODE_G_EXE) | ||
endif | ||
|
||
# The .PHONY is needed to ensure that we recursively use the out/Makefile | ||
|
@@ -88,15 +93,17 @@ cctest: all | |
@out/$(BUILDTYPE)/$@ | ||
|
||
test: | cctest # Depends on 'all'. | ||
$(PYTHON) tools/test.py --mode=release message parallel sequential -J | ||
$(PYTHON) tools/test.py --mode=$(BUILDTYPE) -J \ | ||
message parallel sequential | ||
$(MAKE) jslint | ||
$(MAKE) cpplint | ||
|
||
test-parallel: all | ||
$(PYTHON) tools/test.py --mode=release parallel -J | ||
$(PYTHON) tools/test.py --mode=$(BUILDTYPE) -J parallel | ||
|
||
test-valgrind: all | ||
$(PYTHON) tools/test.py --mode=release --valgrind sequential parallel message | ||
$(PYTHON) tools/test.py --mode=$(BUILDTYPE) --valgrind \ | ||
sequential parallel message | ||
|
||
test/gc/node_modules/weak/build/Release/weakref.node: $(NODE_EXE) | ||
$(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \ | ||
|
@@ -133,7 +140,7 @@ test/addons/.buildstamp: $(ADDONS_BINDING_GYPS) | test/addons/.docbuildstamp | |
build-addons: $(NODE_EXE) test/addons/.buildstamp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same for this one, and possibly others There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't touch that yet because The add-on tests all expect the shared object in out/Release but node-gyp puts the add-on in out/Debug when it detects a debug build. I decided to put off fixing the tests until it was clear if this is the direction we're going to take. |
||
|
||
test-gc: all test/gc/node_modules/weak/build/Release/weakref.node | ||
$(PYTHON) tools/test.py --mode=release gc | ||
$(PYTHON) tools/test.py --mode=$(BUILDTYPE) gc | ||
|
||
test-build: | all build-addons | ||
|
||
|
@@ -144,8 +151,9 @@ test-all-valgrind: test-build | |
$(PYTHON) tools/test.py --mode=debug,release --valgrind | ||
|
||
test-ci: | build-addons | ||
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --flaky-tests=$(FLAKY_TESTS) \ | ||
$(TEST_CI_ARGS) addons message parallel sequential | ||
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=$(BUILDTYPE) \ | ||
--flaky-tests=$(FLAKY_TESTS) $(TEST_CI_ARGS) \ | ||
addons message parallel sequential | ||
|
||
test-release: test-build | ||
$(PYTHON) tools/test.py --mode=release | ||
|
@@ -175,11 +183,11 @@ test-npm-publish: $(NODE_EXE) | |
npm_package_config_publishtest=true $(NODE) deps/npm/test/run.js | ||
|
||
test-addons: test-build | ||
$(PYTHON) tools/test.py --mode=release addons | ||
$(PYTHON) tools/test.py --mode=$(BUILDTYPE) addons | ||
|
||
test-timers: | ||
$(MAKE) --directory=tools faketime | ||
$(PYTHON) tools/test.py --mode=release timers | ||
$(PYTHON) tools/test.py --mode=$(BUILDTYPE) timers | ||
|
||
test-timers-clean: | ||
$(MAKE) --directory=tools clean | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1304,7 +1304,7 @@ def ProcessOptions(options): | |
global VERBOSE | ||
VERBOSE = options.verbose | ||
options.arch = options.arch.split(',') | ||
options.mode = options.mode.split(',') | ||
options.mode = options.mode.lower().split(',') # 'Release' => 'release'. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure this comment really adds value here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I figured that it wasn't entirely obvious from context what options.mode is and why it needs to be lower-cased. I can remove it if you feel strongly about it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
options.run = options.run.split(',') | ||
if options.run == [""]: | ||
options.run = None | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be just
$(NODE)
now?