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.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/case.py b/meta/lib/oeqa/runtime/case.py
index f036982e1f..9515ca2f3d 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,16 @@ 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 status, output = runner.run_serial("ip addr")
27 print("ip addr on target: %s %s" % (output, status))
28 status, output = runner.run_serial("ping -c 1 %s" % self.target.server_ip)
29 print("ping on target for %s: %s %s" % (self.target.server_ip, output, status))
30 status, output = runner.run_serial("ping -c 1 %s" % self.target.ip)
31 print("ping on target for %s: %s %s" % (self.target.ip, output, status))
32 # Have to use a full path for netstat which isn't in HOSTTOOLS
33 subprocess.call(["/usr/bin/netstat", "-tunape"])
34 subprocess.call(["/usr/bin/netstat", "-ei"])
35 subprocess.call(["ps", "-awx"], shell=True)
36 print("PID: %s %s" % (str(os.getpid()), time.time()))