SDK_HOME="$HOME/sdk"
SDK_PATH=https://downloads.lede-project.org/snapshots/targets/ar71xx/generic/
-SDK=lede-sdk-ar71xx-generic_gcc-5.5.0_musl.Linux-x86_64
+SDK=openwrt-sdk-ar71xx-generic_gcc-5.5.0_musl.Linux-x86_64
PACKAGES_DIR="$PWD"
echo_red() { printf "\033[1;31m$*\033[m\n"; }
# test_package call make download check for very new/modified package
test_packages2() {
local commit_range=$TRAVIS_COMMIT_RANGE
- if [ "$TRAVIS_PULL_REQUEST" = false ]; then
+ if [ -z "$TRAVIS_PULL_REQUEST_SHA" ]; then
echo_blue "Using only the latest commit, since we're not in a Pull Request"
commit_range=HEAD~1
fi
pkg_name=$(echo "$pkg_dir" | awk -F/ '{ print $NF }')
echo_blue "=== $pkg_name: Starting quick tests"
- exec_status 'WARNING|ERROR' make "package/$pkg_name/download" V=s || RET=1
- exec_status 'WARNING|ERROR' make "package/$pkg_name/check" V=s || RET=1
+ exec_status '^ERROR' make "package/$pkg_name/download" V=s || RET=1
+ exec_status '^ERROR' make "package/$pkg_name/check" V=s || RET=1
echo_blue "=== $pkg_name: quick tests done"
done
test_commits() {
RET=0
- if [ "$TRAVIS_PULL_REQUEST" = false ]; then
+ if [ -z "$TRAVIS_PULL_REQUEST_SHA" ]; then
echo_blue "Skipping commits tests (not in a Pull Request)"
return 0
fi
env
echo_blue "=== Travis ENV"
-if [ -z "$TRAVIS_COMMIT_RANGE" ] && [ "$TRAVIS_PULL_REQUEST" = true ] ; then
- echo_red "TRAVIS_COMMIT_RANGE variable is empty in a Pull Request"
- exit 1
-fi
-
-if [ "$TRAVIS_PULL_REQUEST" = true ]; then
+if [ -n "$TRAVIS_PULL_REQUEST_SHA" ]; then
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