From fe292fac55c2b41432db2c326fe40ae154a1ab21 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 28 Feb 2019 20:54:35 -0500 Subject: [PATCH 1/2] test: rename node-report suite to report This commit renames the "node-report" test suite to "report" in order to begin differentiating core's diagnostic reporting from the original node-report module on npm PR-URL: https://github.com/nodejs/node/pull/26371 Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Minwoo Jung Reviewed-By: James M Snell --- .../test-fatal-error.js => report/test-report-fatal-error.js} | 0 .../test-api-getreport.js => report/test-report-getreport.js} | 0 .../test-signal.js => report/test-report-signal.js} | 0 .../test-api-nohooks.js => report/test-report-triggerreport.js} | 0 .../test-report-uncaught-exception.js} | 0 .../test-api-uvhandles.js => report/test-report-uv-handles.js} | 0 test/{node-report => report}/testcfg.py | 2 +- 7 files changed, 1 insertion(+), 1 deletion(-) rename test/{node-report/test-fatal-error.js => report/test-report-fatal-error.js} (100%) rename test/{node-report/test-api-getreport.js => report/test-report-getreport.js} (100%) rename test/{node-report/test-signal.js => report/test-report-signal.js} (100%) rename test/{node-report/test-api-nohooks.js => report/test-report-triggerreport.js} (100%) rename test/{node-report/test-exception.js => report/test-report-uncaught-exception.js} (100%) rename test/{node-report/test-api-uvhandles.js => report/test-report-uv-handles.js} (100%) rename test/{node-report => report}/testcfg.py (64%) diff --git a/test/node-report/test-fatal-error.js b/test/report/test-report-fatal-error.js similarity index 100% rename from test/node-report/test-fatal-error.js rename to test/report/test-report-fatal-error.js diff --git a/test/node-report/test-api-getreport.js b/test/report/test-report-getreport.js similarity index 100% rename from test/node-report/test-api-getreport.js rename to test/report/test-report-getreport.js diff --git a/test/node-report/test-signal.js b/test/report/test-report-signal.js similarity index 100% rename from test/node-report/test-signal.js rename to test/report/test-report-signal.js diff --git a/test/node-report/test-api-nohooks.js b/test/report/test-report-triggerreport.js similarity index 100% rename from test/node-report/test-api-nohooks.js rename to test/report/test-report-triggerreport.js diff --git a/test/node-report/test-exception.js b/test/report/test-report-uncaught-exception.js similarity index 100% rename from test/node-report/test-exception.js rename to test/report/test-report-uncaught-exception.js diff --git a/test/node-report/test-api-uvhandles.js b/test/report/test-report-uv-handles.js similarity index 100% rename from test/node-report/test-api-uvhandles.js rename to test/report/test-report-uv-handles.js diff --git a/test/node-report/testcfg.py b/test/report/testcfg.py similarity index 64% rename from test/node-report/testcfg.py rename to test/report/testcfg.py index e5ea1f57a035b3..c06b75ce5c7dca 100644 --- a/test/node-report/testcfg.py +++ b/test/report/testcfg.py @@ -3,4 +3,4 @@ import testpy def GetConfiguration(context, root): - return testpy.ParallelTestConfiguration(context, root, 'node-report') + return testpy.ParallelTestConfiguration(context, root, 'report') From f9cd5e30945d1fc81f788562c8a6ebf261f4f896 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 28 Feb 2019 21:03:31 -0500 Subject: [PATCH 2/2] doc,lib,test: rename node-report to report This commit completes the renaming of node-report to report in order to better differentiate core's reporting from the node-report npm module. PR-URL: https://github.com/nodejs/node/pull/26371 Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Minwoo Jung Reviewed-By: James M Snell --- doc/api/report.md | 6 +++--- lib/internal/bootstrap/pre_execution.js | 2 +- lib/internal/process/execution.js | 4 ++-- test/common/index.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/api/report.md b/doc/api/report.md index 419fe33417345d..90173a1cfaa154 100644 --- a/doc/api/report.md +++ b/doc/api/report.md @@ -32,7 +32,7 @@ is provided below for reference. "/home/nodeuser/project/node/out/Release/node", "--experimental-report", "--diagnostic-report-uncaught-exception", - "/home/nodeuser/project/node/test/node-report/test-exception.js", + "/home/nodeuser/project/node/test/report/test-exception.js", "child" ], "nodejsVersion": "v12.0.0-pre", @@ -66,8 +66,8 @@ is provided below for reference. "javascriptStack": { "message": "Error: *** test-exception.js: throwing uncaught Error", "stack": [ - "at myException (/home/nodeuser/project/node/test/node-report/test-exception.js:9:11)", - "at Object. (/home/nodeuser/project/node/test/node-report/test-exception.js:12:3)", + "at myException (/home/nodeuser/project/node/test/report/test-exception.js:9:11)", + "at Object. (/home/nodeuser/project/node/test/report/test-exception.js:12:3)", "at Module._compile (internal/modules/cjs/loader.js:718:30)", "at Object.Module._extensions..js (internal/modules/cjs/loader.js:729:10)", "at Module.load (internal/modules/cjs/loader.js:617:32)", diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js index 072112e68ba07f..25becacf28cf5e 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -11,7 +11,7 @@ function prepareMainThreadExecution() { // Only main thread receives signals. setupSignalHandlers(); - // Process initial configurations of node-report, if any. + // Process initial diagnostic reporting configuration, if present. initializeReport(); initializeReportSignalHandlers(); // Main-thread-only. diff --git a/lib/internal/process/execution.js b/lib/internal/process/execution.js index a35feaacce28ff..575484d509a491 100644 --- a/lib/internal/process/execution.js +++ b/lib/internal/process/execution.js @@ -102,7 +102,7 @@ function createFatalException() { // call that threw and was never cleared. So clear it now. clearDefaultTriggerAsyncId(); - // If node-report is enabled, call into its handler to see + // If diagnostic reporting is enabled, call into its handler to see // whether it is interested in handling the situation. // Ignore if the error is scoped inside a domain. // use == in the checks as we want to allow for null and undefined @@ -119,7 +119,7 @@ function createFatalException() { report.onUnCaughtException(er ? er.stack : undefined); } } - } catch {} // NOOP, node_report unavailable. + } catch {} // Ignore the exception. Diagnostic reporting is unavailable. } if (exceptionHandlerState.captureFn !== null) { diff --git a/test/common/index.js b/test/common/index.js index 60bd3520253e19..077bb9218df1c4 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -624,7 +624,7 @@ function skipIfInspectorDisabled() { function skipIfReportDisabled() { if (!process.config.variables.node_report) { - skip('Node Report is disabled'); + skip('Diagnostic reporting is disabled'); } }