Skip to content

Commit beb0800

Browse files
TrottBridgeAR
authored andcommitted
test: move benchmark tests out of main test suite
Move benchmark tests (which are slow) out of the main test suite. We can hopefully add them to node-daily-master so that they are still run daily on CI. PR-URL: #24265 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 8835196 commit beb0800

39 files changed

+38
-33
lines changed

Makefile

+7-4
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ v8:
270270
tools/make-v8.sh $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)
271271

272272
.PHONY: jstest
273-
jstest: build-addons build-addons-napi bench-addons-build ## Runs addon tests and JS tests
273+
jstest: build-addons build-addons-napi ## Runs addon tests and JS tests
274274
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) \
275275
--skip-tests=$(CI_SKIP_TESTS) \
276276
$(CI_JS_SUITES) \
@@ -414,7 +414,7 @@ clear-stalled:
414414
echo $${PS_OUT} | xargs kill -9; \
415415
fi
416416

417-
test-build: | all build-addons build-addons-napi bench-addons-build
417+
test-build: | all build-addons build-addons-napi
418418

419419
test-build-addons-napi: all build-addons-napi
420420

@@ -455,7 +455,7 @@ test-ci-js: | clear-stalled
455455
.PHONY: test-ci
456456
# Related CI jobs: most CI tests, excluding node-test-commit-arm-fanned
457457
test-ci: LOGLEVEL := info
458-
test-ci: | clear-stalled build-addons build-addons-napi doc-only bench-addons-build
458+
test-ci: | clear-stalled build-addons build-addons-napi doc-only
459459
out/Release/cctest --gtest_output=tap:cctest.tap
460460
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
461461
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
@@ -499,7 +499,7 @@ test-message: test-build
499499
test-wpt: all
500500
$(PYTHON) tools/test.py $(PARALLEL_ARGS) wpt
501501

502-
test-simple: | cctest bench-addons-build # Depends on 'all'.
502+
test-simple: | cctest # Depends on 'all'.
503503
$(PYTHON) tools/test.py $(PARALLEL_ARGS) parallel sequential
504504

505505
test-pummel: all
@@ -512,6 +512,9 @@ test-node-inspect: $(NODE_EXE)
512512
USE_EMBEDDED_NODE_INSPECT=1 $(NODE) tools/test-npm-package \
513513
--install deps/node-inspect test
514514

515+
test-benchmark: | bench-addons-build
516+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) benchmark
517+
515518
test-tick-processor: all
516519
$(PYTHON) tools/test.py $(PARALLEL_ARGS) tick-processor
517520

