summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-07-03 18:43:16 +0200
committerFlorian Bruhin <me@the-compiler.org>2020-07-03 18:56:54 +0200
commitf916965cd57ef5d373758e64bee07548e0d63be8 (patch)
tree5cd69c2974276fa036deb1b1467152569022d242
parent34f66cf4a8aa8e6311d2c8fea75e8b83e3088a8a (diff)
downloadqutebrowser-f916965cd57ef5d373758e64bee07548e0d63be8.tar.gz
qutebrowser-f916965cd57ef5d373758e64bee07548e0d63be8.zip
problemmatchers: Write multiple files
-rw-r--r--scripts/dev/ci/problemmatchers.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/scripts/dev/ci/problemmatchers.py b/scripts/dev/ci/problemmatchers.py
index 876d00a90..0f8ce8d1f 100644
--- a/scripts/dev/ci/problemmatchers.py
+++ b/scripts/dev/ci/problemmatchers.py
@@ -168,13 +168,10 @@ MATCHERS = {
}
-def add_matcher(output_dir, testenv, data):
-
- for idx, sub_data in enumerate(data):
- sub_data['owner'] = '{}-{}'.format(testenv, idx)
- out_data = {'problemMatcher': data}
-
- output_file = output_dir / '{}.json'.format(testenv)
+def add_matcher(output_dir, owner, data):
+ data['owner'] = owner
+ out_data = {'problemMatcher': [data]}
+ output_file = output_dir / '{}.json'.format(owner)
with output_file.open('w', encoding='utf-8') as f:
json.dump(out_data, f)
@@ -191,9 +188,9 @@ def main(testenv, tempdir):
output_dir = pathlib.Path(tempdir)
- add_matcher(output_dir=output_dir,
- testenv=testenv,
- data=MATCHERS[testenv])
+ for idx, data in enumerate(MATCHERS[testenv]):
+ owner = '{}-{}'.format(testenv, idx)
+ add_matcher(output_dir=output_dir, owner=owner, data=data)
if __name__ == '__main__':