From 7124a42d34cefd4687926808b8811c603ac6644d Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 25 Mar 2022 16:55:38 +0100 Subject: [PATCH] tests: Bump timeout when running under valgrind --- tests/integration-test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration-test.py b/tests/integration-test.py index b03e6b9..4adeb86 100755 --- a/tests/integration-test.py +++ b/tests/integration-test.py @@ -154,12 +154,14 @@ class Tests(dbusmock.DBusTestCase): # have to do that ourselves env['UMOCKDEV_DIR'] = self.testbed.get_root_dir() self.log = tempfile.NamedTemporaryFile() + timeout_multiplier = 1 if wrapper: daemon_path = wrapper + [ self.daemon_path ] else: daemon_path = [ self.daemon_path ] if os.getenv('VALGRIND') != None: daemon_path = ['valgrind'] + daemon_path + ['-v'] + timeout_multiplier = 10 else: daemon_path = daemon_path + ['-v'] @@ -168,7 +170,7 @@ class Tests(dbusmock.DBusTestCase): stderr=subprocess.STDOUT) # wait until the daemon gets online - timeout = 100 + timeout = 100 * timeout_multiplier while timeout > 0: time.sleep(0.1) timeout -= 1