summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2018-03-15 23:05:00 +0100
committerBenjamin Berg <bberg@redhat.com>2018-04-10 23:22:01 +0200
commit640d60855d7a9d86b28c9c80c1c2dc7d6fe2e8b6 (patch)
tree66bebb8542257fe69ab19379ee55ec8d70e1bc27 /tests
parent196daca42957e1c43dfbe2d7c0d4e63d3afa4250 (diff)
downloadgnome-settings-daemon-640d60855d7a9d86b28c9c80c1c2dc7d6fe2e8b6.tar.gz
tests: Disable buffering for most files
If the output (or input) is buffered, then the tests might not be able to read the log entries right away, causing the test to fail. Explicitly add buffering=0 to open calles where this might be relevant.
Diffstat (limited to 'tests')
-rw-r--r--tests/gsdtestcase.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gsdtestcase.py b/tests/gsdtestcase.py
index 67916330..a3515c07 100644
--- a/tests/gsdtestcase.py
+++ b/tests/gsdtestcase.py
@@ -137,7 +137,7 @@ class GSDTestCase(X11SessionTestCase):
# You can rename the log file to *.log if you want to see it on test
# case failures
- klass.monitor_log = open(os.path.join(klass.workdir, 'dbus-monitor.out'), 'wb')
+ klass.monitor_log = open(os.path.join(klass.workdir, 'dbus-monitor.out'), 'wb', buffering=0)
klass.monitor = subprocess.Popen(['dbus-monitor', '--monitor'],
stdout=klass.monitor_log,
stderr=subprocess.STDOUT)
@@ -172,7 +172,7 @@ class GSDTestCase(X11SessionTestCase):
def start_mutter(klass):
''' start mutter '''
- klass.mutter_log = open(os.path.join(klass.workdir, 'mutter.log'), 'wb')
+ klass.mutter_log = open(os.path.join(klass.workdir, 'mutter.log'), 'wb', buffering=0)
# See https://gitlab.gnome.org/GNOME/mutter/merge_requests/15
klass.mutter = subprocess.Popen(['mutter', '--x11'],
stdout=klass.mutter_log,