Browse Source

test: chdir before running test-cli-node-options

When test-cli-node-options is run it uses the --trace-events-enabled
option which generates a file named node_trace.1.log. This commit
changes the working directory to the test tmp directory to avoid this
file being created in the project root.

PR-URL: https://github.com/nodejs/node/pull/12660
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
v6
Daniel Bevenius 8 years ago
parent
commit
a4fd9e5e6d
  1. 3
      test/parallel/test-cli-node-options.js

3
test/parallel/test-cli-node-options.js

@ -8,6 +8,9 @@ if (process.config.variables.node_without_node_options)
const assert = require('assert'); const assert = require('assert');
const exec = require('child_process').execFile; const exec = require('child_process').execFile;
common.refreshTmpDir();
process.chdir(common.tmpDir);
disallow('--version'); disallow('--version');
disallow('-v'); disallow('-v');
disallow('--help'); disallow('--help');

Loading…
Cancel
Save