Sync openwrt

This commit is contained in:
Mattraks 2020-09-26 09:18:35 +08:00
parent e3f6de9282
commit 86d9bf5215
No known key found for this signature in database
GPG Key ID: 489BAEEB1DFE2782

View File

@ -5,8 +5,8 @@
set -e
SDK_HOME="$HOME/sdk"
SDK_PATH=https://downloads.lede-project.org/snapshots/targets/ar71xx/generic/
SDK=-sdk-ar71xx-generic_
SDK_PATH=https://downloads.openwrt.org/snapshots/targets/mpc85xx/p2020/
SDK=-sdk-mpc85xx-p2020_
PACKAGES_DIR="$PWD"
echo_red() { printf "\033[1;31m$*\033[m\n"; }
@ -136,7 +136,10 @@ EOF
echo_blue "=== $pkg_name: Starting quick tests"
exec_status '^ERROR' make "package/$pkg_name/download" V=s || RET=1
exec_status '^ERROR' make "package/$pkg_name/check" V=s || RET=1
badhash_msg_regex="HASH does not match "
badhash_msg_regex="$badhash_msg_regex|HASH uses deprecated hash,"
badhash_msg_regex="$badhash_msg_regex|HASH is missing,"
exec_status '^ERROR'"|$badhash_msg_regex" make "package/$pkg_name/check" V=s || RET=1
echo_blue "=== $pkg_name: quick tests done"
done
@ -184,26 +187,17 @@ test_commits() {
author="$(git show -s --format=%aN $commit)"
if echo $author | grep -q '\S\+\s\+\S\+'; then
echo_green "Author name ($author) seems ok"
else
echo_red "Author name ($author) need to be your real name 'firstname lastname'"
RET=1
fi
subject="$(git show -s --format=%s $commit)"
if echo "$subject" | grep -q -e '^[0-9A-Za-z,/_-]\+: ' -e '^Revert '; then
echo_green "Commit subject line seems ok ($subject)"
else
echo_red "Commit subject line MUST start with '<package name>: ' ($subject)"
RET=1
fi
body="$(git show -s --format=%b $commit)"
sob="$(git show -s --format='Signed-off-by: %aN <%aE>' $commit)"
if echo "$body" | grep -qF "$sob"; then
echo_green "Signed-off-by match author"
else
echo_red "Signed-off-by is missing or doesn't match author (should be '$sob')"
RET=1
fi
done
@ -231,7 +225,6 @@ fi
if [ $# -ne 1 ] ; then
cat <<EOF
Usage: $0 (download_sdk|test_packages)
download_sdk - download the SDK to $HOME/sdk.tar.xz
test_packages - do a make check on the package
EOF