ttfw: save console log to file

This commit is contained in:
He Yin Ling
2020-11-12 20:44:44 +08:00
parent 16a488c405
commit 4e82540730
2 changed files with 25 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ class Env(object):
:keyword env_config_file: test env config file path
:keyword test_name: test suite name, used when generate log folder name
"""
CURRENT_LOG_FOLDER = ""
def __init__(self,
app=None,
@@ -59,6 +60,8 @@ class Env(object):
if not os.path.exists(self.log_path):
os.makedirs(self.log_path)
Env.CURRENT_LOG_FOLDER = self.log_path
self.allocated_duts = dict()
self.lock = threading.RLock()