diff options
author | cjihrig <cjihrig@gmail.com> | 2019-03-30 23:05:48 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-04-02 20:48:59 -0400 |
commit | d5a5b99eafe157080db13f8221ecb64c3a092788 (patch) | |
tree | a14779d7d7cdd7f1fded63ca63eb2b61aa994c48 /test/common/report.js | |
parent | 19442656789a7edd327d453a16f699d4f5259a5c (diff) | |
download | node-new-d5a5b99eafe157080db13f8221ecb64c3a092788.tar.gz |
report: add cwd to report
The diagnostic report currently contains command line
information, and the environment, which contains the PWD
environment variable. This combination covers the majority
of cases, but it would be useful to have the result of
uv_cwd() as an additional data point. This commit adds that
information.
PR-URL: https://github.com/nodejs/node/pull/27022
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/common/report.js')
-rw-r--r-- | test/common/report.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/common/report.js b/test/common/report.js index a9c1d038d2..f3942c5d29 100644 --- a/test/common/report.js +++ b/test/common/report.js @@ -63,7 +63,7 @@ function _validateContent(data) { 'nodejsVersion', 'wordSize', 'arch', 'platform', 'componentVersions', 'release', 'osName', 'osRelease', 'osVersion', 'osMachine', 'host', 'glibcVersionRuntime', - 'glibcVersionCompiler']; + 'glibcVersionCompiler', 'cwd']; checkForUnknownFields(header, headerFields); assert.strictEqual(typeof header.event, 'string'); assert.strictEqual(typeof header.trigger, 'string'); @@ -76,6 +76,7 @@ function _validateContent(data) { assert(String(+header.dumpEventTimeStamp), header.dumpEventTimeStamp); assert(Number.isSafeInteger(header.processId)); + assert.strictEqual(typeof header.cwd, 'string'); assert(Array.isArray(header.commandLine)); header.commandLine.forEach((arg) => { assert.strictEqual(typeof arg, 'string'); |