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

Support negative --test-threads/--jobs parameter #495

Closed
sunshowers opened this issue Aug 27, 2022 · 3 comments
Closed

Support negative --test-threads/--jobs parameter #495

sunshowers opened this issue Aug 27, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@sunshowers
Copy link
Member

sunshowers commented Aug 27, 2022

Port over rust-lang/cargo#10844.

This is a great first issue and should take no more than a few hours to complete :) Here's the recommended series of steps:

  1. Update the TestThreads parser and deserializer to handle negative integers:
    /// Type for the test-threads config key.
    #[derive(Clone, Copy, Debug, Eq, PartialEq)]
    pub enum TestThreads {
    /// Run tests with a specified number of threads.
    Count(usize),
    /// Run tests with a number of threads equal to the logical CPU count.
    NumCpus,
    }

    Use the logic at https://github.com/rust-lang/cargo/pull/10844/files#diff-f0c6e0ba24dc1403233aec133c8788a36c21b097514ea69994ff35253a07802a.
  2. Add unit tests for this.
@sunshowers sunshowers added enhancement New feature or request good first issue Good for newcomers labels Aug 27, 2022
@OLUWAMUYIWA
Copy link
Contributor

Interested in this. I will do the porting

@sunshowers
Copy link
Member Author

@OLUWAMUYIWA awesome, thanks! Please comment here if you run into issues.

@OLUWAMUYIWA
Copy link
Contributor

Will do. Thanks @sunshowers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants