summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2017-02-07 08:03:31 -0500
committerPaul Moore <paul@paul-moore.com>2017-02-07 09:45:41 -0500
commitc33e14937344af12ea42a8ca33497a443f486ac4 (patch)
tree4ce7c25c16b94f3f251e8d75e6cdefca3023abfa
parenta697763953670b7d9ce3375fe2d3c6fe87fb076c (diff)
downloadlibseccomp-c33e14937344af12ea42a8ca33497a443f486ac4.tar.gz
tests: add test configuration via environment variables
Allow the test type to be specified by the LIBSECCOMP_TSTCFG_TYPE environment variable. Signed-off-by: Paul Moore <paul@paul-moore.com>
-rwxr-xr-xtests/regression4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regression b/tests/regression
index 40567d5..b2eb5ad 100755
--- a/tests/regression
+++ b/tests/regression
@@ -83,6 +83,7 @@ optional arguments:
-s SINGLE_TEST specifies individual test number to be run
-t [TEMP_DIR] specifies directory to create temporary files in
-T [TEST_TYPE] only run tests matching the specified type
+ can also be set via LIBSECCOMP_TSTCFG_TYPE env variable
-v specifies that verbose output be provided
EOF
}
@@ -967,6 +968,9 @@ if [[ -n $runall ]]; then
single_list=()
fi
+# check for configuration via environment variables
+[[ -z $type && -n $LIBSECCOMP_TSTCFG_TYPE ]] && type=$LIBSECCOMP_TSTCFG_TYPE
+
# open log file for append (default to stdout)
if [[ -n $logfile ]]; then
logfd=3