summaryrefslogtreecommitdiffstats
path: root/tools/load_gen/stress/stress.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-11-07 09:10:43 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-07 09:10:43 +0000
commit1653f5d6a12febed50f138076dcf8c191d9f24e6 (patch)
tree522d94038ac6eaa262a8b3ca2c6fa4704db12d79 /tools/load_gen/stress/stress.py
parent1cfdb4bfbdd1ee02e6ab8bce691084d5319d5410 (diff)
parent485ac777fd9cded7c145917bfcbe701276f3c855 (diff)
Merge "load_gen: Supporting loading of load_gen via loader."
Diffstat (limited to 'tools/load_gen/stress/stress.py')
-rw-r--r--tools/load_gen/stress/stress.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/load_gen/stress/stress.py b/tools/load_gen/stress/stress.py
index 4c69a170..0790d47c 100644
--- a/tools/load_gen/stress/stress.py
+++ b/tools/load_gen/stress/stress.py
@@ -52,8 +52,10 @@ class Stress(ILoadGenerator):
return
# check if load tool binary is available
- if not ('tool' in stress_config) or subprocess.call("which " + stress_config['tool'], shell=True) > 0:
- self._logger.error("stress tool binary '%s' is not available", stress_config['tool'])
+ if subprocess.call("which {}".format(self._process_args['name']),
+ shell=True) > 0:
+ self._logger.error("stress tool binary '%s' is not available",
+ self._process_args['name'])
return
# calculate requested load details and load split among different