Skip to content

Commit 72900be

Browse files
committed
testing with wrong sha to ensure it is failing
1 parent 973506e commit 72900be

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

backends/qualcomm/scripts/install_qnn_sdk.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,17 @@ install_hexagon_sdk() {
135135

136136
HEXAGON_ZIP_FILE="Hexagon_SDK_Linux.zip"
137137
# Match install_qnn's retry shape: --fail rejects HTTP errors,
138-
# --retry-all-errors retries transport failures, and `unzip -t`
139-
# validates the archive before we proceed.
138+
# --retry-all-errors retries transport failures, `unzip -t` validates the
139+
# archive, and the SHA-256 check pins the exact bytes we tested against. All
140+
# are inside the retry condition so a truncated or wrong-content download is
141+
# re-fetched rather than killing the job.
140142
HEXAGON_DOWNLOAD_MAX_ATTEMPTS=5
141143
for attempt in $(seq 1 ${HEXAGON_DOWNLOAD_MAX_ATTEMPTS}); do
142144
rm -f "/tmp/${HEXAGON_ZIP_FILE}"
143145
if curl --fail --retry 3 --retry-delay 5 --retry-connrefused --retry-all-errors \
144146
-Lo "/tmp/${HEXAGON_ZIP_FILE}" "${HEXAGON_SDK_ZIP_URL}" \
145-
&& unzip -tq "/tmp/${HEXAGON_ZIP_FILE}"; then
147+
&& unzip -tq "/tmp/${HEXAGON_ZIP_FILE}" \
148+
&& echo "${HEXAGON_SDK_ZIP_SHA256} /tmp/${HEXAGON_ZIP_FILE}" | sha256sum -c -; then
146149
break
147150
fi
148151
ls -l "/tmp/${HEXAGON_ZIP_FILE}" 2>&1 || true

backends/qualcomm/scripts/qnn_config.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ QNN_ZIP_URL="https://softwarecenter.qualcomm.com/api/download/software/sdks/Qual
1414
HEXAGON_SDK_VERSION="6.5.0.0"
1515
HEXAGON_TOOLS_VERSION="19.0.07"
1616
HEXAGON_SDK_ZIP_URL="https://apigwx-aws.qualcomm.com/qsc/public/v1/api/download/software/sdks/Hexagon_SDK/Linux/Debian/${HEXAGON_SDK_VERSION}/Hexagon_SDK_Linux.zip"
17+
# SHA-256 of the downloaded zip. Recompute and update when HEXAGON_SDK_VERSION changes. Command to gen followin sha: sha256sum Hexagon_SDK_Linux.zip
18+
HEXAGON_SDK_ZIP_SHA256="668626f75c38ce1ca993768953db9bf4b632753c3e32ed8363a8287e3aaffc9b"

0 commit comments

Comments
 (0)