summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTriss Healy2022-09-01 22:39:43 +1000
committerTriss Healy2022-09-01 22:39:43 +1000
commitecbea0c85911f9b2df4b01e522da77091ec2fa74 (patch)
tree7949012aa5079d6f17eea64af937d9e8102bfb8d
parentd26ef83945310ff9d5575081db7016f4d9fe1e48 (diff)
downloadaur-ecbea0c85911f9b2df4b01e522da77091ec2fa74.tar.gz
Used XDG_CONFIG_* to prevent users break test.
GTK automatically reads ~/.config/gtk-4.0/settings.ini for users customizations. If those customizations contain deprecated/removed keys it creates a warning in GTK which causes the Tests to automatically fail. So we make a empty config dir and set $XDG_CONFIG_{DIR,HOME} to prevent gtk reading those files.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD11
2 files changed, 10 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3d047aacf48c..f80ea4eed590 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = libshumate-git
pkgdesc = GTK4 widget to display maps (git version)
pkgver = 1.0.0.beta.r1.g32f8d1a
- pkgrel = 1
+ pkgrel = 2
url = https://wiki.gnome.org/Projects/libshumate
arch = x86_64
license = LGPL
diff --git a/PKGBUILD b/PKGBUILD
index d6d0eed72778..7a5f55dd7e41 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_pkgname=libshumate
pkgname=${_pkgname}-git
pkgver=1.0.0.beta.r1.g32f8d1a
-pkgrel=1
+pkgrel=2
pkgdesc="GTK4 widget to display maps (git version)"
arch=(x86_64)
url="https://wiki.gnome.org/Projects/libshumate"
@@ -28,7 +28,14 @@ build() {
}
check() {
- # Run tests with headless x11 server.
+ # Make a Empty $XDG_CONFIG_DIR to prevent issues to user
+ # customization breaking tests
+ mkdir -p $srcdir/test_config_dir
+
+ # Run tests with headless x11 server.
+ env \
+ XDG_CONFIG_DIR=$srcdir/test_config_dir \
+ XDG_CONFIG_HOME=$srcdir/test_config_dir \
xvfb-run meson test -C build --print-errorlogs
}