diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2017-12-16 09:21:57 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-12-16 09:21:57 +0000 |
commit | 1a86f049ec4d0a4371f2f0207cdf2db6d448af7e (patch) | |
tree | 957043451792f2eadfa454b4945464cf785ff316 /yardstick/benchmark/scenarios | |
parent | 600f708444e556b0b658fcf86d3d0b14e27e2add (diff) | |
parent | 7bd43b239b7be6f478399526a177922d4482bcc2 (diff) |
Merge "bugfix: tc078 fails in some situations"
Diffstat (limited to 'yardstick/benchmark/scenarios')
-rw-r--r-- | yardstick/benchmark/scenarios/compute/spec_cpu.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/yardstick/benchmark/scenarios/compute/spec_cpu.py b/yardstick/benchmark/scenarios/compute/spec_cpu.py index df361cd94..0294f524d 100644 --- a/yardstick/benchmark/scenarios/compute/spec_cpu.py +++ b/yardstick/benchmark/scenarios/compute/spec_cpu.py @@ -10,6 +10,7 @@ from __future__ import absolute_import import logging import pkg_resources +import os import yardstick.ssh as ssh from yardstick.benchmark.scenarios import base @@ -66,6 +67,7 @@ class SpecCPU(base.Scenario): default: na """ __scenario_type__ = "SpecCPU2006" + CPU2006_DIR = "~/cpu2006" def __init__(self, scenario_cfg, context_cfg): self.scenario_cfg = scenario_cfg @@ -87,8 +89,9 @@ class SpecCPU(base.Scenario): "yardstick.resources", 'files/' + self.runspec_config) # copy SPEC CPU2006 config file to host if given - self.client._put_file_shell(self.runspec_config_file, - '/usr/cpu2006/config/yardstick_spec_cpu2006.cfg') + cfg_path = os.path.join(self.CPU2006_DIR, + 'config/yardstick_spec_cpu2006.cfg') + self.client._put_file_shell(self.runspec_config_file, cfg_path) else: self.runspec_config = "Example-linux64-amd64-gcc43+.cfg" @@ -100,7 +103,8 @@ class SpecCPU(base.Scenario): if not self.setup_done: self.setup() - cmd = "cd /usr/cpu2006/ && . ./shrc && runspec --config %s" % self.runspec_config + cmd = "cd %s && . ./shrc && runspec --config %s" % ( + self.CPU2006_DIR, self.runspec_config) cmd_args = "" if "rate" in self.options: |