diff options
| author | Patrick Vacek <patrickvacek@gmail.com> | 2018-06-19 15:02:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-19 15:02:43 +0200 |
| commit | 56c58c6f64bf9b123201da4a542ca00b334162c0 (patch) | |
| tree | 153e2899a47a25e2c4915001d058347f0fea02a4 /lib/oeqa/selftest | |
| parent | 2ca1b16a0910ec4890c504ce01e54161038a03e4 (diff) | |
| parent | cf23391c408712f65c9e65a8187d1c00d16c30de (diff) | |
| download | meta-updater-56c58c6f64bf9b123201da4a542ca00b334162c0.tar.gz | |
Merge pull request #339 from advancedtelematic/bugfix/staging_dir_host_master
Bugfix/staging dir host master
Diffstat (limited to 'lib/oeqa/selftest')
| -rw-r--r-- | lib/oeqa/selftest/cases/updater.py | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 1554835..96058e7 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py | |||
| @@ -115,8 +115,8 @@ class AktualizrToolsTests(OESelftestTestCase): | |||
| 115 | bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS', 'T'], 'aktualizr-native') | 115 | bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS', 'T'], 'aktualizr-native') |
| 116 | creds = bb_vars['SOTA_PACKED_CREDENTIALS'] | 116 | creds = bb_vars['SOTA_PACKED_CREDENTIALS'] |
| 117 | temp_dir = bb_vars['T'] | 117 | temp_dir = bb_vars['T'] |
| 118 | bb_vars_prov = get_bb_vars(['STAGING_DIR_NATIVE', 'libdir'], 'aktualizr-implicit-prov') | 118 | bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-implicit-prov') |
| 119 | config = bb_vars_prov['STAGING_DIR_NATIVE'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' | 119 | config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' |
| 120 | 120 | ||
| 121 | akt_native_run(self, 'aktualizr_cert_provider -c {creds} -r -l {temp} -g {config}' | 121 | akt_native_run(self, 'aktualizr_cert_provider -c {creds} -r -l {temp} -g {config}' |
| 122 | .format(creds=creds, temp=temp_dir, config=config)) | 122 | .format(creds=creds, temp=temp_dir, config=config)) |
| @@ -141,7 +141,7 @@ class AutoProvTests(OESelftestTestCase): | |||
| 141 | if re.search(layer, result.output) is None: | 141 | if re.search(layer, result.output) is None: |
| 142 | # Assume the directory layout for finding other layers. We could also | 142 | # Assume the directory layout for finding other layers. We could also |
| 143 | # make assumptions by using 'show-layers', but either way, if the | 143 | # make assumptions by using 'show-layers', but either way, if the |
| 144 | # layers we need aren't where we expect them, we are out of like. | 144 | # layers we need aren't where we expect them, we are out of luck. |
| 145 | path = os.path.abspath(os.path.dirname(__file__)) | 145 | path = os.path.abspath(os.path.dirname(__file__)) |
| 146 | metadir = path + "/../../../../../" | 146 | metadir = path + "/../../../../../" |
| 147 | self.meta_qemu = metadir + layer | 147 | self.meta_qemu = metadir + layer |
| @@ -204,7 +204,7 @@ class RpiTests(OESelftestTestCase): | |||
| 204 | result = runCmd('bitbake-layers show-layers') | 204 | result = runCmd('bitbake-layers show-layers') |
| 205 | # Assume the directory layout for finding other layers. We could also | 205 | # Assume the directory layout for finding other layers. We could also |
| 206 | # make assumptions by using 'show-layers', but either way, if the | 206 | # make assumptions by using 'show-layers', but either way, if the |
| 207 | # layers we need aren't where we expect them, we are out of like. | 207 | # layers we need aren't where we expect them, we are out of luck. |
| 208 | path = os.path.abspath(os.path.dirname(__file__)) | 208 | path = os.path.abspath(os.path.dirname(__file__)) |
| 209 | metadir = path + "/../../../../../" | 209 | metadir = path + "/../../../../../" |
| 210 | if re.search(layer_python, result.output) is None: | 210 | if re.search(layer_python, result.output) is None: |
| @@ -277,7 +277,7 @@ class GrubTests(OESelftestTestCase): | |||
| 277 | result = runCmd('bitbake-layers show-layers') | 277 | result = runCmd('bitbake-layers show-layers') |
| 278 | # Assume the directory layout for finding other layers. We could also | 278 | # Assume the directory layout for finding other layers. We could also |
| 279 | # make assumptions by using 'show-layers', but either way, if the | 279 | # make assumptions by using 'show-layers', but either way, if the |
| 280 | # layers we need aren't where we expect them, we are out of like. | 280 | # layers we need aren't where we expect them, we are out of luck. |
| 281 | path = os.path.abspath(os.path.dirname(__file__)) | 281 | path = os.path.abspath(os.path.dirname(__file__)) |
| 282 | metadir = path + "/../../../../../" | 282 | metadir = path + "/../../../../../" |
| 283 | if re.search(layer_intel, result.output) is None: | 283 | if re.search(layer_intel, result.output) is None: |
| @@ -339,7 +339,7 @@ class ImplProvTests(OESelftestTestCase): | |||
| 339 | if re.search(layer, result.output) is None: | 339 | if re.search(layer, result.output) is None: |
| 340 | # Assume the directory layout for finding other layers. We could also | 340 | # Assume the directory layout for finding other layers. We could also |
| 341 | # make assumptions by using 'show-layers', but either way, if the | 341 | # make assumptions by using 'show-layers', but either way, if the |
| 342 | # layers we need aren't where we expect them, we are out of like. | 342 | # layers we need aren't where we expect them, we are out of luck. |
| 343 | path = os.path.abspath(os.path.dirname(__file__)) | 343 | path = os.path.abspath(os.path.dirname(__file__)) |
| 344 | metadir = path + "/../../../../../" | 344 | metadir = path + "/../../../../../" |
| 345 | self.meta_qemu = metadir + layer | 345 | self.meta_qemu = metadir + layer |
| @@ -348,6 +348,7 @@ class ImplProvTests(OESelftestTestCase): | |||
| 348 | self.meta_qemu = None | 348 | self.meta_qemu = None |
| 349 | self.append_config('MACHINE = "qemux86-64"') | 349 | self.append_config('MACHINE = "qemux86-64"') |
| 350 | self.append_config('SOTA_CLIENT_PROV = " aktualizr-implicit-prov "') | 350 | self.append_config('SOTA_CLIENT_PROV = " aktualizr-implicit-prov "') |
| 351 | runCmd('bitbake -c cleanall aktualizr aktualizr-implicit-prov') | ||
| 351 | self.qemu, self.s = qemu_launch(machine='qemux86-64') | 352 | self.qemu, self.s = qemu_launch(machine='qemux86-64') |
| 352 | 353 | ||
| 353 | def tearDownLocal(self): | 354 | def tearDownLocal(self): |
| @@ -392,8 +393,8 @@ class ImplProvTests(OESelftestTestCase): | |||
| 392 | # Run cert_provider. | 393 | # Run cert_provider. |
| 393 | bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS'], 'aktualizr-native') | 394 | bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS'], 'aktualizr-native') |
| 394 | creds = bb_vars['SOTA_PACKED_CREDENTIALS'] | 395 | creds = bb_vars['SOTA_PACKED_CREDENTIALS'] |
| 395 | bb_vars_prov = get_bb_vars(['STAGING_DIR_NATIVE', 'libdir'], 'aktualizr-implicit-prov') | 396 | bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-implicit-prov') |
| 396 | config = bb_vars_prov['STAGING_DIR_NATIVE'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' | 397 | config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' |
| 397 | 398 | ||
| 398 | akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -s -g {config}' | 399 | akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -s -g {config}' |
| 399 | .format(creds=creds, port=self.qemu.ssh_port, config=config)) | 400 | .format(creds=creds, port=self.qemu.ssh_port, config=config)) |
| @@ -409,7 +410,7 @@ class HsmTests(OESelftestTestCase): | |||
| 409 | if re.search(layer, result.output) is None: | 410 | if re.search(layer, result.output) is None: |
| 410 | # Assume the directory layout for finding other layers. We could also | 411 | # Assume the directory layout for finding other layers. We could also |
| 411 | # make assumptions by using 'show-layers', but either way, if the | 412 | # make assumptions by using 'show-layers', but either way, if the |
| 412 | # layers we need aren't where we expect them, we are out of like. | 413 | # layers we need aren't where we expect them, we are out of luck. |
| 413 | path = os.path.abspath(os.path.dirname(__file__)) | 414 | path = os.path.abspath(os.path.dirname(__file__)) |
| 414 | metadir = path + "/../../../../../" | 415 | metadir = path + "/../../../../../" |
| 415 | self.meta_qemu = metadir + layer | 416 | self.meta_qemu = metadir + layer |
| @@ -419,6 +420,7 @@ class HsmTests(OESelftestTestCase): | |||
| 419 | self.append_config('MACHINE = "qemux86-64"') | 420 | self.append_config('MACHINE = "qemux86-64"') |
| 420 | self.append_config('SOTA_CLIENT_PROV = "aktualizr-hsm-prov"') | 421 | self.append_config('SOTA_CLIENT_PROV = "aktualizr-hsm-prov"') |
| 421 | self.append_config('SOTA_CLIENT_FEATURES = "hsm"') | 422 | self.append_config('SOTA_CLIENT_FEATURES = "hsm"') |
| 423 | runCmd('bitbake -c cleanall aktualizr aktualizr-hsm-prov') | ||
| 422 | self.qemu, self.s = qemu_launch(machine='qemux86-64') | 424 | self.qemu, self.s = qemu_launch(machine='qemux86-64') |
| 423 | 425 | ||
| 424 | def tearDownLocal(self): | 426 | def tearDownLocal(self): |
| @@ -473,8 +475,8 @@ class HsmTests(OESelftestTestCase): | |||
| 473 | # Run cert_provider. | 475 | # Run cert_provider. |
| 474 | bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS'], 'aktualizr-native') | 476 | bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS'], 'aktualizr-native') |
| 475 | creds = bb_vars['SOTA_PACKED_CREDENTIALS'] | 477 | creds = bb_vars['SOTA_PACKED_CREDENTIALS'] |
| 476 | bb_vars_prov = get_bb_vars(['STAGING_DIR_NATIVE', 'libdir'], 'aktualizr-hsm-prov') | 478 | bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-hsm-prov') |
| 477 | config = bb_vars_prov['STAGING_DIR_NATIVE'] + bb_vars_prov['libdir'] + '/sota/sota_hsm_prov.toml' | 479 | config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_hsm_prov.toml' |
| 478 | 480 | ||
| 479 | akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -r -s -g {config}' | 481 | akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -r -s -g {config}' |
| 480 | .format(creds=creds, port=self.qemu.ssh_port, config=config)) | 482 | .format(creds=creds, port=self.qemu.ssh_port, config=config)) |
| @@ -527,7 +529,7 @@ class SecondaryTests(OESelftestTestCase): | |||
| 527 | if re.search(layer, result.output) is None: | 529 | if re.search(layer, result.output) is None: |
| 528 | # Assume the directory layout for finding other layers. We could also | 530 | # Assume the directory layout for finding other layers. We could also |
| 529 | # make assumptions by using 'show-layers', but either way, if the | 531 | # make assumptions by using 'show-layers', but either way, if the |
| 530 | # layers we need aren't where we expect them, we are out of like. | 532 | # layers we need aren't where we expect them, we are out of luck. |
| 531 | path = os.path.abspath(os.path.dirname(__file__)) | 533 | path = os.path.abspath(os.path.dirname(__file__)) |
| 532 | metadir = path + "/../../../../../" | 534 | metadir = path + "/../../../../../" |
| 533 | self.meta_qemu = metadir + layer | 535 | self.meta_qemu = metadir + layer |
| @@ -572,7 +574,7 @@ class PrimaryTests(OESelftestTestCase): | |||
| 572 | if re.search(layer, result.output) is None: | 574 | if re.search(layer, result.output) is None: |
| 573 | # Assume the directory layout for finding other layers. We could also | 575 | # Assume the directory layout for finding other layers. We could also |
| 574 | # make assumptions by using 'show-layers', but either way, if the | 576 | # make assumptions by using 'show-layers', but either way, if the |
| 575 | # layers we need aren't where we expect them, we are out of like. | 577 | # layers we need aren't where we expect them, we are out of luck. |
| 576 | path = os.path.abspath(os.path.dirname(__file__)) | 578 | path = os.path.abspath(os.path.dirname(__file__)) |
| 577 | metadir = path + "/../../../../../" | 579 | metadir = path + "/../../../../../" |
| 578 | self.meta_qemu = metadir + layer | 580 | self.meta_qemu = metadir + layer |
