summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/case.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/runtime/case.py')
-rw-r--r--meta/lib/oeqa/runtime/case.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/case.py b/meta/lib/oeqa/runtime/case.py
index f036982e1f..2a47771a3d 100644
--- a/meta/lib/oeqa/runtime/case.py
+++ b/meta/lib/oeqa/runtime/case.py
@@ -4,6 +4,9 @@
4# SPDX-License-Identifier: MIT 4# SPDX-License-Identifier: MIT
5# 5#
6 6
7import os
8import subprocess
9import time
7from oeqa.core.case import OETestCase 10from oeqa.core.case import OETestCase
8from oeqa.utils.package_manager import install_package, uninstall_package 11from oeqa.utils.package_manager import install_package, uninstall_package
9 12
@@ -18,3 +21,18 @@ class OERuntimeTestCase(OETestCase):
18 def tearDown(self): 21 def tearDown(self):
19 super(OERuntimeTestCase, self).tearDown() 22 super(OERuntimeTestCase, self).tearDown()
20 uninstall_package(self) 23 uninstall_package(self)
24
25def run_network_serialdebug(runner):
26 if not runner:
27 return
28 status, output = runner.run_serial("ip addr")
29 print("ip addr on target: %s %s" % (output, status))
30 status, output = runner.run_serial("ping -c 1 %s" % self.target.server_ip)
31 print("ping on target for %s: %s %s" % (self.target.server_ip, output, status))
32 status, output = runner.run_serial("ping -c 1 %s" % self.target.ip)
33 print("ping on target for %s: %s %s" % (self.target.ip, output, status))
34 # Have to use a full path for netstat which isn't in HOSTTOOLS
35 subprocess.call(["/usr/bin/netstat", "-tunape"])
36 subprocess.call(["/usr/bin/netstat", "-ei"])
37 subprocess.call(["ps", "-awx"], shell=True)
38 print("PID: %s %s" % (str(os.getpid()), time.time()))