test/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ GitHub with the `autocrlf` git config flag set to true.
1919
| `addons` | Yes | Tests for [addon](https://nodejs.org/api/addons.html) functionality along with some tests that require an addon to function properly. |
2020
| `addons-napi` | Yes | Tests for [n-api](https://nodejs.org/api/n-api.html) functionality. |
2121
| `async-hooks` | Yes | Tests for [async_hooks](https://nodejs.org/api/async_hooks.html) functionality. |
22+
| `benchmark` | No | Test minimal functionality of benchmarks. |
2223
| `cctest` | Yes | C++ tests that are run as part of the build process. |
2324
| `code-cache` | No | Tests for a Node.js binary compiled with V8 code cache. |
2425
| `common` | | Common modules shared among many tests. [Documentation](./common/README.md) |

test/benchmark/benchmark.status

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
prefix benchmark
2+
3+
# To mark a test as flaky, list the test name in the appropriate section
4+
# below, without ".js", followed by ": PASS,FLAKY". Example:
5+
# sample-test : PASS,FLAKY
6+
7+
[true] # This section applies to all platforms
8+
9+
[$system==win32]
10+
11+
[$system==linux]
12+
13+
[$system==macos]
14+
15+
[$system==solaris] # Also applies to SmartOS
16+
17+
[$system==freebsd]
18+
19+
[$system==aix]
20+
21+
[$arch==arm]

test/benchmark/testcfg.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import sys, os
2+
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
3+
import testpy
4+
5+
def GetConfiguration(context, root):
6+
return testpy.SimpleTestConfiguration(context, root, 'benchmark')

test/root.status

-28
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,6 @@ async-hooks/test-tlswrap: SLOW
99
async-hooks/test-tlswrap: SLOW
1010
message/eval_messages: SLOW
1111
message/stdin_messages: SLOW
12-
parallel/test-benchmark-assert: SLOW
13-
parallel/test-benchmark-cluster: SLOW
14-
parallel/test-benchmark-crypto: SLOW
15-
parallel/test-benchmark-dns: SLOW
16-
parallel/test-benchmark-domain: SLOW
17-
parallel/test-benchmark-es: SLOW
18-
parallel/test-benchmark-events: SLOW
19-
parallel/test-benchmark-fs: SLOW
20-
parallel/test-benchmark-misc: SLOW
21-
parallel/test-benchmark-module: SLOW
22-
parallel/test-benchmark-os: SLOW
23-
parallel/test-benchmark-process: SLOW
24-
parallel/test-benchmark-querystring: SLOW
25-
parallel/test-benchmark-streams: SLOW
26-
parallel/test-benchmark-string_decoder: SLOW
27-
parallel/test-benchmark-timers: SLOW
28-
parallel/test-benchmark-url: SLOW
29-
parallel/test-benchmark-util: SLOW
30-
parallel/test-benchmark-v8: SLOW
31-
parallel/test-benchmark-vm: SLOW
32-
parallel/test-benchmark-zlib: SLOW
3312
parallel/test-buffer-constructor-node-modules-paths: SLOW
3413
parallel/test-buffer-indexof: SLOW
3514
parallel/test-child-process-spawnsync-input: SLOW
@@ -165,13 +144,6 @@ parallel/test-worker-unsupported-things: SLOW
165144
parallel/test-worker-workerdata-sharedarraybuffer: SLOW
166145
parallel/test-zlib-bytes-read: SLOW
167146
parallel/test-zlib-convenience-methods: SLOW
168-
sequential/test-benchmark-buffer: SLOW
169-
sequential/test-benchmark-child-process: SLOW
170-
sequential/test-benchmark-dgram: SLOW
171-
sequential/test-benchmark-http: SLOW
172-
sequential/test-benchmark-net: SLOW
173-
sequential/test-benchmark-path: SLOW
174-
sequential/test-benchmark-tls: SLOW
175147
sequential/test-child-process-execsync: SLOW
176148
sequential/test-child-process-exit: SLOW
177149
sequential/test-child-process-pass-fd: SLOW

tools/test.py

+1
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,7 @@ def PrintCrashed(code):
14981498
IGNORED_SUITES = [
14991499
'addons',
15001500
'addons-napi',
1501+
'benchmark',
15011502
'doctool',
15021503
'internet',
15031504
'pummel',

vcbuild.bat

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ if /i "%1"=="build-addons" set build_addons=1&goto arg-ok
8383
if /i "%1"=="build-addons-napi" set build_addons_napi=1&goto arg-ok
8484
if /i "%1"=="test-addons" set test_args=%test_args% addons&set build_addons=1&goto arg-ok
8585
if /i "%1"=="test-addons-napi" set test_args=%test_args% addons-napi&set build_addons_napi=1&goto arg-ok
86+
if /i "%1"=="test-benchmark" set test_args=%test_args% benchmark&goto arg-ok
8687
if /i "%1"=="test-simple" set test_args=%test_args% sequential parallel -J&goto arg-ok
8788
if /i "%1"=="test-message" set test_args=%test_args% message&goto arg-ok
8889
if /i "%1"=="test-tick-processor" set test_args=%test_args% tick-processor&goto arg-ok
@@ -634,7 +635,7 @@ del .used_configure_flags
634635
goto exit
635636

636637
:help
637-
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-ci/test-all/test-addons/test-addons-napi/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [ltcg] [nopch] [licensetf] [sign] [ia32/x86/x64] [vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [no-cctest] [openssl-no-asm]
638+
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-ci/test-all/test-addons/test-addons-napi/test-benchmark/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [ltcg] [nopch] [licensetf] [sign] [ia32/x86/x64] [vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [no-cctest] [openssl-no-asm]
638639
echo Examples:
639640
echo vcbuild.bat : builds release build
640641
echo vcbuild.bat debug : builds debug build

0 commit comments

Comments
 (0)