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

feat(cli/test): add DENO_JOBS env variable for test subcommand #14929

Merged
merged 6 commits into from
Jul 15, 2022

Conversation

mrkldshv
Copy link
Contributor

@mrkldshv mrkldshv commented Jun 21, 2022

All changes in this MR concern test subcommand. The implemented behaviour for running tests is:

  • Use one thread by default
  • Deprecate usage of --jobs flag with numeric values (e.g. --jobs=2) Edit: See feat(cli/test): add DENO_JOBS env variable for test subcommand #14929 (comment)
  • Introduce DENO_JOBS env variable that is used with --jobs flag (usage: DENO_JOBS=2 deno test --jobs)
  • Use number of available threads when --jobs flag is provided without value and there is no DENO_JOBS env variable set

Addresses part of #9585 (comment).

cli/flags.rs Outdated Show resolved Hide resolved
cli/flags.rs Outdated Show resolved Hide resolved
@mrkldshv mrkldshv force-pushed the feature/cli-test-jobs-env-variable branch 3 times, most recently from c84e5a5 to b543343 Compare June 23, 2022 17:30
@mrkldshv mrkldshv requested a review from dsherret June 25, 2022 08:41
@mrkldshv mrkldshv force-pushed the feature/cli-test-jobs-env-variable branch from fb370e2 to 03f29cc Compare June 29, 2022 12:58
@dsherret dsherret added this to the 1.24 milestone Jun 29, 2022
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

Overall, looks good to me, but just a couple small changes.

cli/args/flags.rs Outdated Show resolved Hide resolved
cli/args/flags.rs Outdated Show resolved Hide resolved
cli/tests/testdata/test/pass-jobs-flag.out Outdated Show resolved Hide resolved
cli/args/flags.rs Outdated Show resolved Hide resolved
@mrkldshv mrkldshv force-pushed the feature/cli-test-jobs-env-variable branch from e2ff725 to 113c80f Compare June 30, 2022 14:47
@mrkldshv mrkldshv force-pushed the feature/cli-test-jobs-env-variable branch from 113c80f to 05c885b Compare July 14, 2022 08:27
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @mrkldshv!

@dsherret dsherret merged commit ee0c058 into denoland:main Jul 15, 2022
@mrkldshv mrkldshv deleted the feature/cli-test-jobs-env-variable branch July 15, 2022 14:31
@mrkldshv
Copy link
Contributor Author

@dsherret Thanks for the review! I'll open another PR resolving #14533.

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.

3 participants