Skip to content

Commit

Permalink
Jenkins: try to obtain cap_net_raw
Browse files Browse the repository at this point in the history
  • Loading branch information
bmerry committed Dec 9, 2024
1 parent d7907b8 commit 2fdb0ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ COPY install-sys-pkgs.sh .
# jq and iproute2 are used to find the interface IPv4 address
RUN apt-get update && apt-get -y --no-install-recommends install libpython3-dev python3-venv jq iproute2
RUN ./install-sys-pkgs.sh

# Give setpriv the ability to run commands with CAP_NET_RAW capability
RUN setcap cap_net_raw+p /usr/bin/setpriv
3 changes: 2 additions & 1 deletion .ci/py-tests-jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ echo "Testing with device $device address $address"
# -ra summarises the reasons for skipping or failing tests
# We suppress the exit code so that the following test publishing step
# is allowed to run if there are failing tests.
pytest -v -ra --junitxml=results.xml --suppress-tests-failed-exit-code
setpriv --inh-caps +net_raw --ambient-caps +net_raw -- \
pytest -v -ra --junitxml=results.xml --suppress-tests-failed-exit-code

0 comments on commit 2fdb0ce

Please sign in to comment.