summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2014-07-17 16:18:55 +0200
committerBastien Nocera <hadess@hadess.net>2014-07-17 16:18:55 +0200
commit78014b8f30c8114892726b447d30c181f6b5a6bd (patch)
tree8d417ea052f6422261ac16b5412142e7ac365b0a /tests
parent84315ec620be6615cada80cb197c2891663068e0 (diff)
downloadgnome-settings-daemon-78014b8f30c8114892726b447d30c181f6b5a6bd.tar.gz
tests: Fix for new non-SUID Xorg binary in Fedora
Diffstat (limited to 'tests')
-rw-r--r--tests/gsdtestcase.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/gsdtestcase.py b/tests/gsdtestcase.py
index 8fb84f40..675ac25f 100644
--- a/tests/gsdtestcase.py
+++ b/tests/gsdtestcase.py
@@ -207,12 +207,15 @@ class GSDTestCase(dbusmock.DBusTestCase):
# some distros like Fedora install Xorg as suid root; copy it into our
# workdir to drop the suid bit and run it as user
- out = GLib.find_program_in_path ('Xorg')
- if not out:
- sys.stderr.write('ERROR: Xorg not installed\n')
- sys.exit(1)
- xorg = os.path.join(klass.workdir, 'Xorg')
- shutil.copy(out, xorg)
+ if GLib.file_test('/usr/libexec/Xorg.bin', GLib.FileTest.IS_EXECUTABLE):
+ xorg = '/usr/libexec/Xorg.bin'
+ else:
+ out = GLib.find_program_in_path ('Xorg')
+ if not out:
+ sys.stderr.write('ERROR: Xorg not installed\n')
+ sys.exit(1)
+ xorg = os.path.join(klass.workdir, 'Xorg')
+ shutil.copy(out, xorg)
display_num = 99