mirror of
https://git.yoctoproject.org/poky
synced 2026-09-13 00:49:33 +02:00
oeqa/runtime: Add debugging if networking fails
If networking fails, we can get useful informaiton over the serial connection. Add this fallback code so that any issues can be more easily debugged by showing the host and target networking states. (From OE-Core rev: 3291f9d07ecfe7d3301dc914f5e6a80577cf1d5d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
from subprocess import Popen, PIPE
|
||||
from time import sleep
|
||||
|
||||
from oeqa.runtime.case import OERuntimeTestCase
|
||||
from oeqa.runtime.case import OERuntimeTestCase, run_network_serialdebug
|
||||
from oeqa.core.decorator.oetimeout import OETimeout
|
||||
from oeqa.core.exception import OEQATimeoutError
|
||||
|
||||
@@ -36,6 +36,7 @@ class PingTest(OERuntimeTestCase):
|
||||
count = 0
|
||||
sleep(1)
|
||||
except OEQATimeoutError:
|
||||
run_network_serialdebug(self.target.runner)
|
||||
self.fail("Ping timeout error for address %s, count %s, output: %s" % (self.target.ip, count, output))
|
||||
msg = ('Expected 5 consecutive, got %d.\n'
|
||||
'ping output is:\n%s' % (count,output))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import time
|
||||
import signal
|
||||
|
||||
from oeqa.runtime.case import OERuntimeTestCase
|
||||
from oeqa.runtime.case import OERuntimeTestCase, run_network_serialdebug
|
||||
from oeqa.core.decorator.depends import OETestDepends
|
||||
from oeqa.runtime.decorator.package import OEHasPackage
|
||||
|
||||
@@ -32,6 +32,7 @@ class SSHTest(OERuntimeTestCase):
|
||||
time.sleep(5)
|
||||
continue
|
||||
else:
|
||||
run_network_serialdebug(self.target.runner)
|
||||
self.fail("uname failed with \"%s\" (exit code %s)" % (output, status))
|
||||
if status != 0:
|
||||
self.fail("ssh failed with \"%s\" (exit code %s)" % (output, status))
|
||||
|
||||
Reference in New Issue
Block a user