Run BPF tests in CI

This commit is contained in:
jackcmay 2018-11-14 17:16:37 -08:00 committed by GitHub
parent 267f9115ba
commit 6b6c87e510
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -27,6 +27,14 @@ maybe_cargo_install() {
done
}
# Run program/native/bpf_loader's bench with bpf_c feature
(
set -x
cd "programs/native/bpf_loader"
echo --- program/native/bpf_loader bench --features=bpf_c
cargo bench --verbose --features="bpf_c" -- --nocapture
)
maybe_cargo_install cov
# Generate coverage data and report via unit-test suite.

View File

@ -33,7 +33,7 @@ _ cargo clippy -- --deny=warnings
for test in tests/*.rs; do
test=${test##*/} # basename x
test=${test%.rs} # basename x .rs
_ cargo test --verbose --jobs=1 --test="$test"
_ cargo test --verbose --jobs=1 --test="$test" --features="bpf_c"
done
# Run native program's tests
@ -46,6 +46,14 @@ for program in programs/native/*; do
)
done
# Run program/native/bpf_loader's test with bpf_c feature
(
set -x
cd "programs/native/bpf_loader"
echo --- program/native/bpf_loader test --features=bpf_c
cargo test --verbose --features="bpf_c"
)
# Build the HTML
export PATH=$CARGO_HOME/bin:$PATH
maybe_install mdbook