Skip to content

Commit

Permalink
Adds support for ABQ_WORKER, ABQ_RUNNERS, and ABQ_BATCH_SIZE environm…
Browse files Browse the repository at this point in the history
…ent variables (#110)
  • Loading branch information
TAGraves authored Dec 2, 2024
1 parent 09cbfb7 commit cbc0a9e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions crates/abq_cli/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ pub enum Command {
/// The number of the test worker connecting for a test suite run.
///
/// There may not be duplicate worker numberings in an ABQ test suite run.
#[clap(long, required = false, default_value_t = 0)]
#[clap(long, required = false, default_value_t = 0, env("ABQ_WORKER"))]
worker: u32,

/// How many times to retry failed tests.
Expand Down Expand Up @@ -297,7 +297,13 @@ pub enum Command {
/// Number of runners to start on the worker.
///
/// Set to "cpu-cores" to use the number of available (physical) CPUs cores - 1.
#[clap(long, short = 'n', required = false, default_value = "1")]
#[clap(
long,
short = 'n',
required = false,
default_value = "1",
env("ABQ_RUNNERS")
)]
num: NumRunners,

/// Token to authorize messages sent to the queue with.
Expand Down Expand Up @@ -335,7 +341,7 @@ pub enum Command {
reporter: Vec<ReporterKind>,

/// How many tests to send to a worker a time.
#[clap(long, default_value = "7")]
#[clap(long, default_value = "7", env("ABQ_BATCH_SIZE"))]
batch_size: NonZeroU64,

/// How ABQ will distribute the tests.
Expand Down

0 comments on commit cbc0a9e

Please sign in to comment.