aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick')
-rwxr-xr-xyardstick/benchmark/runners/base.py2
-rw-r--r--yardstick/benchmark/scenarios/compute/unixbench_benchmark.bash2
-rw-r--r--yardstick/cmd/commands/task.py15
-rw-r--r--yardstick/tests/integration/dummy-scenario-heat-context.yaml37
4 files changed, 48 insertions, 8 deletions
diff --git a/yardstick/benchmark/runners/base.py b/yardstick/benchmark/runners/base.py
index 99386a440..fbdf6c281 100755
--- a/yardstick/benchmark/runners/base.py
+++ b/yardstick/benchmark/runners/base.py
@@ -121,7 +121,7 @@ class Runner(object):
@staticmethod
def terminate_all():
"""Terminate all runners (subprocesses)"""
- log.debug("Terminating all runners", exc_info=True)
+ log.debug("Terminating all runners")
# release dumper process as some errors before any runner is created
if not Runner.runners:
diff --git a/yardstick/benchmark/scenarios/compute/unixbench_benchmark.bash b/yardstick/benchmark/scenarios/compute/unixbench_benchmark.bash
index 5a5dbc394..9f1804819 100644
--- a/yardstick/benchmark/scenarios/compute/unixbench_benchmark.bash
+++ b/yardstick/benchmark/scenarios/compute/unixbench_benchmark.bash
@@ -18,7 +18,7 @@ OUTPUT_FILE=/tmp/unixbench-out.log
# run unixbench test
run_unixbench()
{
- cd /opt/tempT/UnixBench/
+ cd /opt/tempT/UnixBench/UnixBench/
./Run $OPTIONS > $OUTPUT_FILE
}
diff --git a/yardstick/cmd/commands/task.py b/yardstick/cmd/commands/task.py
index a3488a23d..c6379e586 100644
--- a/yardstick/cmd/commands/task.py
+++ b/yardstick/cmd/commands/task.py
@@ -25,6 +25,7 @@ class TaskCommands(object): # pragma: no cover
Set of commands to manage benchmark tasks.
"""
+ EXIT_TEST_FAILED = 2
@cliargs("inputfile", type=str, help="path to task or suite file", nargs=1)
@cliargs("--task-args", dest="task_args",
@@ -48,18 +49,20 @@ class TaskCommands(object): # pragma: no cover
param = change_osloobj_to_paras(args)
self.output_file = param.output_file
- result = {}
LOG.info('Task START')
try:
result = Task().start(param, **kwargs)
except Exception as e: # pylint: disable=broad-except
self._write_error_data(e)
-
- if result.get('result', {}).get('criteria') == 'PASS':
- LOG.info('Task SUCCESS')
- else:
LOG.info('Task FAILED')
- raise RuntimeError('Task Failed')
+ raise
+ else:
+ if result.get('result', {}).get('criteria') == 'PASS':
+ LOG.info('Task SUCCESS')
+ else:
+ LOG.info('Task FAILED')
+ # exit without backtrace
+ raise SystemExit(self.EXIT_TEST_FAILED)
def _write_error_data(self, error):
data = {'status': 2, 'result': str(error)}
diff --git a/yardstick/tests/integration/dummy-scenario-heat-context.yaml b/yardstick/tests/integration/dummy-scenario-heat-context.yaml
new file mode 100644
index 000000000..7c980b412
--- /dev/null
+++ b/yardstick/tests/integration/dummy-scenario-heat-context.yaml
@@ -0,0 +1,37 @@
+##############################################################################
+# Copyright (c) 2018 Intel
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# Sample Heat context config with Dummy context
+
+schema: "yardstick:task:0.1"
+
+scenarios:
+-
+ type: Dummy
+
+ runner:
+ type: Duration
+ duration: 5
+ interval: 1
+
+context:
+ name: {{ context_name }}
+ image: cirros-0.3.5
+ flavor: cirros256
+ user: cirros
+
+ servers:
+ athena:
+ name: athena
+ ares:
+ name: ares
+
+ networks:
+ test:
+ name: test