Skip to content
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

benchmark: build the misc/function_call addon #16934

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ test-valgrind: all
test-check-deopts: all
$(PYTHON) tools/test.py --mode=release --check-deopts parallel sequential -J

benchmark/misc/function_call/build/Release/binding.node: all \
benchmark/misc/function_call/build/Release/binding.node: \
benchmark/misc/function_call/binding.cc \
benchmark/misc/function_call/binding.gyp
$(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
Expand Down Expand Up @@ -314,7 +314,8 @@ test/addons/.buildstamp: config.gypi \
# .buildstamp is out of date and need a rebuild.
# Just goes to show that recursive make really is harmful...
# TODO(bnoordhuis) Force rebuild after gyp update.
build-addons: | $(NODE_EXE) test/addons/.buildstamp
build-addons: | $(NODE_EXE) test/addons/.buildstamp \
benchmark/misc/function_call/build/Release/binding.node

ADDONS_NAPI_BINDING_GYPS := \
$(filter-out test/addons-napi/??_*/binding.gyp, \
Expand Down Expand Up @@ -386,7 +387,8 @@ CI_DOC := doctool

# Build and test addons without building anything else
test-ci-native: LOGLEVEL := info
test-ci-native: | test/addons/.buildstamp test/addons-napi/.buildstamp
test-ci-native: | test/addons/.buildstamp test/addons-napi/.buildstamp \
benchmark/misc/function_call/build/Release/binding.node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably needs to be added to test-ci-js since the benchmark is tested from JS. I'd suggest adding a comment since this dependency is not intuitive.

$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=release --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES)
Expand Down Expand Up @@ -471,6 +473,7 @@ test-addons: test-build test-addons-napi
test-addons-clean:
$(RM) -r test/addons/??_*/
$(RM) -r test/addons/*/build
$(RM) -r benchmark/misc/function_call/build
$(RM) test/addons/.buildstamp test/addons/.docbuildstamp
$(MAKE) test-addons-napi-clean

Expand Down
3 changes: 1 addition & 2 deletions benchmark/misc/function_call/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ const common = require('../../common.js');
try {
var binding = require('./build/Release/binding');
} catch (er) {
console.error('misc/function_call.js Binding failed to load');
process.exit(0);
throw new Error('misc/function_call.js Binding failed to load');
}
const cxx = binding.hello;

Expand Down
2 changes: 1 addition & 1 deletion vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ for /d %%F in (test\addons\??_*) do (
if %errorlevel% neq 0 exit /b %errorlevel%
:: building addons
setlocal EnableDelayedExpansion
for /d %%F in (test\addons\*) do (
for /d %%F in (test\addons\* benchmark\misc\function_call) do (
%node_gyp_exe% rebuild ^
--directory="%%F" ^
--nodedir="%cd%"
Expand Down