feat(driver): redirect AUT logs to files
Send application logs to `aut_stdout.log` and `aut_stderr.log` files. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
5d8d7aaa39
commit
47f7a092b0
|
@ -1,5 +1,6 @@
|
|||
import logging
|
||||
|
||||
from os import path
|
||||
from scripts.utils.system_path import SystemPath
|
||||
from . import testpath, timeouts, testrail, squish, system
|
||||
|
||||
|
@ -19,3 +20,8 @@ if AUT_PATH is None:
|
|||
if system.IS_WIN and 'bin' not in AUT_PATH:
|
||||
exit('Please use launcher from "bin" folder in "AUT_PATH"')
|
||||
AUT_PATH = SystemPath(AUT_PATH)
|
||||
|
||||
# Save application logs
|
||||
AUT_DIR = path.dirname(AUT_PATH)
|
||||
AUT_LOGS_STDOUT = path.join(APP_DIR, 'aut_stdout.log')
|
||||
AUT_LOGS_STDERR = path.join(APP_DIR, 'aut_stderr.log')
|
||||
|
|
|
@ -105,7 +105,7 @@ class AUT:
|
|||
f'--LOG_LEVEL={configs.testpath.LOG_LEVEL}',
|
||||
options
|
||||
]
|
||||
self.pid = local_system.execute(command)
|
||||
self.pid = local_system.execute_with_log_files(command)
|
||||
self.attach()
|
||||
assert squish.waitFor(lambda: self.ctx.isRunning, configs.timeouts.PROCESS_TIMEOUT_SEC)
|
||||
return self
|
||||
|
|
Loading…
Reference in New Issue