diff options
author | Paul Moore <paul@paul-moore.com> | 2021-08-03 11:59:56 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2021-08-12 12:37:56 -0400 |
commit | c3baa68fe94bf855671b599dbdda0db2eb6df589 (patch) | |
tree | a5b5557beff9b287962d07f60e9a0ca0dbbe96f8 | |
parent | 8c28d83da9206a89b4f490dd4a862c69dae0e9f0 (diff) | |
download | libseccomp-c3baa68fe94bf855671b599dbdda0db2eb6df589.tar.gz |
tests: add support for the LIBSECCOMP_TSTCFG_BATCHES env variable
This allows us to specify the test batches via environment variables
like we do other parts of the test configuration.
Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
(imported from commit 72609f73cd95749e27f50f2c5a52bacdbb1a3c5a)
-rwxr-xr-x | tests/regression | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/regression b/tests/regression index d7d24eb..f938b1b 100755 --- a/tests/regression +++ b/tests/regression @@ -99,6 +99,7 @@ optional arguments: can also be set via LIBSECCOMP_TSTCFG_MODE_LIST env variable -a specifies all tests are to be run -b BATCH_NAME specifies batch of tests to be run + can also be set via LIBSECCOMP_TSTCFG_BATCHES env variable -l [LOG] specifies log file to write test results to -s SINGLE_TEST specifies individual test number to be run -t [TEMP_DIR] specifies directory to create temporary files in @@ -1063,6 +1064,14 @@ if [[ -z $mode_list ]]; then fi fi +# check if we specified a list of tests via the environment variable +if [[ -n $LIBSECCOMP_TSTCFG_BATCHES ]]; then + for i in $(echo "$LIBSECCOMP_TSTCFG_BATCHES" | sed 's/,/ /g'); do + batch_list[batch_count]="$i" + batch_count=$(($batch_count+1)) + done +fi + # default to all tests if batch or single tests not requested if [[ -z $batch_list ]] && [[ -z $single_list ]]; then runall=1 |