summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorZee314159 <252806294@qq.com>2019-07-24 09:32:24 +0200
committerZee314159 <252806294@qq.com>2019-07-24 09:37:32 +0200
commit8cb5084b34668ae2808ff5312f40d860a1fdf04a (patch)
treed82ae43dfb89099874239c38941b139fe0bb1e9a /lib
parent7530d93ebb97b519a12b88d121320ac0bb711c46 (diff)
downloadmeta-updater-8cb5084b34668ae2808ff5312f40d860a1fdf04a.tar.gz
fixed bugs
Signed-off-by: Zee314159 <252806294@qq.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/oeqa/selftest/cases/testutils.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/oeqa/selftest/cases/testutils.py b/lib/oeqa/selftest/cases/testutils.py
index 8d618a6..38e6033 100644
--- a/lib/oeqa/selftest/cases/testutils.py
+++ b/lib/oeqa/selftest/cases/testutils.py
@@ -124,12 +124,18 @@ def verifyProvisioned(testInst, machine):
124 ran_ok = False 124 ran_ok = False
125 for delay in [5, 5, 5, 5, 10, 10, 10, 10]: 125 for delay in [5, 5, 5, 5, 10, 10, 10, 10]:
126 stdout, stderr, retcode = testInst.qemu_command('aktualizr-info') 126 stdout, stderr, retcode = testInst.qemu_command('aktualizr-info')
127 if retcode == 0 and stderr == b'' and stdout.decode().find('Fetched metadata: yes') >= 0: 127 if retcode == 0 and stderr == b'':
128 ran_ok = True 128 ran_ok = True
129 break 129 break
130 sleep(delay) 130 sleep(delay)
131 testInst.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) 131 testInst.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode())
132 132
133 ran_ok = False
134 if stdout.decode().find('Fetched metadata: yes') < 0:
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:
137 ran_ok = True
138 testInst.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode())
133 testInst.assertIn(b'Device ID: ', stdout, 'Provisioning failed: ' + stderr.decode() + stdout.decode()) 139 testInst.assertIn(b'Device ID: ', stdout, 'Provisioning failed: ' + stderr.decode() + stdout.decode())
134 testInst.assertIn(b'Primary ecu hardware ID: ' + machine.encode(), stdout, 140 testInst.assertIn(b'Primary ecu hardware ID: ' + machine.encode(), stdout,
135 'Provisioning failed: ' + stderr.decode() + stdout.decode()) 141 'Provisioning failed: ' + stderr.decode() + stdout.decode())