aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/functions.sh')
-rw-r--r--scripts/functions.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/functions.sh b/scripts/functions.sh
index 544c283fc..9ff252416 100644
--- a/scripts/functions.sh
+++ b/scripts/functions.sh
@@ -114,6 +114,10 @@ function download_artifacts() {
return 1
}
+function is_selinuxenabled() {
+ sudo selinuxenabled && return 1 || return 0
+}
+
# Run functional tests
function functional_test() {
echo "*******************************************************************"
@@ -129,8 +133,16 @@ function functional_test() {
fi
# Run functional tests
- pushd ${SCRIPT_PATH}/../tests
- BUILD_SOFTWARE=${build_sw} DOCKERFILE=${dockerfile_path} bash ./run-functional.sh
+ pushd "${SCRIPT_PATH}/../tests"
+ # If selinux, let's run the tests with a privileged container to bypass
+ # the checks, which cost also in performance
+ if is_selinuxenabled; then
+ local privileged=false
+ else
+ local privileged=true
+ fi
+
+ BUILD_SOFTWARE=${build_sw} DOCKERFILE=${dockerfile_path} TEST_PRIVILEGED=${privileged} bash ./run-functional.sh
popd
echo "*******************************************************************"