[neon/backports-focal/xdg-desktop-portal/Neon/unstable] tests: tests: Only run xdg-document-portal in foreground when uninstalled

Simon McVittie null at kde.org
Wed Jan 13 06:32:43 GMT 2021


Git commit 7c93ead1bcaa75420f39c074d664ce3414ddc990 by Simon McVittie.
Committed on 09/09/2020 at 12:01.
Pushed by ash into branch 'Neon/unstable'.

tests: Only run xdg-document-portal in foreground when uninstalled

During build-time testing, we need to take special steps to run the
just-built version of the portal. However, during "as-installed"
testing we want to assert that it was installed correctly, and in
particular that D-Bus .service file was installed correctly to make it
activatable.

Signed-off-by: Simon McVittie <smcv at debian.org>

M  +5    -1    tests/test-document-fuse.sh

https://invent.kde.org/neon/backports-focal/xdg-desktop-portal/commit/7c93ead1bcaa75420f39c074d664ce3414ddc990

diff --git a/tests/test-document-fuse.sh b/tests/test-document-fuse.sh
index 7868c91..da0aa47 100755
--- a/tests/test-document-fuse.sh
+++ b/tests/test-document-fuse.sh
@@ -68,7 +68,11 @@ fi
 
 # Run portal manually so that we get any segfault our assert output
 # Add -v here to get debug output from fuse
-./xdg-document-portal -r &
+# Only do this when running uninstalled; when running as an installed-test,
+# we rely on D-Bus activation.
+if [ -n "${XDP_UNINSTALLED:-}" ]; then
+    ./xdg-document-portal -r &
+fi
 
 # First run a basic single-thread test
 echo Testing single-threaded



More information about the Neon-commits mailing list