-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: redirect tmpdir for modules being tested
The test for some modules write into `os.tmpdir()` and do not always clean up afterwards which can fill the temporary directory on our CI. Redirect the temporary directory for modules being tested into CITGM's `tmpDir` which gets removed at the end of the run. Refs: nodejs/build#1757
- Loading branch information
1 parent
75068e9
commit 4974854
Showing
6 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "omg-i-write-to-tmpdir", | ||
"version": "1.0.0", | ||
"description": "Test suite writes to tmpdir", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/nodejs/citgm.git" | ||
}, | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "node test.js", | ||
"install": "exit 0" | ||
}, | ||
"keywords": [ | ||
"always", | ||
"passes" | ||
], | ||
"license": "MIT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
'use strict'; | ||
|
||
const { join } = require('path'); | ||
const { tmpdir } = require('os'); | ||
const { writeFileSync } = require('fs'); | ||
|
||
writeFileSync(join(tmpdir(), 'omg-i-write-to-tmpdir-testfile')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters