diff options
author | Max Romanov <max.romanov@nginx.com> | 2021-08-11 19:01:16 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2021-08-11 19:01:16 +0300 |
commit | 9988569beafce7f587f17a9ef710b76e9bfa3165 (patch) | |
tree | ad3eeb25dfe858113ee96b799a170202fea7550d /test | |
parent | 5f67d30ec709ea101870d0a91db8953fc49c7810 (diff) | |
download | unit-9988569beafce7f587f17a9ef710b76e9bfa3165.tar.gz unit-9988569beafce7f587f17a9ef710b76e9bfa3165.tar.bz2 |
Tests: initialising log params before first _print_log().
Diffstat (limited to 'test')
-rw-r--r-- | test/conftest.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/conftest.py b/test/conftest.py index ea3aaf72..4d46e2fc 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -400,6 +400,8 @@ def unit_run(): with open(temp_dir + '/unit.log', 'w') as log: unit_instance['process'] = subprocess.Popen(unitd_args, stderr=log) + Log.temp_dir = temp_dir + if not waitforfiles(temp_dir + '/control.unit.sock'): _print_log() exit('Could not start unit') @@ -409,7 +411,6 @@ def unit_run(): unit_instance['unitd'] = unitd option.temp_dir = temp_dir - Log.temp_dir = temp_dir with open(temp_dir + '/unit.pid', 'r') as f: unit_instance['pid'] = f.read().rstrip() @@ -487,7 +488,7 @@ def _check_alerts(*, log=None): print('skipped.') -def _print_log(log): +def _print_log(log=None): path = Log.get_path() print('Path to unit.log:\n' + path + '\n') |