X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=.travis_do.sh;h=b70113113db4a1198cec95c5c0afd2ef8bb06b25;hb=a5b23eff1c81592cf82e6de7f7a9711f323e7c21;hp=719c29ea0fef9c51dc3f4836f0487edc5c932844;hpb=45b88fc5d73f554f4becbddc73002edfdbc432cb;p=feed%2Fpackages.git diff --git a/.travis_do.sh b/.travis_do.sh index 719c29ea0f..b70113113d 100755 --- a/.travis_do.sh +++ b/.travis_do.sh @@ -16,8 +16,10 @@ echo_blue() { printf "\033[1;34m$*\033[m\n"; } exec_status() { PATTERN="$1" shift + while :;do sleep 590;echo "still running (please don't kill me Travis)";done & ("$@" 2>&1) | tee logoutput R=${PIPESTATUS[0]} + kill $! && wait $! 2>/dev/null if [ $R -ne 0 ]; then echo_red "=> '$*' failed (return code $R)" return 1 @@ -87,6 +89,9 @@ src-link packages $PACKAGES_DIR src-git luci https://github.com/openwrt/luci.git EOF + # enable BUILD_LOG + sed -i '1s/^/config BUILD_LOG\n\tbool\n\tdefault y\n\n/' Config-build.in + ./scripts/feeds update -a ./scripts/feeds install -a make defconfig @@ -111,12 +116,25 @@ EOF pkg_name=$(echo "$pkg_dir" | awk -F/ '{ print $NF }') echo_blue "=== $pkg_name: Starting compile test" - exec_status '^ERROR' make "package/$pkg_name/compile" V=s -j3 + # we can't enable verbose built else we often hit Travis limits + # on log size and the job get killed + exec_status '^ERROR' make "package/$pkg_name/compile" -j3 || RET=1 echo_blue "=== $pkg_name: compile test done" + + echo_blue "=== $pkg_name: begin compile logs" + for f in $(find logs/package/feeds/packages/$pkg_name/ -type f); do + echo_blue "Printing $f" + cat "$f" + done + echo_blue "=== $pkg_name: end compile logs" + + echo_blue "=== $pkg_name: begin packages sizes" + du -ba bin/ + echo_blue "=== $pkg_name: end packages sizes" done - return 0 + return $RET } test_commits() { @@ -165,8 +183,10 @@ echo_blue "=== Travis ENV" env echo_blue "=== Travis ENV" -until [ "$(git rev-list ${TRAVIS_COMMIT_RANGE/.../..} | tail -n1)" != "a22de9b74cf9579d1ce7e6cf1845b4afa4277b00" ]; do - # if clone depth is too small, git rev-list / diff return incorrect results +while true; do + # if clone depth is too small, git rev-list / diff return incorrect or empty results + C="$(git rev-list ${TRAVIS_COMMIT_RANGE/.../..} | tail -n1)" 2>/dev/null + [ -n "$C" -a "$C" != "a22de9b74cf9579d1ce7e6cf1845b4afa4277b00" ] && break echo_blue "Fetching 50 commits more" git fetch origin --deepen=50 done