[gnome-settings-daemon] tests: Simplify Xorg check
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] tests: Simplify Xorg check
- Date: Fri, 5 Jul 2013 14:59:19 +0000 (UTC)
commit 37ecf4f5840e1ac7dafe0270599b6e5bc4e56059
Author: Bastien Nocera <hadess hadess net>
Date: Fri Jul 5 16:40:12 2013 +0200
tests: Simplify Xorg check
tests/gsdtestcase.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/tests/gsdtestcase.py b/tests/gsdtestcase.py
index df2159d..23a5141 100644
--- a/tests/gsdtestcase.py
+++ b/tests/gsdtestcase.py
@@ -14,6 +14,8 @@ import shutil
import sys
from glob import glob
+from gi.repository import GLib
+
try:
import dbusmock
except ImportError:
@@ -185,9 +187,8 @@ 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
- which = subprocess.Popen(['which', 'Xorg'], stdout=subprocess.PIPE)
- out = which.communicate()[0].strip()
- if which.returncode != 0 or not out:
+ 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')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]