Skip to content

Commit

Permalink
add conversion tests
Browse files Browse the repository at this point in the history
  • Loading branch information
demoray committed Nov 11, 2019
1 parent e783459 commit 7829e73
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/release.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -ex
rustup update
cargo update
cargo test --target x86_64-unknown-linux-musl --release
cargo build --target x86_64-unknown-linux-musl --release --locked
cargo build --target x86_64-unknown-linux-musl --release --locked --no-default-features
cp target/x86_64-unknown-linux-musl/release/avml target/x86_64-unknown-linux-musl/release/avml-minimal
cargo build --target x86_64-unknown-linux-musl --release --locked
./test/run.sh
cargo package
cargo package --locked
2 changes: 2 additions & 0 deletions test/run.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ quiet az storage container create --account-name ${STORAGE} --name ${CONTAINER}
quiet az storage container set-permission --account-name ${STORAGE} -n ${CONTAINER} --public-access blob
quiet az storage blob upload --account-name ${STORAGE} --container ${CONTAINER} --name ${DST_PATH} --file ${FILE}
xargs -P 20 -a ${IMAGES_TXT} -I test-image-name test/test-azure-image.sh ${URL} test-image-name

test/test-conversion.sh
Empty file modified test/test-azure-image.sh
100644 → 100755
Empty file.
18 changes: 18 additions & 0 deletions test/test-conversion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#

set -e

IMAGES_TXT=${1:-test/images.txt}
CONVERT=${2:-target/x86_64-unknown-linux-musl/release/avml-convert}

for SKU in $(cat ${IMAGES_TXT}); do
${CONVERT} ${SKU}.lime ${SKU}.uncompressed.lime
${CONVERT} --compress ${SKU}.uncompressed.lime ${SKU}.recompressed.lime
${CONVERT} --compress ${SKU}.lime ${SKU}.compressed.lime
diff -q ${SKU}.lime ${SKU}.compressed.lime
diff -q ${SKU}.lime ${SKU}.recompressed.lime
done

0 comments on commit 7829e73

Please sign in to comment.