Skip to content

Commit

Permalink
[CI] Fix TEST_FAILURE judgement (antrea-io#1474)
Browse files Browse the repository at this point in the history
* "TEST SUCCESS" should appear only when test succeeds
* test_rc can be other than 0 and 1. Such result should be considered as failure.
  • Loading branch information
lzhecheng authored Nov 3, 2020
1 parent ae45cc8 commit 2efa050
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ci/jenkins/test-vmc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,12 @@ function run_e2e {
test_rc=$?
set -e

if [ "$test_rc" == "1" ]
then
if [[ "$test_rc" != "0" ]]; then
echo "=== TEST FAILURE !!! ==="
TEST_FAILURE=true
else
echo "=== TEST SUCCESS !!! ==="
fi
echo "=== TEST SUCCESS !!! ==="

tar -zcf ${GIT_CHECKOUT_DIR}/antrea-test-logs.tar.gz ${GIT_CHECKOUT_DIR}/antrea-test-logs

Expand Down

0 comments on commit 2efa050

Please sign in to comment.