Introduce stress tool object
This object allows to run the "stress" cmdline program in the background
on the specifies run_node, to simulate system load.
To run stress, a test can simply do:
stress = tenv.stress(epc.run_node())
stress.start(cpu_workers=2, mem_workers=1, io_workers=1)
And the test environment will remember to stop it when the test finishes.
Change-Id: I21023e6c64c48109f294291bfe3d8d8f4e1de038
diff --git a/src/osmo_gsm_tester/testenv.py b/src/osmo_gsm_tester/testenv.py
index ea71df9..1790059 100644
--- a/src/osmo_gsm_tester/testenv.py
+++ b/src/osmo_gsm_tester/testenv.py
@@ -318,6 +318,11 @@
iperf3srv_obj = IPerf3Server(self, ip_address)
return iperf3srv_obj
+ def stress(self, run_node=None):
+ from .obj.stress import StressTool
+ stress_obj = StressTool(self, run_node)
+ return stress_obj
+
def msisdn(self):
msisdn = self.suite_run.resource_pool().next_msisdn(self)
self.log('using MSISDN', msisdn)