The option helps with consequent runs of the test.
--- Tests/TestIperf.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Tests/TestIperf.py b/Tests/TestIperf.py index 45eda95..8b84484 100644 --- a/Tests/TestIperf.py +++ b/Tests/TestIperf.py @@ -17,7 +17,6 @@ class TestIperf(TestGeneric): def _install_iperf(self): # by default dies on failure logging.info("trace: _install_iperf") - self._temp_dir = (exec_cmd("mktemp -d")[0]).strip() exec_cmd("wget -P %s/ %s" % (self._temp_dir, self._harness_url) ) exec_cmd("cd %s; tar -xvzf %s" % (self._temp_dir, self._harness_archive)) exec_cmd("cd %s/%s; ./configure; make; " % (self._temp_dir, self._harness)) @@ -58,7 +57,12 @@ class TestIperf(TestGeneric): self.duration = 60
# same for client and server - self._install_iperf() + installed = self.get_opt("install_dir") + if installed is None: + self._temp_dir = (exec_cmd("mktemp -d")[0]).strip() + self._install_iperf() + else: + self._temp_dir = installed
role = self.get_mopt("role") cmd = self._compose_iperf_cmd(role)
Fri, Dec 09, 2011 at 05:03:49PM CET, jtluka@redhat.com wrote:
The option helps with consequent runs of the test.
Tests/TestIperf.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Tests/TestIperf.py b/Tests/TestIperf.py index 45eda95..8b84484 100644 --- a/Tests/TestIperf.py +++ b/Tests/TestIperf.py @@ -17,7 +17,6 @@ class TestIperf(TestGeneric): def _install_iperf(self): # by default dies on failure logging.info("trace: _install_iperf")
self._temp_dir = (exec_cmd("mktemp -d")[0]).strip() exec_cmd("wget -P %s/ %s" % (self._temp_dir, self._harness_url) ) exec_cmd("cd %s; tar -xvzf %s" % (self._temp_dir, self._harness_archive)) exec_cmd("cd %s/%s; ./configure; make; " % (self._temp_dir, self._harness))
@@ -58,7 +57,12 @@ class TestIperf(TestGeneric): self.duration = 60
# same for client and server
self._install_iperf()
installed = self.get_opt("install_dir")
if installed is None:
self._temp_dir = (exec_cmd("mktemp -d")[0]).strip()
self._install_iperf()
else:
self._temp_dir = installed role = self.get_mopt("role") cmd = self._compose_iperf_cmd(role)
-- 1.7.4.4
LNST-developers mailing list LNST-developers@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/lnst-developers
applied
lnst-developers@lists.fedorahosted.org