@@ -7,6 +7,12 @@ include /usr/share/dpkg/default.mk
7#export DH_VERBOSE=1
7#export DH_VERBOSE=1
8export DPKG_GENSYMBOLS_CHECK_LEVEL=4
8export DPKG_GENSYMBOLS_CHECK_LEVEL=4
9export NO_PNG_PKG_MANGLE=1
9export NO_PNG_PKG_MANGLE=1
12+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
14+# Skip tests on the archs they are known to be flaky with current configuration
15+testskip_architectures := powerpc ppc64el s390x
12 dh $@ --parallel --fail-missing --with python3
18 dh $@ --parallel --fail-missing --with python3
@@ -24,7 +30,13 @@ override_dh_auto_test:
24 # Run the entire test battery
30 # Run the entire test battery
25 # Parallel tests have a risk of starting xvfb on the same DISPLAY multiple times,
31 # Parallel tests have a risk of starting xvfb on the same DISPLAY multiple times,
26 # causing the whole battery to fail.
32 # causing the whole battery to fail.
33+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
34+ifneq (,$(filter $(DEB_HOST_ARCH),$(testskip_architectures)))
27− dh_auto_test --no-parallel -- -O -k xvfballtests || true
35+ -dh_auto_test --no-parallel -- -O -k xvfballtests
37+ dh_auto_test --no-parallel -- -O -k xvfballtests
29override_dh_install:
41override_dh_install:
30 # install autopilot tests
42 # install autopilot tests