Skip to content

Commit

Permalink
test: prevent V8 from writing into the system's tmpdir
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Aug 16, 2024
1 parent 8d37584 commit 530cf19
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/parallel/test-cli-node-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ function expectNoWorker(opt, want, command, wantsError) {
function expect(
opt, want, command = 'console.log("B")', wantsError = false, testWorker = true
) {
const argv = ['-e', command];
const argv = [
// --perf-basic-prof and --perf-basic-prof-only-functions write to /tmp by default.
`--perf-basic-prof-path=${tmpdir.path}`,
'-e',
command,
];
const opts = {
cwd: tmpdir.path,
env: Object.assign({}, process.env, { NODE_OPTIONS: opt }),
Expand Down

0 comments on commit 530cf19

Please sign in to comment.