Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 8b40371

Browse files
fix travis CI error report when build fails
The code eval $build_cmd will return the status of make in ${?}. That needs to be saved and preserved immediately following eval $build_cmd and then returned before gcc_check_happy completes at }. Otherwise, each of the cp and echo lines will overwrite ${?}. Since echo will always succeed, gcc_check_happy will always succeed, and Travis CI will always believe such matrix targets have succeeded, even when they do not.
1 parent 5568287 commit 8b40371

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.travis/script.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ gcc_check_happy()
5151

5252
mkdir -p $TRAVIS_BUILD_DIR/happy-test-logs/$1/from-tmp
5353
eval $build_cmd
54+
make_status=${?}
5455
cp $TRAVIS_BUILD_DIR/build/$build_folder/src/test-apps/happy $TRAVIS_BUILD_DIR/happy-test-logs/$1 -rf
5556
cp /tmp/happy* $TRAVIS_BUILD_DIR/happy-test-logs/$1/from-tmp
5657
echo "please check happy-test-log/<UTC time> under link: https://storage.cloud.google.com/openweave"
58+
return ${make_status}
5759
}
5860

5961
case "${BUILD_TARGET}" in
@@ -113,3 +115,4 @@ case "${BUILD_TARGET}" in
113115
;;
114116

115117
esac
118+

0 commit comments

Comments
 (0)