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
Refs: nodejs/build#3864
PR-URL: #54395
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
  • Loading branch information
targos authored and RafaelGSS committed Aug 30, 2024
1 parent 0cf78aa commit b0ed8db
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 b0ed8db

Please sign in to comment.