mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-11 08:07:16 +00:00
build-sys: check for spicy-screenshot
This commit is contained in:
parent
a434543eb1
commit
004744fd2f
@ -140,7 +140,7 @@ AS_IF([test x"$enable_client" != "xno"], [enable_client="yes"])
|
||||
AM_CONDITIONAL(SUPPORT_CLIENT, test "x$enable_client" = "xyes")
|
||||
|
||||
AC_ARG_ENABLE(automated_tests,
|
||||
[ --enable-automated-tests Enable automated tests using snappy (part of spice--gtk)],,
|
||||
[ --enable-automated-tests Enable automated tests using spicy-screenshot (part of spice--gtk)],,
|
||||
[enable_automated_tests="no"])
|
||||
AS_IF([test x"$enable_automated_tests" != "xno"], [enable_automated_tests="yes"])
|
||||
AM_CONDITIONAL(SUPPORT_AUTOMATED_TESTS, test "x$enable_automated_tests" != "xno")
|
||||
@ -399,11 +399,11 @@ AC_SUBST([SASL_CFLAGS])
|
||||
AC_SUBST([SASL_LIBS])
|
||||
|
||||
if test "x$enable_automated_tests" = "xyes"; then
|
||||
AC_MSG_CHECKING([for snappy/spicy-screenshot])
|
||||
snappy --help >/dev/null 2>&1 || spicy-screenshot --help >/dev/null 2>&1
|
||||
AC_MSG_CHECKING([for spicy-screenshot])
|
||||
spicy-screenshot --help >/dev/null 2>&1
|
||||
if test $? -ne 0 ; then
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_ERROR([snappy/spicy-screenshot was not found, this module is part of spice-gtk and is required to compile this package])
|
||||
AC_MSG_ERROR([spicy-screenshot was not found, this module is part of spice-gtk and is required to compile this package])
|
||||
fi
|
||||
AC_MSG_RESULT([found])
|
||||
fi
|
||||
|
||||
@ -4,8 +4,8 @@ import Image
|
||||
import ImageChops
|
||||
|
||||
|
||||
def snappy():
|
||||
cmd = "snappy -h localhost -p 5912 -o output.ppm"
|
||||
def spicy_screenshot():
|
||||
cmd = "spicy-screenshot -h localhost -p 5912 -o output.ppm"
|
||||
p = Popen(cmd, shell=True)
|
||||
p.wait()
|
||||
|
||||
@ -15,7 +15,7 @@ def verify():
|
||||
return ImageChops.difference(base, output).getbbox()
|
||||
|
||||
if __name__ == "__main__":
|
||||
snappy()
|
||||
spicy_screenshot()
|
||||
diff = verify()
|
||||
|
||||
if diff is None:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user