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

Parallel testing via CIVET_THREADS (Mocha's --parallel) #1665

Merged
merged 1 commit into from
Dec 28, 2024
Merged

Conversation

edemaine
Copy link
Collaborator

CIVET_THREADS=4 yarn test currently crashes. I'm guessing Mocha doesn't like our spawning of workers within tests?

As a workaround to this, I modified the test script to translate CIVET_THREADS into the corresponding Mocha options: --parallel -j 4. This seems to speed things up. (On my machine, tests go from 21.3s to 14s.)

Now you can set export CIVET_THREADS=4 globally and both yarn build and yarn test will speed up.

@edemaine edemaine merged commit 137d4c1 into main Dec 28, 2024
4 checks passed
@edemaine edemaine deleted the parallel-test branch December 28, 2024 16:53
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.

2 participants