diff options
author | Phil Wise <philip.wise@here.com> | 2018-04-27 12:26:58 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2018-04-30 11:58:31 +0200 |
commit | 8e77dc5a9adacbca5a4b6e80534972370c000bfa (patch) | |
tree | 4638d4473c1bdfbabef719505ec2d90fbfccd36e /lib/oeqa/selftest | |
parent | 3a012ec1d5d7f970c52022b7da5751449693640d (diff) | |
download | meta-updater-8e77dc5a9adacbca5a4b6e80534972370c000bfa.tar.gz |
Add missing delay in loop.
Diffstat (limited to 'lib/oeqa/selftest')
-rw-r--r-- | lib/oeqa/selftest/cases/updater.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index e459ffb..2ef5a3b 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py | |||
@@ -174,12 +174,12 @@ class AutoProvTests(OESelftestTestCase): | |||
174 | print(value) | 174 | print(value) |
175 | print('Checking output of aktualizr-info:') | 175 | print('Checking output of aktualizr-info:') |
176 | ran_ok = False | 176 | ran_ok = False |
177 | for delay in [0, 1, 2, 5, 10, 15]: | 177 | for delay in [1, 2, 5, 10, 15]: |
178 | sleep(delay) | ||
179 | stdout, stderr, retcode = self.qemu_command('aktualizr-info') | 178 | stdout, stderr, retcode = self.qemu_command('aktualizr-info') |
180 | if retcode == 0 and stderr == b'': | 179 | if retcode == 0 and stderr == b'': |
181 | ran_ok = True | 180 | ran_ok = True |
182 | break | 181 | break |
182 | sleep(delay) | ||
183 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) | 183 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) |
184 | 184 | ||
185 | verifyProvisioned(self, machine) | 185 | verifyProvisioned(self, machine) |
@@ -312,12 +312,12 @@ class GrubTests(OESelftestTestCase): | |||
312 | print(value) | 312 | print(value) |
313 | print('Checking output of aktualizr-info:') | 313 | print('Checking output of aktualizr-info:') |
314 | ran_ok = False | 314 | ran_ok = False |
315 | for delay in [0, 1, 2, 5, 10, 15]: | 315 | for delay in [1, 2, 5, 10, 15]: |
316 | sleep(delay) | ||
317 | stdout, stderr, retcode = self.qemu_command('aktualizr-info') | 316 | stdout, stderr, retcode = self.qemu_command('aktualizr-info') |
318 | if retcode == 0 and stderr == b'': | 317 | if retcode == 0 and stderr == b'': |
319 | ran_ok = True | 318 | ran_ok = True |
320 | break | 319 | break |
320 | sleep(delay) | ||
321 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) | 321 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) |
322 | 322 | ||
323 | verifyProvisioned(self, machine) | 323 | verifyProvisioned(self, machine) |
@@ -364,11 +364,12 @@ class ImplProvTests(OESelftestTestCase): | |||
364 | print(value) | 364 | print(value) |
365 | print('Checking output of aktualizr-info:') | 365 | print('Checking output of aktualizr-info:') |
366 | ran_ok = False | 366 | ran_ok = False |
367 | for delay in [0, 1, 2, 5, 10, 15]: | 367 | for delay in [1, 2, 5, 10, 15]: |
368 | stdout, stderr, retcode = self.qemu_command('aktualizr-info') | 368 | stdout, stderr, retcode = self.qemu_command('aktualizr-info') |
369 | if retcode == 0 and stderr == b'': | 369 | if retcode == 0 and stderr == b'': |
370 | ran_ok = True | 370 | ran_ok = True |
371 | break | 371 | break |
372 | sleep(delay) | ||
372 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) | 373 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) |
373 | # Verify that device has NOT yet provisioned. | 374 | # Verify that device has NOT yet provisioned. |
374 | self.assertIn(b'Couldn\'t load device ID', stdout, | 375 | self.assertIn(b'Couldn\'t load device ID', stdout, |
@@ -435,11 +436,12 @@ class HsmTests(OESelftestTestCase): | |||
435 | print(value) | 436 | print(value) |
436 | print('Checking output of aktualizr-info:') | 437 | print('Checking output of aktualizr-info:') |
437 | ran_ok = False | 438 | ran_ok = False |
438 | for delay in [0, 1, 2, 5, 10, 15]: | 439 | for delay in [1, 2, 5, 10, 15]: |
439 | stdout, stderr, retcode = self.qemu_command('aktualizr-info') | 440 | stdout, stderr, retcode = self.qemu_command('aktualizr-info') |
440 | if retcode == 0 and stderr == b'': | 441 | if retcode == 0 and stderr == b'': |
441 | ran_ok = True | 442 | ran_ok = True |
442 | break | 443 | break |
444 | sleep(delay) | ||
443 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) | 445 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) |
444 | # Verify that device has NOT yet provisioned. | 446 | # Verify that device has NOT yet provisioned. |
445 | self.assertIn(b'Couldn\'t load device ID', stdout, | 447 | self.assertIn(b'Couldn\'t load device ID', stdout, |