diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-02-07 18:59:03 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 18:59:03 -0800 |
commit | e9933f36b771e9aad24b7abcac0ae81b49539d35 (patch) | |
tree | 20f79794987390267fd5a94256f329b50564d906 /etc/ci/performance/test_runner.py | |
parent | e2b494b1d08b8929ca7e5ae369304f41af81ace2 (diff) | |
parent | 7aa3350d4532e77be011167daeae83eeb5c00525 (diff) | |
download | servo-e9933f36b771e9aad24b7abcac0ae81b49539d35.tar.gz servo-e9933f36b771e9aad24b7abcac0ae81b49539d35.zip |
Auto merge of #15067 - shinglyu:stylo-perf-async, r=Manishearth
Added async performance test
<!-- Please describe your changes on the following line: -->
Add a new way to test arbitrary timing from JavaScript (only for Gecko). This is for Stylo testing.
---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- 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/15067)
<!-- Reviewable:end -->
Diffstat (limited to 'etc/ci/performance/test_runner.py')
-rw-r--r-- | etc/ci/performance/test_runner.py | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/etc/ci/performance/test_runner.py b/etc/ci/performance/test_runner.py index c7b0c2b7011..27bbf598b34 100644 --- a/etc/ci/performance/test_runner.py +++ b/etc/ci/performance/test_runner.py @@ -163,6 +163,7 @@ def test_log_parser_empty(): expected = [{ "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/index.html", + "title": "", "navigationStart": 0, "unloadEventStart": -1, "unloadEventEnd": -1, @@ -195,6 +196,7 @@ def test_log_parser_error(): expected = [{ "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/index.html", + "title": "", "navigationStart": 0, "unloadEventStart": -1, "unloadEventEnd": -1, @@ -254,6 +256,7 @@ Shutting down the Constellation after generating an output file or exit flag spe expected = [{ "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/index.html", + "title": "", "navigationStart": 0, "unloadEventStart": -1, "unloadEventEnd": -1, @@ -290,9 +293,22 @@ http://localhost/page_load_test/tp5n/aljazeera.net/aljazeera.net/portal.html # Disabled! http://localhost/page_load_test/tp5n/aljazeera.net/aljazeera.net/portal.html ''' expected = [ - "http://localhost/page_load_test/tp5n/163.com/www.163.com/index.html", - "http://localhost/page_load_test/tp5n/56.com/www.56.com/index.html", - "http://localhost/page_load_test/tp5n/aljazeera.net/aljazeera.net/portal.html" + ("http://localhost/page_load_test/tp5n/163.com/www.163.com/index.html", False), + ("http://localhost/page_load_test/tp5n/56.com/www.56.com/index.html", False), + ("http://localhost/page_load_test/tp5n/aljazeera.net/aljazeera.net/portal.html", False) + ] + assert(expected == list(runner.parse_manifest(text))) + + +def test_manifest_loader_async(): + + text = ''' +http://localhost/page_load_test/tp5n/163.com/www.163.com/index.html +async http://localhost/page_load_test/tp5n/56.com/www.56.com/index.html +''' + expected = [ + ("http://localhost/page_load_test/tp5n/163.com/www.163.com/index.html", False), + ("http://localhost/page_load_test/tp5n/56.com/www.56.com/index.html", True), ] assert(expected == list(runner.parse_manifest(text))) @@ -315,7 +331,7 @@ def test_filter_result_by_manifest(): }] manifest = [ - "http://localhost:8000/page_load_test/56.com/www.56.com/index.html", + ("http://localhost:8000/page_load_test/56.com/www.56.com/index.html", False) ] assert(expected == runner.filter_result_by_manifest(input_json, manifest)) @@ -328,8 +344,8 @@ def test_filter_result_by_manifest_error(): }] manifest = [ - "1.html", - "2.html" + ("1.html", False), + ("2.html", False) ] with pytest.raises(Exception) as execinfo: |