From: Peter Marko <[email protected]> If netstat is not installed on the host, the function fails.
Signed-off-by: Peter Marko <[email protected]> --- meta/lib/oeqa/runtime/case.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/runtime/case.py b/meta/lib/oeqa/runtime/case.py index 095bcf434a..23796c0cdf 100644 --- a/meta/lib/oeqa/runtime/case.py +++ b/meta/lib/oeqa/runtime/case.py @@ -32,7 +32,10 @@ def run_network_serialdebug(target): status, output = target.runner.run_serial("ping -c 1 %s" % target.ip) print("ping on target for %s: %s %s" % (target.ip, output, status)) # Have to use a full path for netstat which isn't in HOSTTOOLS - subprocess.call(["/usr/bin/netstat", "-tunape"]) - subprocess.call(["/usr/bin/netstat", "-ei"]) + try: + subprocess.call(["/usr/bin/netstat", "-tunape"]) + subprocess.call(["/usr/bin/netstat", "-ei"]) + except (OSError, subprocess.SubprocessError) as e: + print("netstat failed: %s" % e) subprocess.call(["ps", "-awx"], shell=True) print("PID: %s %s" % (str(os.getpid()), time.time()))
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#229234): https://lists.openembedded.org/g/openembedded-core/message/229234 Mute This Topic: https://lists.openembedded.org/mt/117240491/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
