[gnome-settings-daemon] tests: Fix reading the Xorg log



commit d98bf0ba5fb1191d48b2571a9be6c61ce214cd44
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Mar 5 14:33:19 2018 +0100

    tests: Fix reading the Xorg log
    
    The xorg log fd position will be after the written error, so re-open the
    log to read, and check for the expected error.

 tests/gsdtestcase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/gsdtestcase.py b/tests/gsdtestcase.py
index 5c8d7350..389c53d7 100644
--- a/tests/gsdtestcase.py
+++ b/tests/gsdtestcase.py
@@ -208,7 +208,7 @@ class GSDTestCase(dbusmock.DBusTestCase):
             if klass.xorg.poll():
                 # ended prematurely
                 try:
-                    log = xorg_log_write.read()
+                    log = open(xorg_log_write.name).read()
                 except IOError:
                     return -1
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]