diff options
author | William Salmon <will.salmon@codethink.co.uk> | 2018-12-20 15:07:49 +0000 |
---|---|---|
committer | William Salmon <will.salmon@codethink.co.uk> | 2019-02-07 09:42:36 +0000 |
commit | 7285e87ec56aad9e88f90e7d8c4524e5cf477bdf (patch) | |
tree | f204d6422d6a04816e14aa988b9ebcd42c01cd0f /tests/frontend/logging.py | |
parent | 1a75b252ba4b91ab4d3c84cb5081d1039d1c3f0f (diff) | |
download | buildstream-7285e87ec56aad9e88f90e7d8c4524e5cf477bdf.tar.gz |
Add more log formatting options
The 'wallclock-us' is a option that we thought we already had.
Diffstat (limited to 'tests/frontend/logging.py')
-rw-r--r-- | tests/frontend/logging.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/frontend/logging.py b/tests/frontend/logging.py index 3243e74bc..ddaadfa26 100644 --- a/tests/frontend/logging.py +++ b/tests/frontend/logging.py @@ -52,7 +52,8 @@ def test_custom_logging(cli, tmpdir, datafiles): element_path = os.path.join(project, 'elements') element_name = 'fetch-test-git.bst' - custom_log_format = '%{elapsed},%{elapsed-us},%{wallclock},%{key},%{element},%{action},%{message}' + custom_log_format = ('%{elapsed},%{elapsed-us},%{wallclock},%{wallclock-us},' + '%{key},%{element},%{action},%{message}') user_config = {'logging': {'message-format': custom_log_format}} cli.configure(user_config) @@ -77,7 +78,8 @@ def test_custom_logging(cli, tmpdir, datafiles): result = cli.run(project=project, args=['source', 'fetch', element_name]) result.assert_success() - m = re.search(r"\d\d:\d\d:\d\d,\d\d:\d\d:\d\d.\d{6},\d\d:\d\d:\d\d,\s*,.*,SUCCESS,Checking sources", result.stderr) + m = re.search(r"\d\d:\d\d:\d\d,\d\d:\d\d:\d\d.\d{6},\d\d:\d\d:\d\d,\d\d:\d\d:\d\d.\d{6}\s*,.*" + r",SUCCESS,Checking sources", result.stderr) assert(m is not None) |