diff options
| author | Mykhaylo Sul <ext-mykhaylo.sul@here.com> | 2019-08-26 11:19:25 +0300 |
|---|---|---|
| committer | Mykhaylo Sul <ext-mykhaylo.sul@here.com> | 2019-08-27 10:32:27 +0300 |
| commit | 620152f30b9a0846b1864a7d5760025391e03661 (patch) | |
| tree | f2ba4c592b4cb093237027a9ae28a1537602f073 | |
| parent | abfc287de407fe53cbbdd6edb9d08cf8cf51b298 (diff) | |
| download | meta-updater-fix/ip-secondary-test/wait-until-provisioned.tar.gz | |
Use --wait-until-provisioned option while getting aktualizr status in the ip secondary testsfix/ip-secondary-test/wait-until-provisioned
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 | ||
