summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2022-05-09 21:03:49 +0200
committerBenjamin Berg <bberg@redhat.com>2022-05-10 11:06:18 +0200
commitb9bf4754599d481cfbee9e6dfe8997e2cd99fe2a (patch)
treeeff7a0c4b82d08a4583d07804fab7544c114670b
parent7f846bcee60952fc5b5257ef88482769119e09b1 (diff)
linux: Enable fatal-warnings for most tests
-rwxr-xr-xsrc/linux/integration-test.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/linux/integration-test.py b/src/linux/integration-test.py
index cdf0454..8ed2a7b 100755
--- a/src/linux/integration-test.py
+++ b/src/linux/integration-test.py
@@ -179,7 +179,7 @@ class Tests(dbusmock.DBusTestCase):
# Daemon control and D-BUS I/O
#
- def start_daemon(self, cfgfile=None):
+ def start_daemon(self, cfgfile=None, warns=False):
'''Start daemon and create DBus proxy.
Do this after adding the devices you want to test with. At the moment
@@ -195,7 +195,7 @@ class Tests(dbusmock.DBusTestCase):
env['UPOWER_CONF_FILE_NAME'] = cfgfile
env['UPOWER_HISTORY_DIR'] = tempfile.mkdtemp(prefix='upower-history-')
self.addCleanup(shutil.rmtree, env['UPOWER_HISTORY_DIR'])
- env['G_DEBUG'] = 'fatal-criticals'
+ env['G_DEBUG'] = 'fatal-criticals' if warns else 'fatal-warnings'
# note: Python doesn't propagate the setenv from Testbed.new(), so we
# have to do that ourselves
env['UMOCKDEV_DIR'] = self.testbed.get_root_dir()
@@ -765,7 +765,7 @@ class Tests(dbusmock.DBusTestCase):
'capacity', '110',
'voltage_now', '12000000'], [])
- self.start_daemon()
+ self.start_daemon(warns=True)
devs = self.proxy.EnumerateDevices()
self.assertEqual(len(devs), 1)
bat0_up = devs[0]
@@ -1233,7 +1233,7 @@ class Tests(dbusmock.DBusTestCase):
mb = self._add_bt_mouse()
- self.start_daemon()
+ self.start_daemon(warns=True)
devs_before = self.proxy.EnumerateDevices()
self.assertEqual(len(devs_before), 1)