Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

br: acceptance setcap on test run #3284

Merged
merged 2 commits into from
Oct 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions acceptance/brutil/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ BR_TOML=$TEST_ARTIFACTS_DIR/conf/$BR_TOML_FN
test_setup() {
set -e

# XXX(kormat): This is conditional on the binary existing, because when
# running on CI 'setup' is run on the host, where the binary doesn't exist.
[ -e $BRACCEPT ] && make -s setcap

test_config

local disp_dir="/run/shm/dispatcher"
Expand Down Expand Up @@ -64,6 +60,15 @@ test_config() {

test_run() {
set -e

# XXX(sgmonroy): this sets capabilities on the braccept binary.
# Initially this was done during setup and effectively a NOOP in CI given that there is no
# bracecpt binary when doing setup in the CI host. Instead capabilities are set when generating
# the container.
# This change allows to rebuild braccept binary without having to teardown/setup a test, at the cost
# of setting the capabilities twice on CI.
make -s setcap

$BRACCEPT -testName "${TEST_NAME:?}" -keysDirPath "$TEST_ARTIFACTS_DIR/conf/keys" "$@"
}

Expand Down