Run Tests

run_tests
Arguments:

[$1…] - Test scripts. Default: all test-*.bsh

Output:

stdout - List of tests as they pass. Stdout, stderr, and env of tests that fail.

Author:

Rick Olson

Copyright:
Modification History:

Andy Neff - Simplified. Move to bsh file names

TESTLIB_VERBOSE_LOGS
Default:

0

Adds additional verbose printouts

Enables additional printouts when testing, such as:
  • Print environment if at least one test fails

Example

TESTLIB_VERBOSE_LOGS=1
TESTLIB_PARALLEL
Default:

$VSI_NUMBER_CORES

Number of test scripts to run in parallel

While the tests inside of a script are all run serially, multiple test scripts are run in parallel.

Note

In certain complicated scenarios (either race conditions or just TMI), it is beneficial to set TESTLIB_PARALLEL =1 just to simplify debugging

Note

Since darling is prone to panicking the kernel, if TESTLIB_PARALLEL is unset, it will be set to 4 by default.

TESTLIB_ARGS

An array of test arguments that can be passed to every test call

Note

Currently not used by any test

TESTLIB_DISCOVERY_DIR
Default:

Same directory as testlib.

Directory where all the test-*.bsh files are stored.

If relative path, it is relative to testlib.bsh.