From a4fd9e5e6d43028b33b8ff5c1bea3b4998573d5a Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 26 Apr 2017 08:40:15 +0200 Subject: [PATCH] test: chdir before running test-cli-node-options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: James M Snell Reviewed-By: Michaƫl Zasso Reviewed-By: Rich Trott --- test/parallel/test-cli-node-options.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js index 08c8f63f791..90e995af9be 100644 --- a/test/parallel/test-cli-node-options.js +++ b/test/parallel/test-cli-node-options.js @@ -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');