Merge "Log each test case status in a task"
[yardstick.git] / yardstick / benchmark / core / __init__.py
1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 from __future__ import print_function
10
11
12 class Param(object):
13
14     def __init__(self, kwargs):
15         # list
16         self.inputfile = kwargs.get('inputfile')
17         self.task_args = kwargs.get('task-args')
18         self.task_args_file = kwargs.get('task-args-file')
19         self.keep_deploy = kwargs.get('keep-deploy')
20         self.parse_only = kwargs.get('parse-only')
21         self.output_file = kwargs.get('output-file', '/tmp/yardstick.out')
22         self.suite = kwargs.get('suite')
23         self.task_id = kwargs.get('task_id')
24         self.yaml_name = kwargs.get('yaml_name')
25
26         # list
27         self.input_file = kwargs.get('input_file')
28
29         # list
30         self.casename = kwargs.get('casename')
31
32         # list
33         self.type = kwargs.get('type')
34
35
36 def print_hbar(barlen):
37     """print to stdout a horizontal bar"""
38     print("+")
39     print("-" * barlen)
40     print("+")