diff options
-rw-r--r-- | lib/oeqa/selftest/cases/testutils.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/oeqa/selftest/cases/testutils.py b/lib/oeqa/selftest/cases/testutils.py index 38e6033..6feb4e2 100644 --- a/lib/oeqa/selftest/cases/testutils.py +++ b/lib/oeqa/selftest/cases/testutils.py | |||
@@ -121,6 +121,7 @@ def verifyNotProvisioned(testInst, machine): | |||
121 | 121 | ||
122 | def verifyProvisioned(testInst, machine): | 122 | def verifyProvisioned(testInst, machine): |
123 | # Verify that device HAS provisioned. | 123 | # Verify that device HAS provisioned. |
124 | # First loop while waiting for the device to boot. | ||
124 | ran_ok = False | 125 | ran_ok = False |
125 | for delay in [5, 5, 5, 5, 10, 10, 10, 10]: | 126 | for delay in [5, 5, 5, 5, 10, 10, 10, 10]: |
126 | stdout, stderr, retcode = testInst.qemu_command('aktualizr-info') | 127 | stdout, stderr, retcode = testInst.qemu_command('aktualizr-info') |
@@ -129,13 +130,10 @@ def verifyProvisioned(testInst, machine): | |||
129 | break | 130 | break |
130 | sleep(delay) | 131 | sleep(delay) |
131 | testInst.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) | 132 | testInst.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) |
132 | 133 | # Then wait for aktualizr to provision. | |
133 | ran_ok = False | ||
134 | if stdout.decode().find('Fetched metadata: yes') < 0: | 134 | if stdout.decode().find('Fetched metadata: yes') < 0: |
135 | stdout, stderr, retcode = testInst.qemu_command('aktualizr-info --wait-until-provisioned') | 135 | stdout, stderr, retcode = testInst.qemu_command('aktualizr-info --wait-until-provisioned') |
136 | if retcode == 0 and stderr == b'' and stdout.decode().find('Fetched metadata: yes') >= 0: | 136 | |
137 | ran_ok = True | ||
138 | testInst.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) | ||
139 | testInst.assertIn(b'Device ID: ', stdout, 'Provisioning failed: ' + stderr.decode() + stdout.decode()) | 137 | testInst.assertIn(b'Device ID: ', stdout, 'Provisioning failed: ' + stderr.decode() + stdout.decode()) |
140 | testInst.assertIn(b'Primary ecu hardware ID: ' + machine.encode(), stdout, | 138 | testInst.assertIn(b'Primary ecu hardware ID: ' + machine.encode(), stdout, |
141 | 'Provisioning failed: ' + stderr.decode() + stdout.decode()) | 139 | 'Provisioning failed: ' + stderr.decode() + stdout.decode()) |