From bc652628200055936848b450ed6dbd2314ca0bb0 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 9691bafc932b08..97ab20bf9c5cd6 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');