[Spice-commits] test-png
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 28 17:17:16 UTC 2020
test-png | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
New commits:
commit 721cd5a1ef60e1045a3822a5cbe384f3113866f2
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Sat Dec 14 18:38:08 2019 +0000
ci: Use magick.exe executable under Windows
On Windows beside the various single executables like Linux there's
a single "magick" executable you can use specifying what you want
to do.
Having a single executable avoids the trick to fix "convert" problem
and is easier to port, you just have to copy the single executable.
Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>
diff --git a/test-png b/test-png
index b0fe1d2..8e4bdd9 100755
--- a/test-png
+++ b/test-png
@@ -19,16 +19,14 @@ verbose() {
# under Windows we don't need to run test under Wine
WINE=wine
+MAGICK=
if [ "x`uname -s`" != xLinux ]; then
WINE=
+ if command -V magick.exe &> /dev/null; then
+ MAGICK=magick.exe
+ fi
fi
-# this fixes search under Windows which often detect convert utility
-# under system directory, look for the one in the same directory as
-# mogrify
-CONVERT="$(command -v mogrify)"
-CONVERT="${CONVERT//mogrify/convert}"
-
# MSVC build put executables under <Configuration> directory
IMAGETEST=imagetest.exe
if [ -e ./Release/imagetest.exe ]; then
@@ -36,7 +34,7 @@ if [ -e ./Release/imagetest.exe ]; then
fi
compare_images() {
- DIFF=$(compare -metric AE $1 $2 - 2>&1 > /dev/null || true)
+ DIFF=$($MAGICK compare -metric AE $1 $2 - 2>&1 > /dev/null || true)
if [ "$DIFF" != "0" ]; then
error "Images $1 and $2 are too different, diff $DIFF"
fi
@@ -44,11 +42,11 @@ compare_images() {
do_test() {
echo "Running image $IMAGE with '$*'..."
- $CONVERT $IMAGE "$@" $IN
+ $MAGICK convert $IMAGE "$@" $IN
$WINE $IMAGETEST $IN $OUT_BMP $OUT
verbose ls -lh $IN
- verbose identify $IN
- verbose identify $OUT_BMP
+ verbose $MAGICK identify $IN
+ verbose $MAGICK identify $OUT_BMP
compare_images $IN $OUT
compare_images $IN $OUT_BMP
rm -f $IN $OUT $OUT_BMP
More information about the Spice-commits
mailing list