aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/__init__.py
diff options
context:
space:
mode:
authorrexlee8776 <limingjiang@huawei.com>2016-12-29 11:03:31 +0000
committerRex Lee <limingjiang@huawei.com>2017-02-06 09:26:57 +0000
commit18db73c26a766e8ae0233c60a9fc2e372ee28428 (patch)
tree7e87fef762853b1478065f431590e16356ff2c68 /yardstick/__init__.py
parent4b86cc0678bcbd2ad2aac571bb40eb97a7ea65f7 (diff)
Push yardstick debug log into the artifacts
the log directory should be specific yardstick so it can be easily pushed into artifacts with the directory. JIRA: YARDSTICK-507 Change-Id: If28b0c3938e123c8a55272cb98291fb76aaf6f9e Signed-off-by: rexlee8776 <limingjiang@huawei.com>
Diffstat (limited to 'yardstick/__init__.py')
-rw-r--r--yardstick/__init__.py5
1 files changed, 4 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')