diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2018-09-04 14:24:27 +0100 |
---|---|---|
committer | richardmaw-codethink <richard.maw@codethink.co.uk> | 2018-09-14 10:28:17 +0000 |
commit | e742746272f31f9e2433999af6d7846fca360717 (patch) | |
tree | d9066678d280364d9c05b57d772ed023b3d8517c /tests/frontend | |
parent | f86ab8f6f5623da2988ab1ea7b83e8a655632177 (diff) | |
download | buildstream-e742746272f31f9e2433999af6d7846fca360717.tar.gz |
tests: Use cli.configure for custom logging test
Overriding the config with a custom config file on the command-line
prevents it merging in the test-specific configuration
and can permit it to attempt to initialise the user's cache.
Diffstat (limited to 'tests/frontend')
-rw-r--r-- | tests/frontend/logging.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/frontend/logging.py b/tests/frontend/logging.py index 4c70895a5..733c7e85d 100644 --- a/tests/frontend/logging.py +++ b/tests/frontend/logging.py @@ -54,8 +54,7 @@ def test_custom_logging(cli, tmpdir, datafiles): custom_log_format = '%{elapsed},%{elapsed-us},%{wallclock},%{key},%{element},%{action},%{message}' user_config = {'logging': {'message-format': custom_log_format}} - user_config_file = str(tmpdir.join('buildstream.conf')) - _yaml.dump(_yaml.node_sanitize(user_config), filename=user_config_file) + cli.configure(user_config) # Create our repo object of the given source type with # the bin files, and then collect the initial ref. @@ -75,7 +74,7 @@ def test_custom_logging(cli, tmpdir, datafiles): element_name)) # Now try to fetch it - result = cli.run(project=project, args=['-c', user_config_file, 'fetch', element_name]) + result = cli.run(project=project, args=['fetch', element_name]) result.assert_success() m = re.search("\d\d:\d\d:\d\d,\d\d:\d\d:\d\d.\d{6},\d\d:\d\d:\d\d,,,SUCCESS,Checking sources", result.stderr) |