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

test: execute shell directly for refresh() #55051

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Sep 21, 2024

What if we just called the shell directly to avoid the cost of booting a Node.js instance?

cc @nodejs/build any concerns?

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Sep 21, 2024
@anonrig anonrig requested a review from jasnell September 21, 2024 19:42
test/common/tmpdir.js Outdated Show resolved Hide resolved
Copy link

codecov bot commented Sep 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.14%. Comparing base (b181535) to head (5888bc2).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #55051   +/-   ##
=======================================
  Coverage   89.13%   89.14%           
=======================================
  Files         665      665           
  Lines      193165   193179   +14     
  Branches    37191    37196    +5     
=======================================
+ Hits       172181   172204   +23     
- Misses      13729    13730    +1     
+ Partials     7255     7245   -10     

see 38 files with indirect coverage changes

@anonrig anonrig added the review wanted PRs that need reviews. label Sep 27, 2024
@anonrig
Copy link
Member Author

anonrig commented Nov 28, 2024

cc @nodejs/cpp-reviewers @nodejs/tsc would you mind reviewing?

@RafaelGSS RafaelGSS added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 28, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 28, 2024
@nodejs-github-bot

This comment was marked as outdated.

@anonrig
Copy link
Member Author

anonrig commented Jan 24, 2025

@jasnell @mcollina would you mind reviewing this PR? is it a good idea or a bad one, i'm not sure.

@jasnell
Copy link
Member

jasnell commented Jan 24, 2025

I don't really have a strong opinion on it. The code change looks fine but not sure if it's worthwhile or not. @nodejs/testing folks?

@mcollina
Copy link
Member

I expect problems in windows, but if we can get it to pass on CI it's ok.

@anonrig
Copy link
Member Author

anonrig commented Jan 24, 2025

I expect problems in windows, but if we can get it to pass on CI it's ok.

This PR doesn't update Windows implementation. Only UNIX

@nodejs-github-bot

This comment was marked as outdated.

@anonrig anonrig requested a review from cjihrig January 24, 2025 16:26
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

One minor comment, but other than that LGTM if the CI passes.

test/common/tmpdir.js Outdated Show resolved Hide resolved
test/common/tmpdir.js Outdated Show resolved Hide resolved
test/common/tmpdir.js Outdated Show resolved Hide resolved
test/common/tmpdir.js Outdated Show resolved Hide resolved
@anonrig anonrig force-pushed the call-rm-directly branch 2 times, most recently from 682b29e to f03ece3 Compare February 9, 2025 00:27
@anonrig
Copy link
Member Author

anonrig commented Feb 9, 2025

cc @aduh95 @cjihrig can you re-review? I've addressed your comments.

@nodejs-github-bot

This comment was marked as outdated.

@@ -5,17 +5,27 @@ const fs = require('fs');
const path = require('path');
const { pathToFileURL } = require('url');
const { isMainThread } = require('worker_threads');
const isUnixLike = process.platform !== 'win32';
const { escapePOSIXShell } = require('./index.js');
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like you need to lazy load to workaround the circular dependency

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! Updating PR now

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. review wanted PRs that need reviews. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants