diff options
| -rw-r--r-- | meta/classes-recipe/testimage.bbclass | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass index 7340996788..8a944f5809 100644 --- a/meta/classes-recipe/testimage.bbclass +++ b/meta/classes-recipe/testimage.bbclass | |||
| @@ -370,9 +370,12 @@ def testimage_main(d): | |||
| 370 | export_proxies(d) | 370 | export_proxies(d) |
| 371 | 371 | ||
| 372 | if slirp: | 372 | if slirp: |
| 373 | target_ip = "127.0.0.1" | 373 | # Default to 127.0.0.1 and let the runner identify the port forwarding |
| 374 | # from qemu target to host with default DHCP server | 374 | # (as OEQemuTarget does), but allow overriding. |
| 375 | server_ip = "10.0.2.2" | 375 | target_ip = d.getVar("TEST_TARGET_IP") or "127.0.0.1" |
| 376 | # Default to 10.0.2.2 as this is the IP that the guest has with the | ||
| 377 | # default qemu slirp networking configuration, but allow overriding. | ||
| 378 | server_ip = d.getVar("TEST_SERVER_IP") or "10.0.2.2" | ||
| 376 | else: | 379 | else: |
| 377 | target_ip = d.getVar("TEST_TARGET_IP") | 380 | target_ip = d.getVar("TEST_TARGET_IP") |
| 378 | server_ip = d.getVar("TEST_SERVER_IP") | 381 | server_ip = d.getVar("TEST_SERVER_IP") |
