Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,4 @@ jobs:
run: |
bash ./tests/ci/build_boards.sh
bash ./tests/ci/eboot_test.sh
bash ./tests/ci/pkgrefs_test.sh
Empty file modified tests/ci/eboot_test.sh
100644 → 100755
Empty file.
24 changes: 24 additions & 0 deletions tests/ci/pkgrefs_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -ev

fail=0
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
url=$(echo $i | sed 's/@/ /' | cut -f2 -d\" | cut -f1 -d' ')
sha=$(echo $i | sed 's/@/ /' | cut -f2 -d\" | cut -f2 -d' ' | cut -f2 -d:)
echo "INFO: Checking $url"
rm -f file.bin
wget --quiet -O file.bin $url
calc=$(sha256sum file.bin | cut -f1 -d" ")
if [ "$sha" != "$calc" ]; then
echo "ERROR: Download failed or SHA mismatch for $url"
echo "ERROR: Expected $sha"
echo "ERROR: Received $calc"
fail=1
fi
done

if [ $fail -ne 0 ]; then
echo ERROR: Package file integrity check failed
exit 1
fi