Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: redirect homedir for modules being tested #755

Merged
merged 1 commit into from
Oct 22, 2019

Conversation

richardlau
Copy link
Member

The tests for some modules write into os.homedir() and are not
cleaning up afterwards. This is accumulating over time on our CI
and require periodic manual cleaning.

Redirect the environment variables used by os.homedir() into
CITGM's temporary directory for the module being tested, which gets
removed at the end of the test run.

Refs: nodejs/build#1908 (comment)

Checklist
  • npm test passes
  • tests are included
  • contribution guidelines followed
    here

The tests for some modules write into `os.homedir()` and are not
cleaning up afterwards. This is accumulating over time on our CI
and require periodic manual cleaning.

Redirect the environment variables used by `os.homedir()` into
CITGM's temporary directory for the module being tested, which gets
removed at the end of the test run.

Refs: nodejs/build#1908 (comment)
@codecov-io
Copy link

codecov-io commented Oct 21, 2019

Codecov Report

Merging #755 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #755      +/-   ##
==========================================
+ Coverage   95.44%   95.46%   +0.02%     
==========================================
  Files          27       27              
  Lines         879      883       +4     
==========================================
+ Hits          839      843       +4     
  Misses         40       40
Impacted Files Coverage Δ
lib/temp-directory.js 100% <100%> (ø) ⬆️
lib/create-options.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63e2dae...ac9333c. Read the comment docs.

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@richardlau richardlau merged commit 5421cf6 into nodejs:master Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants