From 978629ca1240b9f2038390c7e960f3d226daa4e8 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Fri, 13 Oct 2017 22:42:38 -0400 Subject: [PATCH] test: move inspector tests to parallel/sequential * remove inspector directory artifacts PR-URL: https://github.com/nodejs/node/pull/16197 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Refael Ackermann Reviewed-By: James M Snell --- Makefile | 3 --- test/README.md | 1 - test/{inspector => common}/inspector-helper.js | 0 .../inspector-global-function.js} | 0 test/inspector/inspector.status | 16 ---------------- test/inspector/testcfg.py | 6 ------ test/parallel/parallel.status | 5 +++++ .../test-inspect-async-hook-setup-at-inspect.js} | 2 +- ...inspector-async-hook-setup-at-inspect-brk.js} | 2 +- ...test-inspector-async-hook-setup-at-signal.js} | 2 +- ...nspector-async-hook-teardown-at-debug-end.js} | 0 ...inspector-async-stack-traces-promise-then.js} | 2 +- ...inspector-async-stack-traces-set-interval.js} | 2 +- .../test-inspector-bindings.js} | 0 .../test-inspector-break-e.js | 2 +- .../test-inspector-break-when-eval.js} | 6 +++--- .../test-inspector-contexts.js} | 0 .../test-inspector-debug-brk-flag.js} | 2 +- .../test-inspector-debug-end.js} | 2 +- .../test-inspector-exception.js} | 2 +- .../test-inspector-ip-detection.js} | 2 +- .../test-inspector-not-blocked-on-idle.js} | 2 +- .../test-inspector-port-zero-cluster.js} | 0 .../test-inspector-port-zero.js} | 0 .../test-inspector-scriptparsed-context.js} | 2 +- .../test-inspector-stop-profile-after-done.js} | 2 +- .../test-inspector-stops-no-file.js} | 0 test/{inspector => parallel}/test-inspector.js | 2 +- .../test-inspector-enabled.js | 0 .../test-inspector-port-cluster.js} | 0 vcbuild.bat | 3 +-- 31 files changed, 23 insertions(+), 45 deletions(-) rename test/{inspector => common}/inspector-helper.js (100%) rename test/{inspector/global-function.js => fixtures/inspector-global-function.js} (100%) delete mode 100644 test/inspector/inspector.status delete mode 100644 test/inspector/testcfg.py rename test/{inspector/test-async-hook-setup-at-inspect.js => parallel/test-inspect-async-hook-setup-at-inspect.js} (97%) rename test/{inspector/test-async-hook-setup-at-inspect-brk.js => parallel/test-inspector-async-hook-setup-at-inspect-brk.js} (95%) rename test/{inspector/test-async-hook-setup-at-signal.js => parallel/test-inspector-async-hook-setup-at-signal.js} (97%) rename test/{inspector/test-async-hook-teardown-at-debug-end.js => parallel/test-inspector-async-hook-teardown-at-debug-end.js} (100%) rename test/{inspector/test-async-stack-traces-promise-then.js => parallel/test-inspector-async-stack-traces-promise-then.js} (97%) rename test/{inspector/test-async-stack-traces-set-interval.js => parallel/test-inspector-async-stack-traces-set-interval.js} (96%) rename test/{inspector/test-bindings.js => parallel/test-inspector-bindings.js} (100%) rename test/{inspector => parallel}/test-inspector-break-e.js (89%) rename test/{inspector/test-break-when-eval.js => parallel/test-inspector-break-when-eval.js} (92%) rename test/{inspector/test-contexts.js => parallel/test-inspector-contexts.js} (100%) rename test/{inspector/test-debug-brk-flag.js => parallel/test-inspector-debug-brk-flag.js} (94%) rename test/{inspector/test-debug-end.js => parallel/test-inspector-debug-end.js} (95%) rename test/{inspector/test-exception.js => parallel/test-inspector-exception.js} (95%) rename test/{inspector/test-ip-detection.js => parallel/test-inspector-ip-detection.js} (94%) rename test/{inspector/test-not-blocked-on-idle.js => parallel/test-inspector-not-blocked-on-idle.js} (90%) rename test/{inspector/test-port-zero-cluster.js => parallel/test-inspector-port-zero-cluster.js} (100%) rename test/{inspector/test-port-zero.js => parallel/test-inspector-port-zero.js} (100%) rename test/{inspector/test-scriptparsed-context.js => parallel/test-inspector-scriptparsed-context.js} (98%) rename test/{inspector/test-stop-profile-after-done.js => parallel/test-inspector-stop-profile-after-done.js} (94%) rename test/{inspector/test-stops-no-file.js => parallel/test-inspector-stops-no-file.js} (100%) rename test/{inspector => parallel}/test-inspector.js (99%) rename test/{inspector => sequential}/test-inspector-enabled.js (100%) rename test/{inspector/test-port-cluster.js => sequential/test-inspector-port-cluster.js} (100%) diff --git a/Makefile b/Makefile index ddbfd0f8851394..d324cb75147bf7 100644 --- a/Makefile +++ b/Makefile @@ -409,9 +409,6 @@ test-pummel: all test-internet: all $(PYTHON) tools/test.py internet -test-inspector: all - $(PYTHON) tools/test.py inspector - test-node-inspect: $(NODE_EXE) USE_EMBEDDED_NODE_INSPECT=1 $(NODE) tools/test-npm-package \ --install deps/node-inspect test diff --git a/test/README.md b/test/README.md index 86826f493ae9ff..d214f2fc10c246 100644 --- a/test/README.md +++ b/test/README.md @@ -19,7 +19,6 @@ On how to run tests in this directory, see |es-module |Yes |Test ESM module loading.| |fixtures | |Test fixtures used in various tests throughout the test suite.| |gc |No |Tests for garbage collection related functionality.| -|inspector |Yes |Tests for the V8 inspector integration.| |internet |No |Tests that make real outbound connections (mainly networking related modules). Tests for networking related modules may also be present in other directories, but those tests do not make outbound connections.| |known_issues |Yes |Tests reproducing known issues within the system. All tests inside of this directory are expected to fail consistently. If a test doesn't fail on certain platforms, those should be skipped via `known_issues.status`.| |message |Yes |Tests for messages that are output for various conditions (```console.log```, error messages etc.)| diff --git a/test/inspector/inspector-helper.js b/test/common/inspector-helper.js similarity index 100% rename from test/inspector/inspector-helper.js rename to test/common/inspector-helper.js diff --git a/test/inspector/global-function.js b/test/fixtures/inspector-global-function.js similarity index 100% rename from test/inspector/global-function.js rename to test/fixtures/inspector-global-function.js diff --git a/test/inspector/inspector.status b/test/inspector/inspector.status deleted file mode 100644 index 9c1662f24ccc65..00000000000000 --- a/test/inspector/inspector.status +++ /dev/null @@ -1,16 +0,0 @@ -prefix inspector - -# To mark a test as flaky, list the test name in the appropriate section -# below, without ".js", followed by ": PASS,FLAKY". Example: -# sample-test : PASS,FLAKY - -[true] # This section applies to all platforms - -[$system==aix] -test-stop-profile-after-done: PASS, FLAKY - -[$system==win32] -test-bindings : PASS, FLAKY -test-debug-end : PASS, FLAKY -test-stop-profile-after-done: PASS, FLAKY - diff --git a/test/inspector/testcfg.py b/test/inspector/testcfg.py deleted file mode 100644 index 93182b6abed515..00000000000000 --- a/test/inspector/testcfg.py +++ /dev/null @@ -1,6 +0,0 @@ -import sys, os -sys.path.append(os.path.join(os.path.dirname(__file__), '..')) -import testpy - -def GetConfiguration(context, root): - return testpy.SimpleTestConfiguration(context, root, 'inspector') diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index fda5e01e500078..1817501c98e8bb 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -7,6 +7,9 @@ prefix parallel [true] # This section applies to all platforms [$system==win32] +test-inspector-bindings : PASS, FLAKY +test-inspector-debug-end : PASS, FLAKY +test-inspector-stop-profile-after-done: PASS, FLAKY [$system==linux] @@ -19,3 +22,5 @@ test-npm-install: PASS,FLAKY [$system==freebsd] +[$system==aix] +test-inspector-stop-profile-after-done: PASS, FLAKY diff --git a/test/inspector/test-async-hook-setup-at-inspect.js b/test/parallel/test-inspect-async-hook-setup-at-inspect.js similarity index 97% rename from test/inspector/test-async-hook-setup-at-inspect.js rename to test/parallel/test-inspect-async-hook-setup-at-inspect.js index bbf418a858838c..869ec21ca991a4 100644 --- a/test/inspector/test-async-hook-setup-at-inspect.js +++ b/test/parallel/test-inspect-async-hook-setup-at-inspect.js @@ -3,7 +3,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); common.skipIf32Bits(); common.crashOnUnhandledRejection(); -const { NodeInstance } = require('../inspector/inspector-helper.js'); +const { NodeInstance } = require('../common/inspector-helper.js'); const assert = require('assert'); // Even with --inspect, the default async call stack depth is 0. We need a diff --git a/test/inspector/test-async-hook-setup-at-inspect-brk.js b/test/parallel/test-inspector-async-hook-setup-at-inspect-brk.js similarity index 95% rename from test/inspector/test-async-hook-setup-at-inspect-brk.js rename to test/parallel/test-inspector-async-hook-setup-at-inspect-brk.js index 7e290605522a39..980e9e4d46e1a9 100644 --- a/test/inspector/test-async-hook-setup-at-inspect-brk.js +++ b/test/parallel/test-inspector-async-hook-setup-at-inspect-brk.js @@ -3,7 +3,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); common.skipIf32Bits(); common.crashOnUnhandledRejection(); -const { NodeInstance } = require('./inspector-helper.js'); +const { NodeInstance } = require('../common/inspector-helper.js'); const assert = require('assert'); const script = ` diff --git a/test/inspector/test-async-hook-setup-at-signal.js b/test/parallel/test-inspector-async-hook-setup-at-signal.js similarity index 97% rename from test/inspector/test-async-hook-setup-at-signal.js rename to test/parallel/test-inspector-async-hook-setup-at-signal.js index f0150bc7acc0a9..96e8b28a7a250e 100644 --- a/test/inspector/test-async-hook-setup-at-signal.js +++ b/test/parallel/test-inspector-async-hook-setup-at-signal.js @@ -3,7 +3,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); common.skipIf32Bits(); common.crashOnUnhandledRejection(); -const { NodeInstance } = require('../inspector/inspector-helper.js'); +const { NodeInstance } = require('../common/inspector-helper.js'); const assert = require('assert'); const script = ` diff --git a/test/inspector/test-async-hook-teardown-at-debug-end.js b/test/parallel/test-inspector-async-hook-teardown-at-debug-end.js similarity index 100% rename from test/inspector/test-async-hook-teardown-at-debug-end.js rename to test/parallel/test-inspector-async-hook-teardown-at-debug-end.js diff --git a/test/inspector/test-async-stack-traces-promise-then.js b/test/parallel/test-inspector-async-stack-traces-promise-then.js similarity index 97% rename from test/inspector/test-async-stack-traces-promise-then.js rename to test/parallel/test-inspector-async-stack-traces-promise-then.js index 9e28d0d51e3a55..a321855b5ea613 100644 --- a/test/inspector/test-async-stack-traces-promise-then.js +++ b/test/parallel/test-inspector-async-stack-traces-promise-then.js @@ -3,7 +3,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); common.skipIf32Bits(); common.crashOnUnhandledRejection(); -const { NodeInstance } = require('./inspector-helper'); +const { NodeInstance } = require('../common/inspector-helper'); const assert = require('assert'); const script = `runTest(); diff --git a/test/inspector/test-async-stack-traces-set-interval.js b/test/parallel/test-inspector-async-stack-traces-set-interval.js similarity index 96% rename from test/inspector/test-async-stack-traces-set-interval.js rename to test/parallel/test-inspector-async-stack-traces-set-interval.js index 78f7a8e980e3b4..e778bfc80280b0 100644 --- a/test/inspector/test-async-stack-traces-set-interval.js +++ b/test/parallel/test-inspector-async-stack-traces-set-interval.js @@ -3,7 +3,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); common.skipIf32Bits(); common.crashOnUnhandledRejection(); -const { NodeInstance } = require('./inspector-helper'); +const { NodeInstance } = require('../common/inspector-helper'); const assert = require('assert'); const script = 'setInterval(() => { debugger; }, 50);'; diff --git a/test/inspector/test-bindings.js b/test/parallel/test-inspector-bindings.js similarity index 100% rename from test/inspector/test-bindings.js rename to test/parallel/test-inspector-bindings.js diff --git a/test/inspector/test-inspector-break-e.js b/test/parallel/test-inspector-break-e.js similarity index 89% rename from test/inspector/test-inspector-break-e.js rename to test/parallel/test-inspector-break-e.js index 0e5b837bc51298..1a8f8ca50d3de1 100644 --- a/test/inspector/test-inspector-break-e.js +++ b/test/parallel/test-inspector-break-e.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const assert = require('assert'); -const { NodeInstance } = require('./inspector-helper.js'); +const { NodeInstance } = require('../common/inspector-helper.js'); async function runTests() { const instance = new NodeInstance(undefined, 'console.log(10)'); diff --git a/test/inspector/test-break-when-eval.js b/test/parallel/test-inspector-break-when-eval.js similarity index 92% rename from test/inspector/test-break-when-eval.js rename to test/parallel/test-inspector-break-when-eval.js index ddd8220bb92e5f..e5d01cb189337a 100644 --- a/test/inspector/test-break-when-eval.js +++ b/test/parallel/test-inspector-break-when-eval.js @@ -2,10 +2,10 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const assert = require('assert'); -const { NodeInstance } = require('./inspector-helper.js'); -const path = require('path'); +const { NodeInstance } = require('../common/inspector-helper.js'); +const fixtures = require('../common/fixtures'); -const script = path.join(path.dirname(module.filename), 'global-function.js'); +const script = fixtures.path('inspector-global-function.js'); async function setupDebugger(session) { console.log('[test]', 'Setting up a debugger'); diff --git a/test/inspector/test-contexts.js b/test/parallel/test-inspector-contexts.js similarity index 100% rename from test/inspector/test-contexts.js rename to test/parallel/test-inspector-contexts.js diff --git a/test/inspector/test-debug-brk-flag.js b/test/parallel/test-inspector-debug-brk-flag.js similarity index 94% rename from test/inspector/test-debug-brk-flag.js rename to test/parallel/test-inspector-debug-brk-flag.js index f0a4d976028f09..235e7043d80f45 100644 --- a/test/inspector/test-debug-brk-flag.js +++ b/test/parallel/test-inspector-debug-brk-flag.js @@ -5,7 +5,7 @@ common.skipIfInspectorDisabled(); const assert = require('assert'); const { mainScriptPath, - NodeInstance } = require('./inspector-helper.js'); + NodeInstance } = require('../common/inspector-helper.js'); async function testBreakpointOnStart(session) { const commands = [ diff --git a/test/inspector/test-debug-end.js b/test/parallel/test-inspector-debug-end.js similarity index 95% rename from test/inspector/test-debug-end.js rename to test/parallel/test-inspector-debug-end.js index 57ce0190838504..effef9f23315b9 100644 --- a/test/inspector/test-debug-end.js +++ b/test/parallel/test-inspector-debug-end.js @@ -2,7 +2,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const { strictEqual } = require('assert'); -const { NodeInstance } = require('./inspector-helper.js'); +const { NodeInstance } = require('../common/inspector-helper.js'); async function testNoServerNoCrash() { console.log('Test there\'s no crash stopping server that was not started'); diff --git a/test/inspector/test-exception.js b/test/parallel/test-inspector-exception.js similarity index 95% rename from test/inspector/test-exception.js rename to test/parallel/test-inspector-exception.js index eab59ee9f44cbb..743742f50f1b20 100644 --- a/test/inspector/test-exception.js +++ b/test/parallel/test-inspector-exception.js @@ -5,7 +5,7 @@ const fixtures = require('../common/fixtures'); common.skipIfInspectorDisabled(); const assert = require('assert'); -const { NodeInstance } = require('./inspector-helper.js'); +const { NodeInstance } = require('../common/inspector-helper.js'); const script = fixtures.path('throws_error.js'); diff --git a/test/inspector/test-ip-detection.js b/test/parallel/test-inspector-ip-detection.js similarity index 94% rename from test/inspector/test-ip-detection.js rename to test/parallel/test-inspector-ip-detection.js index 5a6a116144e7d2..f7dee4494d3c03 100644 --- a/test/inspector/test-ip-detection.js +++ b/test/parallel/test-inspector-ip-detection.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const assert = require('assert'); -const { NodeInstance } = require('./inspector-helper.js'); +const { NodeInstance } = require('../common/inspector-helper.js'); const os = require('os'); const ip = pickIPv4Address(); diff --git a/test/inspector/test-not-blocked-on-idle.js b/test/parallel/test-inspector-not-blocked-on-idle.js similarity index 90% rename from test/inspector/test-not-blocked-on-idle.js rename to test/parallel/test-inspector-not-blocked-on-idle.js index 8684d6f3143387..68e4eaaa57cd3f 100644 --- a/test/inspector/test-not-blocked-on-idle.js +++ b/test/parallel/test-inspector-not-blocked-on-idle.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); -const { NodeInstance } = require('./inspector-helper.js'); +const { NodeInstance } = require('../common/inspector-helper.js'); async function runTests() { const script = 'setInterval(() => {debugger;}, 60000);'; diff --git a/test/inspector/test-port-zero-cluster.js b/test/parallel/test-inspector-port-zero-cluster.js similarity index 100% rename from test/inspector/test-port-zero-cluster.js rename to test/parallel/test-inspector-port-zero-cluster.js diff --git a/test/inspector/test-port-zero.js b/test/parallel/test-inspector-port-zero.js similarity index 100% rename from test/inspector/test-port-zero.js rename to test/parallel/test-inspector-port-zero.js diff --git a/test/inspector/test-scriptparsed-context.js b/test/parallel/test-inspector-scriptparsed-context.js similarity index 98% rename from test/inspector/test-scriptparsed-context.js rename to test/parallel/test-inspector-scriptparsed-context.js index 149173b7af5513..f295d737da7e34 100644 --- a/test/inspector/test-scriptparsed-context.js +++ b/test/parallel/test-inspector-scriptparsed-context.js @@ -2,7 +2,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); common.crashOnUnhandledRejection(); -const { NodeInstance } = require('./inspector-helper.js'); +const { NodeInstance } = require('../common/inspector-helper.js'); const assert = require('assert'); const script = ` diff --git a/test/inspector/test-stop-profile-after-done.js b/test/parallel/test-inspector-stop-profile-after-done.js similarity index 94% rename from test/inspector/test-stop-profile-after-done.js rename to test/parallel/test-inspector-stop-profile-after-done.js index 314c429d461723..4762bc523939b1 100644 --- a/test/inspector/test-stop-profile-after-done.js +++ b/test/parallel/test-inspector-stop-profile-after-done.js @@ -2,7 +2,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const assert = require('assert'); -const { NodeInstance } = require('./inspector-helper.js'); +const { NodeInstance } = require('../common/inspector-helper.js'); async function runTests() { const child = new NodeInstance(['--inspect=0'], diff --git a/test/inspector/test-stops-no-file.js b/test/parallel/test-inspector-stops-no-file.js similarity index 100% rename from test/inspector/test-stops-no-file.js rename to test/parallel/test-inspector-stops-no-file.js diff --git a/test/inspector/test-inspector.js b/test/parallel/test-inspector.js similarity index 99% rename from test/inspector/test-inspector.js rename to test/parallel/test-inspector.js index 6a5dbe60030a64..992a12e90229ed 100644 --- a/test/inspector/test-inspector.js +++ b/test/parallel/test-inspector.js @@ -6,7 +6,7 @@ common.skipIfInspectorDisabled(); const assert = require('assert'); const { mainScriptPath, readMainScriptSource, - NodeInstance } = require('./inspector-helper.js'); + NodeInstance } = require('../common/inspector-helper.js'); function checkListResponse(response) { assert.strictEqual(1, response.length); diff --git a/test/inspector/test-inspector-enabled.js b/test/sequential/test-inspector-enabled.js similarity index 100% rename from test/inspector/test-inspector-enabled.js rename to test/sequential/test-inspector-enabled.js diff --git a/test/inspector/test-port-cluster.js b/test/sequential/test-inspector-port-cluster.js similarity index 100% rename from test/inspector/test-port-cluster.js rename to test/sequential/test-inspector-port-cluster.js diff --git a/vcbuild.bat b/vcbuild.bat index ab9f40de03dd76..20555dec799b60 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -81,7 +81,6 @@ if /i "%1"=="test-addons-napi" set test_args=%test_args% addons-napi&set build if /i "%1"=="test-simple" set test_args=%test_args% sequential parallel -J&goto arg-ok if /i "%1"=="test-message" set test_args=%test_args% message&goto arg-ok if /i "%1"=="test-gc" set test_args=%test_args% gc&set build_testgc_addon=1&goto arg-ok -if /i "%1"=="test-inspector" set test_args=%test_args% inspector&goto arg-ok if /i "%1"=="test-tick-processor" set test_args=%test_args% tick-processor&goto arg-ok if /i "%1"=="test-internet" set test_args=%test_args% internet&goto arg-ok if /i "%1"=="test-pummel" set test_args=%test_args% pummel&goto arg-ok @@ -536,7 +535,7 @@ echo Failed to create vc project files. goto exit :help -echo vcbuild.bat [debug/release] [msi] [test/test-ci/test-all/test-uv/test-inspector/test-internet/test-pummel/test-simple/test-message/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [clean] [noprojgen] [small-icu/full-icu/without-intl] [nobuild] [sign] [x86/x64] [vs2015/vs2017] [download-all] [enable-vtune] [lint/lint-ci] [no-NODE-OPTIONS] [link-module path-to-module] +echo vcbuild.bat [debug/release] [msi] [test/test-ci/test-all/test-uv/test-internet/test-pummel/test-simple/test-message/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [clean] [noprojgen] [small-icu/full-icu/without-intl] [nobuild] [sign] [x86/x64] [vs2015/vs2017] [download-all] [enable-vtune] [lint/lint-ci] [no-NODE-OPTIONS] [link-module path-to-module] echo Examples: echo vcbuild.bat : builds release build echo vcbuild.bat debug : builds debug build