Blob Blame Raw
From 3b6c09550fbf7fea7c05463f14451066c9bc6280 Mon Sep 17 00:00:00 2001
From: Martin Lambers <marlam@marlam.de>
Date: Thu, 11 Feb 2016 21:11:28 +0100
Subject: gta gui: execute test only with non-empty $DISPLAY

---
 gtatool/tests/gta-gui.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gtatool/tests/gta-gui.sh b/gtatool/tests/gta-gui.sh
index 96b2aa3..0bf7d99 100755
--- a/gtatool/tests/gta-gui.sh
+++ b/gtatool/tests/gta-gui.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 
-# Copyright (C) 2012
+# Copyright (C) 2012, 2016
 # Martin Lambers <marlam@marlam.de>
 #
 # Copying and distribution of this file, with or without modification, are
@@ -9,8 +9,8 @@
 
 set -e
 
-TMPD="`mktemp -d tmp-\`basename $0 .sh\`.XXXXXX`"
-
-$GTA gui --help 2> "$TMPD"/gta-gui-help.txt
-
-rm -r "$TMPD"
+if [ -n "$DISPLAY" ]; then
+    TMPD="`mktemp -d tmp-\`basename $0 .sh\`.XXXXXX`"
+    $GTA gui --help 2> "$TMPD"/gta-gui-help.txt
+    rm -r "$TMPD"
+fi
-- 
cgit v1.0-41-gc330