========= Run Tests ========= .. default-domain:: bash .. file:: 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: * Original version: (c) 2016 by GitHub * License: MIT :Modification History: Andy Neff - Simplified. Move to bsh file names .. envvar:: TESTLIB_VERBOSE_LOGS :Default: ``0`` Adds additional verbose printouts Enables additional printouts when testing, such as: - Print environment if at least one test fails .. rubric:: Example .. code-block:: bash TESTLIB_VERBOSE_LOGS=1 .. envvar:: 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 :envvar:`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. .. envvar:: TESTLIB_ARGS An array of test arguments that can be passed to every test call .. note:: Currently not used by any test .. envvar:: TESTLIB_DISCOVERY_DIR :Default: Same directory as testlib. Directory where all the test-\*\.bsh files are stored. If relative path, it is relative to :file:`testlib.bsh`.