aboutsummaryrefslogtreecommitdiffstats
path: root/etc/ci/performance/test_runner.py
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-02-07 18:59:03 -0800
committerGitHub <noreply@github.com>2017-02-07 18:59:03 -0800
commite9933f36b771e9aad24b7abcac0ae81b49539d35 (patch)
tree20f79794987390267fd5a94256f329b50564d906 /etc/ci/performance/test_runner.py
parente2b494b1d08b8929ca7e5ae369304f41af81ace2 (diff)
parent7aa3350d4532e77be011167daeae83eeb5c00525 (diff)
downloadservo-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.py28
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: