You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2022/01/18 01:11:33 UTC
[apisix] branch master updated: test: fix the CI failure detection when rerunning the tests (#6129)
This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 70bc7f6 test: fix the CI failure detection when rerunning the tests (#6129)
70bc7f6 is described below
commit 70bc7f66a28835418fc5265e22a49162a2df0c53
Author: 罗泽轩 <sp...@gmail.com>
AuthorDate: Tue Jan 18 09:11:22 2022 +0800
test: fix the CI failure detection when rerunning the tests (#6129)
---
ci/common.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/ci/common.sh b/ci/common.sh
index 690a591..027b121 100644
--- a/ci/common.sh
+++ b/ci/common.sh
@@ -36,12 +36,17 @@ rerun_flaky_tests() {
exit 0
fi
+ if ! tail -1 "$1" | grep "Result: FAIL"; then
+ # CI failure not caused by failed test
+ exit 1
+ fi
+
local tests
local n_test
tests="$(awk '/^t\/.*.t\s+\(.+ Failed: .+\)/{ print $1 }' "$1")"
n_test="$(echo "$tests" | wc -l)"
- if [ "$n_test" -eq 0 ] || [ "$n_test" -gt 3 ]; then
- # CI failure failed test or too many tests failed
+ if [ "$n_test" -gt 3 ]; then
+ # too many tests failed
exit 1
fi