mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-09 04:13:33 +02:00
tests: Double the timeouts when testing with address sanitizer
This commit is contained in:
committed by
Bastien Nocera
parent
d72c802415
commit
714f499ab6
@ -51,6 +51,11 @@ def get_timeout(topic='default'):
|
|||||||
'default': 20,
|
'default': 20,
|
||||||
'daemon_start': 60
|
'daemon_start': 60
|
||||||
},
|
},
|
||||||
|
'asan': {
|
||||||
|
'test': 120,
|
||||||
|
'default': 6,
|
||||||
|
'daemon_start': 10
|
||||||
|
},
|
||||||
'default': {
|
'default': {
|
||||||
'test': 60,
|
'test': 60,
|
||||||
'default': 3,
|
'default': 3,
|
||||||
@ -58,8 +63,13 @@ def get_timeout(topic='default'):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
valgrind = os.getenv('VALGRIND')
|
if os.getenv('VALGRIND') is not None:
|
||||||
lut = vals['valgrind' if valgrind is not None else 'default']
|
lut = vals['valgrind']
|
||||||
|
elif os.getenv('ADDRESS_SANITIZER') is not None:
|
||||||
|
lut = vals['asan']
|
||||||
|
else:
|
||||||
|
lut = vals['default']
|
||||||
|
|
||||||
if topic not in lut:
|
if topic not in lut:
|
||||||
raise ValueError('invalid topic')
|
raise ValueError('invalid topic')
|
||||||
return lut[topic]
|
return lut[topic]
|
||||||
|
|||||||
@ -57,6 +57,9 @@ class TestFprintd(dbusmock.DBusTestCase):
|
|||||||
if os.path.exists(valgrind):
|
if os.path.exists(valgrind):
|
||||||
klass.wrapper_args += ['--suppressions={}'.format(valgrind)]
|
klass.wrapper_args += ['--suppressions={}'.format(valgrind)]
|
||||||
|
|
||||||
|
if 'ADDRESS_SANITIZER' in os.environ:
|
||||||
|
klass.sleep_time *= 2
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
(self.p_mock, self.obj_fprintd_manager) = self.spawn_server_template(
|
(self.p_mock, self.obj_fprintd_manager) = self.spawn_server_template(
|
||||||
self.template_name, {}, stdout=subprocess.PIPE)
|
self.template_name, {}, stdout=subprocess.PIPE)
|
||||||
|
|||||||
Reference in New Issue
Block a user