From 78014b8f30c8114892726b447d30c181f6b5a6bd Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 17 Jul 2014 16:18:55 +0200 Subject: tests: Fix for new non-SUID Xorg binary in Fedora --- tests/gsdtestcase.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'tests') 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 -- cgit v1.2.1