From: Ondrej Lichtner <olichtne(a)redhat.com>
The lnst.Tests package is present on the Controller and provides
upstream maintained test classes. These can be instantiated and used to
run tests on the Slaves. While doing so they're sent over the network to
the Slaves where they're dynamically imported. Since the lnst.Tests
package doesn't originaly exist on the slave, every imported module
imported this way will result in a python runtime warning of the package
not existing. This doesn't break anything but it does add clutter to the
logs.
Pre-creating the package on the slave will fix the issue.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Slave/NetTestSlave.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lnst/Slave/NetTestSlave.py b/lnst/Slave/NetTestSlave.py
index 0f654e3..99914df 100644
--- a/lnst/Slave/NetTestSlave.py
+++ b/lnst/Slave/NetTestSlave.py
@@ -51,6 +51,11 @@ Devices.__path__ = ["lnst.Devices"]
sys.modules["lnst.Devices"] = Devices
+Tests = types.ModuleType("Tests")
+Tests.__path__ = ["lnst.Tests"]
+
+sys.modules["lnst.Tests"] = Tests
+
class SlaveMethods:
'''
Exported xmlrpc methods
--
2.13.0