diff options
author | Mykhaylo Sul <ext-mykhaylo.sul@here.com> | 2019-08-26 11:19:25 +0300 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2019-09-11 15:32:12 +0200 |
commit | 9dfb9607216189e0c3c093c96a0e5bc4c648f3ef (patch) | |
tree | 1db8e8eb399c42987ed7cac6a314917d713e52c5 | |
parent | 43277ebbced942b134316df77a5af638f6644fe9 (diff) | |
download | meta-updater-9dfb9607216189e0c3c093c96a0e5bc4c648f3ef.tar.gz |
Use --wait-until-provisioned option while getting aktualizr status in the ip secondary tests
Signed-off-by: Mykhaylo Sul <ext-mykhaylo.sul@here.com>
-rw-r--r-- | lib/oeqa/selftest/cases/updater_qemux86_64.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/oeqa/selftest/cases/updater_qemux86_64.py b/lib/oeqa/selftest/cases/updater_qemux86_64.py index 24abcff..4506300 100644 --- a/lib/oeqa/selftest/cases/updater_qemux86_64.py +++ b/lib/oeqa/selftest/cases/updater_qemux86_64.py | |||
@@ -360,17 +360,7 @@ class IpSecondaryTests(OESelftestTestCase): | |||
360 | self._test_ctx.append_config('SOTA_CLIENT_PROV = " aktualizr-shared-prov "') | 360 | self._test_ctx.append_config('SOTA_CLIENT_PROV = " aktualizr-shared-prov "') |
361 | 361 | ||
362 | def is_ecu_registered(self, ecu_id): | 362 | def is_ecu_registered(self, ecu_id): |
363 | max_number_of_tries = 120 | 363 | device_status = self.get_info() |
364 | try_counter = 0 | ||
365 | |||
366 | # aktualizr-info is not always able to load ECU serials from DB | ||
367 | # so, let's run it a few times until it actually succeeds | ||
368 | while try_counter < max_number_of_tries: | ||
369 | device_status = self.get_info() | ||
370 | try_counter += 1 | ||
371 | if device_status.find("load ECU serials") == -1: | ||
372 | break | ||
373 | sleep(1) | ||
374 | 364 | ||
375 | if not ((device_status.find(ecu_id[0]) != -1) and (device_status.find(ecu_id[1]) != -1)): | 365 | if not ((device_status.find(ecu_id[0]) != -1) and (device_status.find(ecu_id[1]) != -1)): |
376 | return False | 366 | return False |
@@ -379,7 +369,7 @@ class IpSecondaryTests(OESelftestTestCase): | |||
379 | return not_reg_start == -1 or (device_status.find(ecu_id[1], not_reg_start) == -1) | 369 | return not_reg_start == -1 or (device_status.find(ecu_id[1], not_reg_start) == -1) |
380 | 370 | ||
381 | def get_info(self): | 371 | def get_info(self): |
382 | stdout, stderr, retcode = self.send_command('aktualizr-info') | 372 | stdout, stderr, retcode = self.send_command('aktualizr-info --wait-until-provisioned', timeout=620) |
383 | self._test_ctx.assertEqual(retcode, 0, 'Unable to run aktualizr-info: {}'.format(stderr)) | 373 | self._test_ctx.assertEqual(retcode, 0, 'Unable to run aktualizr-info: {}'.format(stderr)) |
384 | return stdout | 374 | return stdout |
385 | 375 | ||