2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-02 15:45:25 +00:00

Use sudo to setup the interfaces when CI job is not running as root

This commit is contained in:
Ondřej Surý
2019-07-02 12:23:56 +02:00
parent 646bb64246
commit 4d3e7d0b7d

View File

@@ -134,13 +134,23 @@ autoconf: &autoconf_job
untracked: true untracked: true
expire_in: "1 hour" expire_in: "1 hour"
.setup_interfaces: &setup_interfaces |
if [ "$(id -u)" -eq "0" ]; then
bash -x bin/tests/system/ifconfig.sh up;
else
sudo bash -x bin/tests/system/ifconfig.sh up;
fi
.setup_softhsm: &setup_softhsm |
bash -x util/prepare-softhsm2.sh
.system_test: &system_test_job .system_test: &system_test_job
<<: *default_triggering_rules <<: *default_triggering_rules
stage: test stage: test
retry: 2 retry: 2
before_script: before_script:
- bash -x bin/tests/system/ifconfig.sh up - *setup_interfaces
- bash -x util/prepare-softhsm2.sh - *setup_softhsm
script: script:
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 ) - ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
- test -s bin/tests/system/systests.output - test -s bin/tests/system/systests.output