mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-24 18:29:06 +08:00
ci: carry on after selftest failure and report test group results
Two changes come with this patch: - Test groups report their exit status individually for the final summary, by appending it to /exitstatus in the VM. “Test groups” are test_maps, test_verifier, test_progs, and test_progs-no_alu32. - For these separate reports to make sense, allow the CI action to carry on even after one of the groups fails, by adding "&& true" to the commands in order to neutralise the effect of the "set -e".
This commit is contained in:
committed by
Andrii Nakryiko
parent
385b2d1738
commit
1f7db672e4
@@ -4,6 +4,8 @@ set -euo pipefail
|
||||
|
||||
source $(cd $(dirname $0) && pwd)/helpers.sh
|
||||
|
||||
STATUS_FILE=/exitstatus
|
||||
|
||||
read_lists() {
|
||||
(for path in "$@"; do
|
||||
if [[ -s "$path" ]]; then
|
||||
@@ -15,24 +17,31 @@ read_lists() {
|
||||
test_progs() {
|
||||
if [[ "${KERNEL}" != '4.9.0' ]]; then
|
||||
travis_fold start test_progs "Testing test_progs"
|
||||
./test_progs ${BLACKLIST:+-d$BLACKLIST} ${WHITELIST:+-a$WHITELIST}
|
||||
# "&& true" does not change the return code (it is not executed
|
||||
# if the Python script fails), but it prevents exiting on a
|
||||
# failure due to the "set -e".
|
||||
./test_progs ${BLACKLIST:+-d$BLACKLIST} ${WHITELIST:+-a$WHITELIST} && true
|
||||
echo "test_progs:$?" >> "${STATUS_FILE}"
|
||||
travis_fold end test_progs
|
||||
fi
|
||||
|
||||
travis_fold start test_progs-no_alu32 "Testing test_progs-no_alu32"
|
||||
./test_progs-no_alu32 ${BLACKLIST:+-d$BLACKLIST} ${WHITELIST:+-a$WHITELIST}
|
||||
./test_progs-no_alu32 ${BLACKLIST:+-d$BLACKLIST} ${WHITELIST:+-a$WHITELIST} && true
|
||||
echo "test_progs-no_alu32:$?" >> "${STATUS_FILE}"
|
||||
travis_fold end test_progs-no_alu32
|
||||
}
|
||||
|
||||
test_maps() {
|
||||
travis_fold start test_maps "Testing test_maps"
|
||||
./test_maps
|
||||
./test_maps && true
|
||||
echo "test_maps:$?" >> "${STATUS_FILE}"
|
||||
travis_fold end test_maps
|
||||
}
|
||||
|
||||
test_verifier() {
|
||||
travis_fold start test_verifier "Testing test_verifier"
|
||||
./test_verifier
|
||||
./test_verifier && true
|
||||
echo "test_verifier:$?" >> "${STATUS_FILE}"
|
||||
travis_fold end test_verifier
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user