File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -268,3 +268,4 @@ jobs:
268268 run : |
269269 bash ./tests/ci/build_boards.sh
270270 bash ./tests/ci/eboot_test.sh
271+ bash ./tests/ci/pkgrefs_test.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -ev
4+
5+ fail=0
6+ for i in $( cat " $TRAVIS_BUILD_DIR /package/package_esp8266com_index.template.json" | jq ' .packages[0]."tools" | .[] | .systems[] | "\(.url) \(.checksum)"' | sort -u | sed ' s/ /@/' ) ; do
7+ url=$( echo $i | sed ' s/@/ /' | cut -f2 -d\" | cut -f1 -d' ' )
8+ sha=$( echo $i | sed ' s/@/ /' | cut -f2 -d\" | cut -f2 -d' ' | cut -f2 -d:)
9+ echo " INFO: Checking $url "
10+ rm -f file.bin
11+ wget --quiet -O file.bin $url
12+ calc=$( sha256sum file.bin | cut -f1 -d" " )
13+ if [ " $sha " != " $calc " ]; then
14+ echo " ERROR: Download failed or SHA mismatch for $url "
15+ echo " ERROR: Expected $sha "
16+ echo " ERROR: Received $calc "
17+ fail=1
18+ fi
19+ done
20+
21+ if [ $fail -ne 0 ]; then
22+ echo ERROR: Package file integrity check failed
23+ exit 1
24+ fi
You can’t perform that action at this time.
0 commit comments