Skip to content

Add npm run clean-test-dir#2657

Merged
robertbrignull merged 2 commits intomainfrom
robertbrignull/clean-test-dir
Aug 1, 2023
Merged

Add npm run clean-test-dir#2657
robertbrignull merged 2 commits intomainfrom
robertbrignull/clean-test-dir

Conversation

@robertbrignull
Copy link
Copy Markdown
Contributor

Sometimes the tests can fail to run and cleaning the .vscode-test dir is necessary to fix them. This PR adds this as a npm script so it's easier to remember that this option exists and what to do.

Is using rm and this path ok? Will this be ok for all operating systems?

Alternative suggestions for naming are also welcome.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@robertbrignull robertbrignull requested a review from a team July 31, 2023 09:27
@robertbrignull robertbrignull requested a review from a team as a code owner July 31, 2023 09:27
@norascheuch
Copy link
Copy Markdown
Contributor

Looks good, thank you! Would it be useful to mention this in the testing.md file?

Copy link
Copy Markdown
Member

@koesie10 koesie10 left a comment

Choose a reason for hiding this comment

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

Sometimes, it seems like there are also .vscode-test directories in subdirectories (like in test/vscode-tests/no-workspace). Could we also remove those automatically when running this?

@robertbrignull robertbrignull force-pushed the robertbrignull/clean-test-dir branch from 4fad91a to 5107086 Compare July 31, 2023 10:09
@robertbrignull
Copy link
Copy Markdown
Contributor Author

I've switched it to use find to locate and delete all cases of .vscode-test directories.

I haven't tested it but the info I've seen says these args should work on linux as well as mac, and therefore hopefully windows too in a gitbash or WSL shell.

Copy link
Copy Markdown
Member

@koesie10 koesie10 left a comment

Choose a reason for hiding this comment

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

Thanks!

@robertbrignull robertbrignull merged commit 6dfe173 into main Aug 1, 2023
@robertbrignull robertbrignull deleted the robertbrignull/clean-test-dir branch August 1, 2023 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants