[gnome-settings-daemon] tests: Fix for new non-SUID Xorg binary in Fedora
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] tests: Fix for new non-SUID Xorg binary in Fedora
- Date: Thu, 17 Jul 2014 14:21:14 +0000 (UTC)
commit 78014b8f30c8114892726b447d30c181f6b5a6bd
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jul 17 16:18:55 2014 +0200
tests: Fix for new non-SUID Xorg binary in Fedora
tests/gsdtestcase.py | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/tests/gsdtestcase.py b/tests/gsdtestcase.py
index 8fb84f4..675ac25 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]