diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-01-31 14:56:19 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-01-31 15:43:04 +0100 |
commit | 8bb942ef25c40014ca952e26fc70f927ab1694ff (patch) | |
tree | a667e166c9413dae7f7ce67e2faa4fe03039558b /run_unittests.py | |
parent | be3c58d6388c845fdde4374258dbb4ffbe18c5ca (diff) | |
download | meson-8bb942ef25c40014ca952e26fc70f927ab1694ff.zip meson-8bb942ef25c40014ca952e26fc70f927ab1694ff.tar.gz meson-8bb942ef25c40014ca952e26fc70f927ab1694ff.tar.bz2 |
Rewriter infodump modifications
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/run_unittests.py b/run_unittests.py index 5539a70..d68912f 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -5022,7 +5022,7 @@ class PythonTests(BasePlatformTests): class RewriterTests(BasePlatformTests): - data_regex = re.compile(r'^\s*!!\s*(\w+)\s+([^=]+)=(.*)$') + data_regex = re.compile(r'.*\n!!==JSON DUMP: BEGIN==!!\n(.*)\n!!==JSON DUMP: END==!!\n', re.MULTILINE | re.DOTALL) def setUp(self): super().setUp() @@ -5045,17 +5045,10 @@ class RewriterTests(BasePlatformTests): return p.stdout def extract_test_data(self, out): - lines = out.split('\n') + match = RewriterTests.data_regex.match(out) result = {} - for i in lines: - match = RewriterTests.data_regex.match(i) - if match: - typ = match.group(1) - id = match.group(2) - data = json.loads(match.group(3)) - if typ not in result: - result[typ] = {} - result[typ][id] = data + if match: + result = json.loads(match.group(1)) return result def test_target_source_list(self): |