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 | |
parent | 600f708444e556b0b658fcf86d3d0b14e27e2add (diff) | |
parent | 7bd43b239b7be6f478399526a177922d4482bcc2 (diff) |
Merge "bugfix: tc078 fails in some situations"
-rw-r--r-- | ansible/roles/archive_spec_cpu2006_result/tasks/main.yaml | 5 | ||||
-rw-r--r-- | ansible/roles/fetch_spec_cpu2006_result/tasks/main.yaml | 3 | ||||
-rw-r--r-- | ansible/roles/install_spec_cpu2006/tasks/main.yaml | 6 | ||||
-rw-r--r-- | ansible/roles/unarchive_spec_cpu2006_result/tasks/main.yaml | 1 | ||||
-rw-r--r-- | ansible/roles/uninstall_spec_cpu2006/tasks/main.yaml | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | tests/opnfv/test_cases/opnfv_yardstick_tc078.yaml | 16 | ||||
-rw-r--r-- | yardstick/benchmark/scenarios/compute/spec_cpu.py | 10 |
7 files changed, 23 insertions, 22 deletions
diff --git a/ansible/roles/archive_spec_cpu2006_result/tasks/main.yaml b/ansible/roles/archive_spec_cpu2006_result/tasks/main.yaml index 7f72e1394..0282244ae 100644 --- a/ansible/roles/archive_spec_cpu2006_result/tasks/main.yaml +++ b/ansible/roles/archive_spec_cpu2006_result/tasks/main.yaml @@ -10,6 +10,5 @@ - name: archive_spec_cpu2006_result archive: - path: /usr/cpu2006/result - dest: /usr/cpu2006/spec_cpu2006_result.zip - become: true + path: ~/cpu2006/result + dest: ~/cpu2006/spec_cpu2006_result.zip diff --git a/ansible/roles/fetch_spec_cpu2006_result/tasks/main.yaml b/ansible/roles/fetch_spec_cpu2006_result/tasks/main.yaml index 370ec7a0c..ccc89000c 100644 --- a/ansible/roles/fetch_spec_cpu2006_result/tasks/main.yaml +++ b/ansible/roles/fetch_spec_cpu2006_result/tasks/main.yaml @@ -10,7 +10,6 @@ - name: fetch_spec_cpu2006_result fetch: - src: /usr/cpu2006/spec_cpu2006_result.zip + src: ~/cpu2006/spec_cpu2006_result.zip dest: /tmp/ flat: yes - become: true diff --git a/ansible/roles/install_spec_cpu2006/tasks/main.yaml b/ansible/roles/install_spec_cpu2006/tasks/main.yaml index baa9f6ca0..ea698f5a2 100644 --- a/ansible/roles/install_spec_cpu2006/tasks/main.yaml +++ b/ansible/roles/install_spec_cpu2006/tasks/main.yaml @@ -12,13 +12,11 @@ copy: src: /home/opnfv/repos/yardstick/yardstick/resources/cpu2006-1.2.iso dest: ~/cpu2006-1.2.iso - become: true - name: install SPEC CPU2006 shell: - mount -t iso9660 -o ro,exec ~/cpu2006-1.2.iso /mnt; + sudo mount -t iso9660 -o ro,exec ~/cpu2006-1.2.iso /mnt; cd /mnt; - ./install.sh -fd /usr/cpu2006; + ./install.sh -fd ~/cpu2006; args: executable: /bin/bash - become: true diff --git a/ansible/roles/unarchive_spec_cpu2006_result/tasks/main.yaml b/ansible/roles/unarchive_spec_cpu2006_result/tasks/main.yaml index 86dcc1aeb..07d15d1a9 100644 --- a/ansible/roles/unarchive_spec_cpu2006_result/tasks/main.yaml +++ b/ansible/roles/unarchive_spec_cpu2006_result/tasks/main.yaml @@ -13,4 +13,3 @@ src: /tmp/spec_cpu2006_result.zip dest: /tmp/ remote_src: True - become: true diff --git a/ansible/roles/uninstall_spec_cpu2006/tasks/main.yaml b/ansible/roles/uninstall_spec_cpu2006/tasks/main.yaml index 72d8c93ee..b2a50896e 100644 --- a/ansible/roles/uninstall_spec_cpu2006/tasks/main.yaml +++ b/ansible/roles/uninstall_spec_cpu2006/tasks/main.yaml @@ -10,9 +10,8 @@ - name: remove SPEC CPU 2006 file: - path: /usr/cpu2006 + path: ~/cpu2006 state: absent - become: true - name: umount SPEC CPU 2006 ISO shell: @@ -25,4 +24,3 @@ file: path: ~/cpu2006-1.2.iso state: absent - become: true diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc078.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc078.yaml index d20045b25..e5cf6ce36 100644..100755 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc078.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc078.yaml @@ -10,22 +10,26 @@ schema: "yardstick:task:0.1" description: > - Yardstick TC078 config file; Measure CPU performance using SPEC CPU2006; {% set file = file or "/etc/yardstick/pod.yaml" %} {% set host = host or 'node1' %} +{% set benchmark = benchmark or 'int' %} +{% set runspec_iterations = runspec_iterations or 1 %} +{% set runspec_tune = runspec_tune or 'base' %} +{% set runspec_size = runspec_size or 'ref' %} +{% set runspec_rate = runspec_rate or 1 %} scenarios: - type: SpecCPU2006 options: - SPECint_benchmark: int^429 - runspec_iterations: 1 - runspec_tune: base - runspec_size: ref - runspec_rate: 1 + SPECint_benchmark: {{benchmark}} + runspec_iterations: {{runspec_iterations}} + runspec_tune: {{runspec_tune}} + runspec_size: {{runspec_size}} + runspec_rate: {{runspec_rate}} host: {{host}}.yardstick-TC078 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: |