Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: scripts/slave/recipe_modules/test_utils/test_api.py

Issue 1372723002: Empty per_page_values shouldn't imply test success (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Remove dead code Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/slave/recipe_modules/chromium_tests/steps.py ('k') | scripts/slave/recipes/chromium_trybot.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/test_utils/test_api.py
diff --git a/scripts/slave/recipe_modules/test_utils/test_api.py b/scripts/slave/recipe_modules/test_utils/test_api.py
index b4b6c0fe02cb05ae270d18ffcdc9dd848d90143f..fa1c93a10276ffd7377cefbb01be4d7476ed2186 100644
--- a/scripts/slave/recipe_modules/test_utils/test_api.py
+++ b/scripts/slave/recipe_modules/test_utils/test_api.py
@@ -112,16 +112,23 @@ class TestUtilsTestApi(recipe_test_api.RecipeTestApi):
ret.retcode = retcode
return ret
- def canned_telemetry_gpu_output(self, passing, is_win, swarming=False):
+ def canned_telemetry_gpu_output(self, passing, is_win, swarming=False,
+ empty_per_page_values=False):
"""Produces a 'json test results' compatible object for telemetry tests."""
- jsonish_results = {
- 'per_page_values': [{'type': 'success' if passing else 'failure',
- 'page_id': 0},
- {'type': 'success',
- 'page_id': 1}],
- 'pages': {'0': {'name': 'Test.Test1'},
- '1': {'name': 'Test.Test2'}},
- }
+ if empty_per_page_values:
+ jsonish_results = {
+ 'per_page_values': [],
+ 'pages': { },
+ }
+ else:
+ jsonish_results = {
+ 'per_page_values': [{'type': 'success' if passing else 'failure',
+ 'page_id': 0},
+ {'type': 'success',
+ 'page_id': 1}],
+ 'pages': {'0': {'name': 'Test.Test1'},
+ '1': {'name': 'Test.Test2'}},
+ }
jsonish_summary = {
'shards': [
« no previous file with comments | « scripts/slave/recipe_modules/chromium_tests/steps.py ('k') | scripts/slave/recipes/chromium_trybot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698