From 352a600142bfd62efdd8acaabe554eb98452f1e1 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 3 May 2021 21:58:42 -0700 Subject: [PATCH] debugger: rename inspector-cli test module to debugger PR-URL: https://github.com/nodejs/node/pull/38530 Reviewed-By: Antoine du Hamel Reviewed-By: Darshan Sen Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- test/common/README.md | 58 +++++++++---------- test/common/{inspector-cli.js => debugger.js} | 0 .../test-inspector-cli-address.js | 2 +- .../test-inspector-cli-auto-resume.js | 2 +- .../test-inspector-cli-backtrace.js | 2 +- .../inspector-cli/test-inspector-cli-break.js | 2 +- .../test-inspector-cli-clear-breakpoints.js | 2 +- .../test-inspector-cli-custom-port.js | 2 +- .../test-inspector-cli-exceptions.js | 2 +- .../test-inspector-cli-exec-scope.js | 2 +- test/inspector-cli/test-inspector-cli-exec.js | 2 +- .../test-inspector-cli-heap-profiler.js | 2 +- test/inspector-cli/test-inspector-cli-help.js | 2 +- .../test-inspector-cli-invalid-args.js | 2 +- .../test-inspector-cli-launch.js | 2 +- .../test-inspector-cli-low-level.js | 2 +- test/inspector-cli/test-inspector-cli-pid.js | 2 +- .../test-inspector-cli-preserve-breaks.js | 2 +- .../test-inspector-cli-profile.js | 2 +- ...ector-cli-random-port-with-inspect-port.js | 2 +- .../test-inspector-cli-random-port.js | 2 +- ...st-inspector-cli-run-after-quit-restart.js | 2 +- .../test-inspector-cli-sb-before-load.js | 2 +- .../test-inspector-cli-scripts.js | 2 +- .../test-inspector-cli-use-strict.js | 2 +- .../test-inspector-cli-watchers.js | 2 +- 26 files changed, 53 insertions(+), 53 deletions(-) rename test/common/{inspector-cli.js => debugger.js} (100%) diff --git a/test/common/README.md b/test/common/README.md index 9929cd39144add..ea4d4e401be64e 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -9,6 +9,7 @@ This directory contains modules used to test the Node.js implementation. * [Common module API](#common-module-api) * [Countdown module](#countdown-module) * [CPU Profiler module](#cpu-profiler-module) +* [Debugger module](#debugger-module) * [DNS module](#dns-module) * [Duplex pair helper](#duplex-pair-helper) * [Environment variables](#environment-variables) @@ -16,7 +17,6 @@ This directory contains modules used to test the Node.js implementation. * [Heap dump checker module](#heap-dump-checker-module) * [hijackstdio module](#hijackstdio-module) * [HTTP2 module](#http2-module) -* [Inspector CLI module](#inspector-cli-module) * [Internet module](#internet-module) * [ongc module](#ongc-module) * [Report module](#report-module) @@ -506,6 +506,34 @@ Sampling interval in microseconds. Throws an `AssertionError` if there are no call frames with the expected `suffix` in the profiling data contained in `file`. +## Debugger module + +Provides common functionality for tests for `node inspect`. + +### `startCLI(args[[, flags], spawnOpts])` + +* `args` [<string>][] +* `flags` [<string>][] default = [] +* `showOpts` [<Object>][] default = {} +* return [<Object>][] + +Returns a null-prototype object with properties that are functions and getters +used to interact with the `node inspect` CLI. These functions are: + +* `flushOutput()` +* `waitFor()` +* `waitForPrompt()` +* `waitForInitialBreak()` +* `breakInfo` +* `ctrlC()` +* `output` +* `rawOutput` +* `parseSourceLines()` +* `writeLine()` +* `command()` +* `stepCommand()` +* `quit()` + ## `DNS` Module The `DNS` module provides utilities related to the `dns` built-in module. @@ -824,34 +852,6 @@ upon initial establishment of a connection. socket.write(http2.kClientMagic); ``` -## Inspector CLI module - -Provides common functionality for tests for `node inspect`. - -### `startCLI(args[[, flags], spawnOpts])` - -* `args` [<string>][] -* `flags` [<string>][] default = [] -* `showOpts` [<Object>][] default = {} -* return [<Object>][] - -Returns a null-prototype object with properties that are functions and getters -used to interact with the `node inspect` CLI. These functions are: - -* `flushOutput()` -* `waitFor()` -* `waitForPrompt()` -* `waitForInitialBreak()` -* `breakInfo` -* `ctrlC()` -* `output` -* `rawOutput` -* `parseSourceLines()` -* `writeLine()` -* `command()` -* `stepCommand()` -* `quit()` - ## Internet Module The `common/internet` module provides utilities for working with diff --git a/test/common/inspector-cli.js b/test/common/debugger.js similarity index 100% rename from test/common/inspector-cli.js rename to test/common/debugger.js diff --git a/test/inspector-cli/test-inspector-cli-address.js b/test/inspector-cli/test-inspector-cli-address.js index 89c70687c819b8..ff31747016c2d4 100644 --- a/test/inspector-cli/test-inspector-cli-address.js +++ b/test/inspector-cli/test-inspector-cli-address.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); const { spawn } = require('child_process'); diff --git a/test/inspector-cli/test-inspector-cli-auto-resume.js b/test/inspector-cli/test-inspector-cli-auto-resume.js index bd498bc536535d..9a210176a51705 100644 --- a/test/inspector-cli/test-inspector-cli-auto-resume.js +++ b/test/inspector-cli/test-inspector-cli-auto-resume.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const { addLibraryPath } = require('../common/shared-lib-util'); const assert = require('assert'); diff --git a/test/inspector-cli/test-inspector-cli-backtrace.js b/test/inspector-cli/test-inspector-cli-backtrace.js index a705efe5fe4270..baf2cfe8b58673 100644 --- a/test/inspector-cli/test-inspector-cli-backtrace.js +++ b/test/inspector-cli/test-inspector-cli-backtrace.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); const path = require('path'); diff --git a/test/inspector-cli/test-inspector-cli-break.js b/test/inspector-cli/test-inspector-cli-break.js index 50373541854fa1..ec6f354a7e7169 100644 --- a/test/inspector-cli/test-inspector-cli-break.js +++ b/test/inspector-cli/test-inspector-cli-break.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); const path = require('path'); diff --git a/test/inspector-cli/test-inspector-cli-clear-breakpoints.js b/test/inspector-cli/test-inspector-cli-clear-breakpoints.js index f85e33280c6dfd..0b9f3b113d5b2f 100644 --- a/test/inspector-cli/test-inspector-cli-clear-breakpoints.js +++ b/test/inspector-cli/test-inspector-cli-clear-breakpoints.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); const path = require('path'); diff --git a/test/inspector-cli/test-inspector-cli-custom-port.js b/test/inspector-cli/test-inspector-cli-custom-port.js index 4b788a6488169a..85d7e4154a16fe 100644 --- a/test/inspector-cli/test-inspector-cli-custom-port.js +++ b/test/inspector-cli/test-inspector-cli-custom-port.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); diff --git a/test/inspector-cli/test-inspector-cli-exceptions.js b/test/inspector-cli/test-inspector-cli-exceptions.js index 324f6f6bde2bf2..dc579d0197303a 100644 --- a/test/inspector-cli/test-inspector-cli-exceptions.js +++ b/test/inspector-cli/test-inspector-cli-exceptions.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); const path = require('path'); diff --git a/test/inspector-cli/test-inspector-cli-exec-scope.js b/test/inspector-cli/test-inspector-cli-exec-scope.js index ef1455c0b6231e..23e376815319c8 100644 --- a/test/inspector-cli/test-inspector-cli-exec-scope.js +++ b/test/inspector-cli/test-inspector-cli-exec-scope.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); diff --git a/test/inspector-cli/test-inspector-cli-exec.js b/test/inspector-cli/test-inspector-cli-exec.js index f47eaaa5a6f62d..e1de786ab21302 100644 --- a/test/inspector-cli/test-inspector-cli-exec.js +++ b/test/inspector-cli/test-inspector-cli-exec.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); diff --git a/test/inspector-cli/test-inspector-cli-heap-profiler.js b/test/inspector-cli/test-inspector-cli-heap-profiler.js index 689604b1c597cb..8602b8f8d11268 100644 --- a/test/inspector-cli/test-inspector-cli-heap-profiler.js +++ b/test/inspector-cli/test-inspector-cli-heap-profiler.js @@ -8,7 +8,7 @@ if (!common.isMainThread) { } const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); diff --git a/test/inspector-cli/test-inspector-cli-help.js b/test/inspector-cli/test-inspector-cli-help.js index f72d4960a75755..78a48b6f9ab159 100644 --- a/test/inspector-cli/test-inspector-cli-help.js +++ b/test/inspector-cli/test-inspector-cli-help.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); diff --git a/test/inspector-cli/test-inspector-cli-invalid-args.js b/test/inspector-cli/test-inspector-cli-invalid-args.js index 841d7a883178d7..327b076d78cfb8 100644 --- a/test/inspector-cli/test-inspector-cli-invalid-args.js +++ b/test/inspector-cli/test-inspector-cli-invalid-args.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); const { createServer } = require('net'); diff --git a/test/inspector-cli/test-inspector-cli-launch.js b/test/inspector-cli/test-inspector-cli-launch.js index 60f09334b4ef27..e501a6b6123c47 100644 --- a/test/inspector-cli/test-inspector-cli-launch.js +++ b/test/inspector-cli/test-inspector-cli-launch.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); diff --git a/test/inspector-cli/test-inspector-cli-low-level.js b/test/inspector-cli/test-inspector-cli-low-level.js index 5fafc7c361c33b..2613e4a4bbc2a3 100644 --- a/test/inspector-cli/test-inspector-cli-low-level.js +++ b/test/inspector-cli/test-inspector-cli-low-level.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); // Debugger agent direct access. diff --git a/test/inspector-cli/test-inspector-cli-pid.js b/test/inspector-cli/test-inspector-cli-pid.js index c94ab52031111f..97de9f40369d2d 100644 --- a/test/inspector-cli/test-inspector-cli-pid.js +++ b/test/inspector-cli/test-inspector-cli-pid.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); const { spawn } = require('child_process'); diff --git a/test/inspector-cli/test-inspector-cli-preserve-breaks.js b/test/inspector-cli/test-inspector-cli-preserve-breaks.js index fb751016ec7614..6863aaa45ae1b6 100644 --- a/test/inspector-cli/test-inspector-cli-preserve-breaks.js +++ b/test/inspector-cli/test-inspector-cli-preserve-breaks.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); const path = require('path'); diff --git a/test/inspector-cli/test-inspector-cli-profile.js b/test/inspector-cli/test-inspector-cli-profile.js index a683d78b06f204..39b57448ffe628 100644 --- a/test/inspector-cli/test-inspector-cli-profile.js +++ b/test/inspector-cli/test-inspector-cli-profile.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); diff --git a/test/inspector-cli/test-inspector-cli-random-port-with-inspect-port.js b/test/inspector-cli/test-inspector-cli-random-port-with-inspect-port.js index 9089f352f4c91b..83c2b68b014b48 100644 --- a/test/inspector-cli/test-inspector-cli-random-port-with-inspect-port.js +++ b/test/inspector-cli/test-inspector-cli-random-port-with-inspect-port.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); diff --git a/test/inspector-cli/test-inspector-cli-random-port.js b/test/inspector-cli/test-inspector-cli-random-port.js index aecadc549ce9c9..22de14661b8f64 100644 --- a/test/inspector-cli/test-inspector-cli-random-port.js +++ b/test/inspector-cli/test-inspector-cli-random-port.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); diff --git a/test/inspector-cli/test-inspector-cli-run-after-quit-restart.js b/test/inspector-cli/test-inspector-cli-run-after-quit-restart.js index 0e0233d1209d53..7f31d467198f23 100644 --- a/test/inspector-cli/test-inspector-cli-run-after-quit-restart.js +++ b/test/inspector-cli/test-inspector-cli-run-after-quit-restart.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); const path = require('path'); diff --git a/test/inspector-cli/test-inspector-cli-sb-before-load.js b/test/inspector-cli/test-inspector-cli-sb-before-load.js index fe1923f884a1e0..c99fb664a70768 100644 --- a/test/inspector-cli/test-inspector-cli-sb-before-load.js +++ b/test/inspector-cli/test-inspector-cli-sb-before-load.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); const path = require('path'); diff --git a/test/inspector-cli/test-inspector-cli-scripts.js b/test/inspector-cli/test-inspector-cli-scripts.js index 3c634e4b80ac83..893420d2aa4c2d 100644 --- a/test/inspector-cli/test-inspector-cli-scripts.js +++ b/test/inspector-cli/test-inspector-cli-scripts.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); diff --git a/test/inspector-cli/test-inspector-cli-use-strict.js b/test/inspector-cli/test-inspector-cli-use-strict.js index 4fb33c9f3e58fa..c5b46b4f00e839 100644 --- a/test/inspector-cli/test-inspector-cli-use-strict.js +++ b/test/inspector-cli/test-inspector-cli-use-strict.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert'); diff --git a/test/inspector-cli/test-inspector-cli-watchers.js b/test/inspector-cli/test-inspector-cli-watchers.js index ab39be6239ec26..e239e7ac74c216 100644 --- a/test/inspector-cli/test-inspector-cli-watchers.js +++ b/test/inspector-cli/test-inspector-cli-watchers.js @@ -4,7 +4,7 @@ const common = require('../common'); common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); -const startCLI = require('../common/inspector-cli'); +const startCLI = require('../common/debugger'); const assert = require('assert');