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

build: for --enable-static, run only cctest #14892

Closed
wants to merge 3 commits 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
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ v8:
tools/make-v8.sh
$(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)

ifeq ($(NODE_TARGET_TYPE),static_library)
test: all
$(MAKE) cctest
Copy link
Member

Choose a reason for hiding this comment

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

Should $(MAKE) lint not also be run as a part of the static build?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm +0 on that.
It is already run by the patched vcbuild.bat though.

Copy link
Contributor

Choose a reason for hiding this comment

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

No, wait that's a problem, if there's no node binary that will fail.

Copy link
Member

Choose a reason for hiding this comment

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

Ah now I see. Good point. 👍

~/s/node ❯❯❯ make lint                                                                                  master ⬆ ⬇ ✭ ◼ │
Running JS linter...                                                                                                   │
./node tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules --ext=.js,.md \                                │
          benchmark doc lib test tools                                                                                 │
make[1]: ./node: No such file or directory                                                                             │
make[1]: *** [jslint] Error 1

else
test: all
$(MAKE) build-addons
$(MAKE) build-addons-napi
Expand All @@ -200,6 +204,7 @@ test: all
$(CI_JS_SUITES) \
$(CI_NATIVE_SUITES)
$(MAKE) lint
endif

test-parallel: all
$(PYTHON) tools/test.py --mode=release parallel -J
Expand Down
2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1408,6 +1408,8 @@ config = {
'BUILDTYPE': 'Debug' if options.debug else 'Release',
'USE_XCODE': str(int(options.use_xcode or 0)),
'PYTHON': sys.executable,
'NODE_TARGET_TYPE': variables['node_target_type'] if options.enable_static \
else '',
}

if options.prefix:
Expand Down
6 changes: 4 additions & 2 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ if /i "%1"=="download-all" set download_arg="--download=all"&goto arg-ok
if /i "%1"=="ignore-flaky" set test_args=%test_args% --flaky-tests=dontcare&goto arg-ok
if /i "%1"=="enable-vtune" set enable_vtune_arg=1&goto arg-ok
if /i "%1"=="dll" set dll=1&goto arg-ok
if /i "%1"=="static" set enable_static=1&goto arg-ok
if /i "%1"=="static" set enable_static=1&goto arg-ok
if /i "%1"=="no-NODE-OPTIONS" set no_NODE_OPTIONS=1&goto arg-ok
if /i "%1"=="debug-http2" set debug_http2=1&goto arg-ok
if /i "%1"=="debug-nghttp2" set debug_nghttp2=1&goto arg-ok
Expand Down Expand Up @@ -445,8 +445,9 @@ if "%config%"=="Debug" set test_args=--mode=debug %test_args%
if "%config%"=="Release" set test_args=--mode=release %test_args%
echo running 'cctest %cctest_args%'
"%config%\cctest" %cctest_args%
REM when building a static library there's no binary to run tests
if defined enable_static goto test-v8
call :run-python tools\test.py %test_args%
goto test-v8

:test-v8
if not defined custom_v8_test goto cpplint
Expand Down Expand Up @@ -494,6 +495,7 @@ set "localcppfilelist=%localcppfilelist% %1"
goto exit

:jslint
if defined enable_static goto exit
if defined jslint_ci goto jslint-ci
if not defined jslint goto exit
if not exist tools\eslint\bin\eslint.js goto no-lint
Expand Down