diff options
Diffstat (limited to 'meta/classes-recipe/testimage.bbclass')
| -rw-r--r-- | meta/classes-recipe/testimage.bbclass | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass index e3068348ff..7340996788 100644 --- a/meta/classes-recipe/testimage.bbclass +++ b/meta/classes-recipe/testimage.bbclass | |||
| @@ -322,7 +322,7 @@ def testimage_main(d): | |||
| 322 | ovmf = d.getVar("QEMU_USE_OVMF") | 322 | ovmf = d.getVar("QEMU_USE_OVMF") |
| 323 | 323 | ||
| 324 | slirp = False | 324 | slirp = False |
| 325 | if d.getVar("QEMU_USE_SLIRP"): | 325 | if d.getVar("QEMU_USE_SLIRP") or bb.utils.contains('TEST_RUNQEMUPARAMS', 'slirp', True, False, d): |
| 326 | slirp = True | 326 | slirp = True |
| 327 | 327 | ||
| 328 | # TODO: We use the current implementation of qemu runner because of | 328 | # TODO: We use the current implementation of qemu runner because of |
| @@ -369,10 +369,18 @@ def testimage_main(d): | |||
| 369 | # runtime use network for download projects for build | 369 | # runtime use network for download projects for build |
| 370 | export_proxies(d) | 370 | export_proxies(d) |
| 371 | 371 | ||
| 372 | if slirp: | ||
| 373 | target_ip = "127.0.0.1" | ||
| 374 | # from qemu target to host with default DHCP server | ||
| 375 | server_ip = "10.0.2.2" | ||
| 376 | else: | ||
| 377 | target_ip = d.getVar("TEST_TARGET_IP") | ||
| 378 | server_ip = d.getVar("TEST_SERVER_IP") | ||
| 379 | |||
| 372 | # the robot dance | 380 | # the robot dance |
| 373 | target = OERuntimeTestContextExecutor.getTarget( | 381 | target = OERuntimeTestContextExecutor.getTarget( |
| 374 | d.getVar("TEST_TARGET"), logger, d.getVar("TEST_TARGET_IP"), | 382 | d.getVar("TEST_TARGET"), logger, target_ip, |
| 375 | d.getVar("TEST_SERVER_IP"), **target_kwargs) | 383 | server_ip, **target_kwargs) |
| 376 | 384 | ||
| 377 | # test context | 385 | # test context |
| 378 | tc = OERuntimeTestContext(td, logger, target, image_packages, extract_dir) | 386 | tc = OERuntimeTestContext(td, logger, target, image_packages, extract_dir) |
