summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2021-08-03 11:59:56 -0400
committerPaul Moore <paul@paul-moore.com>2021-08-12 12:30:15 -0400
commit72609f73cd95749e27f50f2c5a52bacdbb1a3c5a (patch)
tree6db8c005f807c8d1fca6725eae2735536633fa17 /tests
parentb465f2329183adf9735c81e98500cee93eb720c9 (diff)
downloadlibseccomp-72609f73cd95749e27f50f2c5a52bacdbb1a3c5a.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>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/regression9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/regression b/tests/regression
index 09ac643..d28b848 100755
--- a/tests/regression
+++ b/tests/regression
@@ -104,6 +104,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
@@ -1158,6 +1159,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