diff options
author | Kubi <jean.gaoliang@huawei.com> | 2017-02-13 05:10:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-02-13 05:10:41 +0000 |
commit | d45d6aacdd769f07bfc2bad92be57a1c2ccf5d1f (patch) | |
tree | 5793b3f8ba4f24bd90878342d97db7155464c560 | |
parent | f7ee2a6dede65b4861ea78abaf15f9d9b11870dc (diff) | |
parent | 18db73c26a766e8ae0233c60a9fc2e372ee28428 (diff) |
Merge "Push yardstick debug log into the artifacts"
-rw-r--r-- | yardstick/__init__.py | 5 | ||||
-rw-r--r-- | yardstick/common/constants.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/yardstick/__init__.py b/yardstick/__init__.py index 3ae915c18..fbbc101a9 100644 --- a/yardstick/__init__.py +++ b/yardstick/__init__.py @@ -13,12 +13,15 @@ import os import sys import yardstick.vTC.apexlake as apexlake +from yardstick.common import constants +from yardstick.common import utils as yardstick_utils # Hack to be able to run apexlake unit tests # without having to install apexlake. sys.path.append(os.path.dirname(apexlake.__file__)) -LOG_FILE = '/tmp/yardstick.log' +yardstick_utils.makedirs(constants.YARDSTICK_LOG_DIR) +LOG_FILE = os.path.join(constants.YARDSTICK_LOG_DIR, 'yardstick.log') LOG_FORMATTER = ('%(asctime)s ' '%(name)s %(filename)s:%(lineno)d ' '%(levelname)s %(message)s') diff --git a/yardstick/common/constants.py b/yardstick/common/constants.py index e6faf6828..e068c0b98 100644 --- a/yardstick/common/constants.py +++ b/yardstick/common/constants.py @@ -35,6 +35,8 @@ TESTCASE_DIR = join(YARDSTICK_ROOT_PATH, 'tests/opnfv/test_cases/') YARDSTICK_REPOS_DIR = '/home/opnfv/repos/yardstick' +YARDSTICK_LOG_DIR = '/tmp/yardstick/' + YARDSTICK_CONFIG_DIR = '/etc/yardstick/' YARDSTICK_CONFIG_FILE = join(YARDSTICK_CONFIG_DIR, 'yardstick.conf') |