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

Unified Diff: content/test/gpu/gpu_tests/memory.py

Issue 270343004: Added more details to failures of memory_test on the GPU bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/gpu_tests/memory.py
diff --git a/content/test/gpu/gpu_tests/memory.py b/content/test/gpu/gpu_tests/memory.py
index b56f7375eaa3cdd043d963f90652751139d0dac4..3e1c73be7e3a0e853090faea2e1fc07c7b63164c 100644
--- a/content/test/gpu/gpu_tests/memory.py
+++ b/content/test/gpu/gpu_tests/memory.py
@@ -63,10 +63,10 @@ class _MemoryValidator(page_test.PageTest):
mb_used = counter.samples[-1] / 1048576
if mb_used + WIGGLE_ROOM_MB < SINGLE_TAB_LIMIT_MB:
- raise page_test.Failure('Memory allocation too low')
+ raise page_test.Failure(self._FormatException('low', mb_used))
if mb_used - WIGGLE_ROOM_MB > MEMORY_LIMIT_MB:
- raise page_test.Failure('Memory allocation too high')
+ raise page_test.Failure(self._FormatException('high', mb_used))
def CustomizeBrowserOptions(self, options):
options.AppendExtraBrowserArgs('--enable-logging')
@@ -77,6 +77,10 @@ class _MemoryValidator(page_test.PageTest):
custom_categories = ['webkit.console', 'gpu']
tab.browser.StartTracing(','.join(custom_categories), 60)
+ def _FormatException(self, low_or_high, mb_used):
+ return 'Memory allocation too %s (was %d MB, should be %d MB +/- %d MB)' % (
+ low_or_high, mb_used, SINGLE_TAB_LIMIT_MB, WIGGLE_ROOM_MB)
+
class Memory(test.Test):
"""Tests GPU memory limits"""
test = _MemoryValidator
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698