aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-10-11 20:01:32 +0200
committerMauro Sardara <msardara@cisco.com>2022-10-12 21:49:35 +0200
commit12d21f032e9a67b327101c42481a546a48a6ac21 (patch)
tree641fce3d9f85c0d1f9da2ba8ebda2d17b0fa2eb3 /scripts
parent5ee46ef7ce250a52d85eeafc0dd27de0cd5d6f67 (diff)
test: instrument functional tests with more logs
Also: - Do not tun tests with privileged containers HICN-806 - Refactor robot test files and config.sh Currently some logs are missing from the robot output of the functional tests. This patch adds them. Ticket: HICN-805 Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I9893eb356a4dd12f4bc6347b8fe02e358c9bf737
Diffstat (limited to 'scripts')
-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 "*******************************************************************"