From acd0a252b04618ef7154ad50ba803cc6cd7de563 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 20 Apr 2022 16:50:38 +0200 Subject: [PATCH] chore(linux): Fix failure in Debian reproducibility testing Debian reproducibility testing runs a slightly different package build that seemingly doesn't set the `DEB_BUILD_MULTIARCH` variable. This change introduces our own environment variable to detect package builds so that we can skip the ibus-keyman integration tests that require running an X server. --- linux/debian/rules | 2 ++ linux/ibus-keyman/tests/run-tests.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/linux/debian/rules b/linux/debian/rules index f32d01f500..3f99a0f2a8 100755 --- a/linux/debian/rules +++ b/linux/debian/rules @@ -7,6 +7,8 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all export PYBUILD_NAME=keyman-config export PYBUILD_INSTALL_ARGS=--install-scripts=/usr/share/keyman-config/ +export KEYMAN_PKG_BUILD=1 + # xenial needs this to be explicit export LC_ALL=C.UTF-8 diff --git a/linux/ibus-keyman/tests/run-tests.sh b/linux/ibus-keyman/tests/run-tests.sh index d56bfd6bb4..9c852734b8 100755 --- a/linux/ibus-keyman/tests/run-tests.sh +++ b/linux/ibus-keyman/tests/run-tests.sh @@ -5,7 +5,7 @@ BASEDIR=$(realpath $(dirname $0)) TESTDIR=${XDG_DATA_HOME:-$HOME/.local/share}/keyman/test_kmx PID_FILE=/tmp/ibus-keyman-test-pids -if [ -v DEB_BUILD_MULTIARCH ]; then +if [ -v KEYMAN_PKG_BUILD ]; then # During package builds we skip these tests that require to start ibus because # ibus requires to find /var/lib/dbus/machine-id or /etc/machine-id, otherwise it fails with: # "Bail out! IBUS-FATAL-WARNING: Unable to load /var/lib/dbus/machine-id: Failed to open file