diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-01-30 11:14:21 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-30 11:14:21 -0800 |
commit | 7561883a6938f17d60d6faa1781c7b6b07f457a3 (patch) | |
tree | f034cbbf5b8cc98af2694757c9bffa5d4a6762ca /tests | |
parent | 9cdf78d53d0a101d99e911088a00c677476f5bf1 (diff) | |
parent | a2fe2e60953d0123585f98b0827500863008eb29 (diff) | |
download | servo-7561883a6938f17d60d6faa1781c7b6b07f457a3.tar.gz servo-7561883a6938f17d60d6faa1781c7b6b07f457a3.zip |
Auto merge of #15282 - dpyro:mach-format-single, r=wafflespeanut
Fixed mach/servo logger choice for single files
<!-- Please describe your changes on the following line: -->
Fixed mach/servo logger choice for single files as per @jdm’s [suggestion](https://github.com/servo/servo/issues/15193#issuecomment-275586263).
It’s also possible to do this by checking if the `test_list` path is a directory. This might be trying to make an implementation that is “too smart” though, so I stuck with checking the file extension against `[.html, .htm, .js, .xhtml]` as per the suggestion.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15193 (github issue number if applicable).
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15282)
<!-- Reviewable:end -->
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wpt/run.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/wpt/run.py b/tests/wpt/run.py index 77e21fb75ae..c795220876c 100644 --- a/tests/wpt/run.py +++ b/tests/wpt/run.py @@ -32,7 +32,13 @@ def run_tests(paths=None, **kwargs): mozlog.commandline.log_formatters["servo"] = \ (grouping_formatter.GroupingFormatter, "A grouping output formatter") + use_mach_logging = False if len(kwargs["test_list"]) == 1: + file_ext = os.path.splitext(kwargs["test_list"][0])[1].lower() + if file_ext in [".htm", ".html", ".js", ".xhtml"]: + use_mach_logging = True + + if use_mach_logging: wptrunner.setup_logging(kwargs, {"mach": sys.stdout}) else: wptrunner.setup_logging(kwargs, {"servo": sys.stdout}) |