Skip to content

Commit 7ff770c

Browse files
committed
build, tools: add test-ci scripts
* Replace explicit use in `Makefile` and `vcbuild.bat`
1 parent 73d9c0f commit 7ff770c

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ NODE_EXE = node$(EXEEXT)
4343
NODE ?= ./$(NODE_EXE)
4444
NODE_G_EXE = node_g$(EXEEXT)
4545
NPM ?= ./deps/npm/bin/npm-cli.js
46+
TEST_CI = ./tools/test-ci.sh
4647

4748
# Flags for packaging.
4849
BUILD_DOWNLOAD_FLAGS ?= --download=all
@@ -195,18 +196,18 @@ test: all
195196
$(MAKE) build-addons
196197
$(MAKE) build-addons-napi
197198
$(MAKE) cctest
198-
$(PYTHON) tools/test.py --mode=release -J \
199+
$(TEST_CI) \
199200
doctool inspector known_issues message pseudo-tty parallel sequential $(CI_NATIVE_SUITES)
200201
$(MAKE) lint
201202

202203
test-parallel: all
203-
$(PYTHON) tools/test.py --mode=release parallel -J
204+
$(TEST_CI) parallel
204205

205206
test-valgrind: all
206207
$(PYTHON) tools/test.py --mode=release --valgrind sequential parallel message
207208

208209
test-check-deopts: all
209-
$(PYTHON) tools/test.py --mode=release --check-deopts parallel sequential -J
210+
$(TEST_CI) --check-deopts parallel sequential
210211

211212
# Implicitly depends on $(NODE_EXE). We don't depend on it explicitly because
212213
# it always triggers a rebuild due to it being a .PHONY rule. See the comment

tools/test-ci.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pushd %~dp0\..
2+
python tools\test.py -J --mode=release %*
3+
popd

tools/test-ci.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
cd `dirname $0`/.. > /dev/null
3+
`which python` tools/test.py -J --mode=release $*

vcbuild.bat

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,9 @@ if defined test_node_inspect goto node-test-inspect
403403
goto node-tests
404404

405405
:node-check-deopts
406-
python tools\test.py --mode=release --check-deopts parallel sequential -J
406+
set "test_deopts_cmd=tools\test-ci.cmd --check-deopts parallel sequential"
407+
echo running '%test_deopts_cmd%'
408+
call %test_deopts_cmd%
407409
if defined test_node_inspect goto node-test-inspect
408410
goto node-tests
409411

@@ -418,8 +420,9 @@ if "%config%"=="Debug" set test_args=--mode=debug %test_args%
418420
if "%config%"=="Release" set test_args=--mode=release %test_args%
419421
echo running 'cctest %cctest_args%'
420422
"%config%\cctest" %cctest_args%
421-
echo running 'python tools\test.py %test_args%'
422-
python tools\test.py %test_args%
423+
set "test_cmd=tools\test-ci.cmd %test_args%"
424+
echo running '%test_cmd%'
425+
call %test_cmd%
423426
goto cpplint
424427

425428
:cpplint

0 commit comments

Comments
 (0)