From 6b6c87e510a15c34b82cb26f9e9d7f5a6497b26b Mon Sep 17 00:00:00 2001 From: jackcmay Date: Wed, 14 Nov 2018 17:16:37 -0800 Subject: [PATCH] Run BPF tests in CI --- ci/test-nightly.sh | 8 ++++++++ ci/test-stable.sh | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ci/test-nightly.sh b/ci/test-nightly.sh index 1402afc063..ab92737f5f 100755 --- a/ci/test-nightly.sh +++ b/ci/test-nightly.sh @@ -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. diff --git a/ci/test-stable.sh b/ci/test-stable.sh index 62de6a0741..304de44f66 100755 --- a/ci/test-stable.sh +++ b/ci/test-stable.sh @@ -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