Add missing delay in loop.
@@ -174,12 +174,12 @@ class AutoProvTests(OESelftestTestCase):
print(value)
print('Checking output of aktualizr-info:')
ran_ok = False
- for delay in [0, 1, 2, 5, 10, 15]:
- sleep(delay)
+ for delay in [1, 2, 5, 10, 15]:
stdout, stderr, retcode = self.qemu_command('aktualizr-info')
if retcode == 0 and stderr == b'':
ran_ok = True
break
+ sleep(delay)
self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode())
verifyProvisioned(self, machine)
@@ -312,12 +312,12 @@ class GrubTests(OESelftestTestCase):
print(value)
print('Checking output of aktualizr-info:')
ran_ok = False
- for delay in [0, 1, 2, 5, 10, 15]:
- sleep(delay)
+ for delay in [1, 2, 5, 10, 15]:
stdout, stderr, retcode = self.qemu_command('aktualizr-info')
if retcode == 0 and stderr == b'':
ran_ok = True
break
+ sleep(delay)
self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode())
verifyProvisioned(self, machine)
@@ -364,11 +364,12 @@ class ImplProvTests(OESelftestTestCase):
print(value)
print('Checking output of aktualizr-info:')
ran_ok = False
- for delay in [0, 1, 2, 5, 10, 15]:
+ for delay in [1, 2, 5, 10, 15]:
stdout, stderr, retcode = self.qemu_command('aktualizr-info')
if retcode == 0 and stderr == b'':
ran_ok = True
break
+ sleep(delay)
self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode())
# Verify that device has NOT yet provisioned.
self.assertIn(b'Couldn\'t load device ID', stdout,
@@ -435,11 +436,12 @@ class HsmTests(OESelftestTestCase):
print(value)
print('Checking output of aktualizr-info:')
ran_ok = False
- for delay in [0, 1, 2, 5, 10, 15]:
+ for delay in [1, 2, 5, 10, 15]:
stdout, stderr, retcode = self.qemu_command('aktualizr-info')
if retcode == 0 and stderr == b'':
ran_ok = True
break
+ sleep(delay)
self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode())
# Verify that device has NOT yet provisioned.
self.assertIn(b'Couldn\'t load device ID', stdout,
