Skip to content

Commit cbc0a9e

Browse files
authored
Adds support for ABQ_WORKER, ABQ_RUNNERS, and ABQ_BATCH_SIZE environment variables (#110)
1 parent 09cbfb7 commit cbc0a9e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

crates/abq_cli/src/args.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ pub enum Command {
255255
/// The number of the test worker connecting for a test suite run.
256256
///
257257
/// There may not be duplicate worker numberings in an ABQ test suite run.
258-
#[clap(long, required = false, default_value_t = 0)]
258+
#[clap(long, required = false, default_value_t = 0, env("ABQ_WORKER"))]
259259
worker: u32,
260260

261261
/// How many times to retry failed tests.
@@ -297,7 +297,13 @@ pub enum Command {
297297
/// Number of runners to start on the worker.
298298
///
299299
/// Set to "cpu-cores" to use the number of available (physical) CPUs cores - 1.
300-
#[clap(long, short = 'n', required = false, default_value = "1")]
300+
#[clap(
301+
long,
302+
short = 'n',
303+
required = false,
304+
default_value = "1",
305+
env("ABQ_RUNNERS")
306+
)]
301307
num: NumRunners,
302308

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

337343
/// How many tests to send to a worker a time.
338-
#[clap(long, default_value = "7")]
344+
#[clap(long, default_value = "7", env("ABQ_BATCH_SIZE"))]
339345
batch_size: NonZeroU64,
340346

341347
/// How ABQ will distribute the tests.

0 commit comments

Comments
 (0)