Skip to content

Commit

Permalink
test: chdir before running test-cli-node-options
Browse files Browse the repository at this point in the history
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.

Backport-PR-URL: #12677
PR-URL: #12660
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
danbev authored and MylesBorins committed Oct 25, 2017
1 parent 16f8f9b commit ba830f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/parallel/test-cli-node-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ if (process.config.variables.node_without_node_options)
const assert = require('assert');
const exec = require('child_process').execFile;

common.refreshTmpDir();
process.chdir(common.tmpDir);

disallow('--version');
disallow('-v');
disallow('--help');
Expand Down

0 comments on commit ba830f0

Please sign in to comment.