mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-15 23:07:16 +01:00
Merge branch 'backport-1448-dbus-tests-glib-2-64' into 'glib-2-64'
Backport !1448 memory monitor test dependency fixes to glib-2-64 See merge request GNOME/glib!1471
This commit is contained in:
commit
46756977a1
@ -14,13 +14,18 @@ __license__ = 'LGPL 3+'
|
|||||||
import unittest
|
import unittest
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import dbus
|
|
||||||
import dbus.mainloop.glib
|
|
||||||
import dbusmock
|
|
||||||
import fcntl
|
import fcntl
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
import taptestrunner
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Do all non-standard imports here so we can skip the tests if any
|
||||||
|
# needed packages are not available.
|
||||||
|
import dbus
|
||||||
|
import dbus.mainloop.glib
|
||||||
|
import dbusmock
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
from gi.repository import Gio
|
from gi.repository import Gio
|
||||||
|
|
||||||
@ -96,7 +101,11 @@ class TestLowMemoryMonitor(dbusmock.DBusTestCase):
|
|||||||
self.main_context.iteration(False)
|
self.main_context.iteration(False)
|
||||||
self.assertEqual(self.last_warning, 255)
|
self.assertEqual(self.last_warning, 255)
|
||||||
|
|
||||||
|
except ImportError as e:
|
||||||
|
@unittest.skip("Cannot import %s" % e.name)
|
||||||
|
class TestLowMemoryMonitor(unittest.TestCase):
|
||||||
|
def test_low_memory_warning_signal(self):
|
||||||
|
pass
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# avoid writing to stderr
|
unittest.main(testRunner=taptestrunner.TAPTestRunner())
|
||||||
unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))
|
|
||||||
|
@ -14,13 +14,18 @@ __license__ = 'LGPL 3+'
|
|||||||
import unittest
|
import unittest
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import dbus
|
|
||||||
import dbus.mainloop.glib
|
|
||||||
import dbusmock
|
|
||||||
import fcntl
|
import fcntl
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
import taptestrunner
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Do all non-standard imports here so we can skip the tests if any
|
||||||
|
# needed packages are not available.
|
||||||
|
import dbus
|
||||||
|
import dbus.mainloop.glib
|
||||||
|
import dbusmock
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
from gi.repository import Gio
|
from gi.repository import Gio
|
||||||
|
|
||||||
@ -112,7 +117,11 @@ class TestLowMemoryMonitorPortal(dbusmock.DBusTestCase):
|
|||||||
self.main_context.iteration(False)
|
self.main_context.iteration(False)
|
||||||
self.assertEqual(self.last_warning, 255)
|
self.assertEqual(self.last_warning, 255)
|
||||||
|
|
||||||
|
except ImportError as e:
|
||||||
|
@unittest.skip("Cannot import %s" % e.name)
|
||||||
|
class TestLowMemoryMonitorPortal(unittest.TestCase):
|
||||||
|
def test_low_memory_warning_portal_signal(self):
|
||||||
|
pass
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# avoid writing to stderr
|
unittest.main(testRunner=taptestrunner.TAPTestRunner())
|
||||||
unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))
|
|
||||||
|
@ -531,8 +531,9 @@ if installed_tests_enabled
|
|||||||
cdata = configuration_data()
|
cdata = configuration_data()
|
||||||
cdata.set('installed_tests_dir', installed_tests_execdir)
|
cdata.set('installed_tests_dir', installed_tests_execdir)
|
||||||
cdata.set('program', memory_monitor_test + '.py')
|
cdata.set('program', memory_monitor_test + '.py')
|
||||||
|
cdata.set('env', '')
|
||||||
configure_file(
|
configure_file(
|
||||||
input: installed_tests_template,
|
input: installed_tests_template_tap,
|
||||||
output: memory_monitor_test + '.test',
|
output: memory_monitor_test + '.test',
|
||||||
install_dir: installed_tests_metadir,
|
install_dir: installed_tests_metadir,
|
||||||
configuration: cdata
|
configuration: cdata
|
||||||
|
Loading…
x
Reference in New Issue
Block a user