summaryrefslogtreecommitdiffstatshomepage
path: root/tests/run-multitests.py
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2022-05-19 21:09:41 +0200
committerDamien George <damien@micropython.org>2022-05-24 13:21:05 +1000
commitdd35f76db330851bdf937585219d5cae21222fa3 (patch)
tree1bd5ccb90517af25eb4767151d5209bee1b57761 /tests/run-multitests.py
parentbeeb250d58b70b60a01dae3e2fac2741f56381f5 (diff)
downloadmicropython-dd35f76db330851bdf937585219d5cae21222fa3.tar.gz
micropython-dd35f76db330851bdf937585219d5cae21222fa3.zip
tests/run-multitests.py: Use LAN for IP address if WLAN doesn't exist.
This allows running the test on boards with just a LAN interface. Fixes issue #8681.
Diffstat (limited to 'tests/run-multitests.py')
-rwxr-xr-xtests/run-multitests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/run-multitests.py b/tests/run-multitests.py
index f55d52b6e9..bb3ef185da 100755
--- a/tests/run-multitests.py
+++ b/tests/run-multitests.py
@@ -64,7 +64,10 @@ class multitest:
def get_network_ip():
try:
import network
- ip = network.WLAN().ifconfig()[0]
+ if hasattr(network, "WLAN"):
+ ip = network.WLAN().ifconfig()[0]
+ else:
+ ip = network.LAN().ifconfig()[0]
except:
ip = HOST_IP
return ip