diff options
author | halliwell <halliwell@chromium.org> | 2015-11-24 15:48:01 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-24 23:49:42 +0000 |
commit | b41d226106441e3c4500a6382bd45aa5296f3169 (patch) | |
tree | e7da35af29eb03bef56109f3979bf086f84f1574 /chromecast | |
parent | 7c0cd4b6f6a54be8994bb80c6c53234b0d64f105 (diff) | |
download | chromium_src-b41d226106441e3c4500a6382bd45aa5296f3169.zip chromium_src-b41d226106441e3c4500a6382bd45aa5296f3169.tar.gz chromium_src-b41d226106441e3c4500a6382bd45aa5296f3169.tar.bz2 |
[Chromecast] Allow individual test filters to take precedence
This attempt to enable specific options for cast_shell_browser_test:
https://codereview.chromium.org/1466633004/
failed (see tot clang_internal builder), because we blanket set
'ozone_platform=headless' for all tests, and these general options
take precedence over test-specific filters.
This change puts the general options first so that test-specific
filters can override. Tried this out on internal CQ and the tests
now run successfully.
BUG=
Review URL: https://codereview.chromium.org/1468283005
Cr-Commit-Position: refs/heads/master@{#361494}
Diffstat (limited to 'chromecast')
-rwxr-xr-x | chromecast/tools/build/generate_test_lists.py | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/chromecast/tools/build/generate_test_lists.py b/chromecast/tools/build/generate_test_lists.py index 46e8b3d..120afd6 100755 --- a/chromecast/tools/build/generate_test_lists.py +++ b/chromecast/tools/build/generate_test_lists.py @@ -24,6 +24,8 @@ def CombineList(test_files_dir, list_output_file, include_filters, list_output_file: Path to write the unit test file out to. include_filters: Whether or not to include the filters when generating the test list. + additional_runtime_options: Arguments to be applied to all tests. These are + applied before filters (so test-specific filters take precedence). """ # GYP targets may provide a numbered priority for the filename. Sort to @@ -45,8 +47,7 @@ def CombineList(test_files_dir, list_output_file, include_filters, for filter_filename in filter_files: with open(filter_filename, "r") as filter_file: for filter_line in filter_file: - filter = filter_line.strip() - test_binary_name = filter.split(" ", 1)[0] + (test_binary_name, filter) = filter_line.strip().split(" ", 1) if test_binary_name not in test_bin_set: raise Exception("Filter found for unknown target: " + @@ -56,19 +57,13 @@ def CombineList(test_files_dir, list_output_file, include_filters, # priority files are evaluated after lower priority files. test_filters[test_binary_name] = filter - test_binaries = ( - list(test_bin_set - set(test_filters.keys())) + - test_filters.values()) - - if additional_runtime_options: - lines = [ - binary + " " + additional_runtime_options - for binary in test_binaries - ] - else: - lines = test_binaries + test_binaries = [ + binary + " " + (additional_runtime_options or "") + + (" " + test_filters[binary] if binary in test_filters else "") + for binary in test_bin_set] + with open(list_output_file, "w") as f: - f.write("\n".join(sorted(lines))) + f.write("\n".join(sorted(test_binaries))) def CreateList(inputs, list_output_file): |