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

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

Issue 281193002: Fail pixel tests when reference images are missing from cloud storage. (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/pixel.py
diff --git a/content/test/gpu/gpu_tests/pixel.py b/content/test/gpu/gpu_tests/pixel.py
index 7a1e33f18cb4bdcd09ed60795b7c944d0fce8895..b9de793bebe45e1e6111dc9a4419974a83554f40 100644
--- a/content/test/gpu/gpu_tests/pixel.py
+++ b/content/test/gpu/gpu_tests/pixel.py
@@ -12,6 +12,7 @@ import pixel_expectations
from telemetry import test
from telemetry.core import bitmap
+from telemetry.page import cloud_storage
from telemetry.page import page_test
test_data_dir = os.path.abspath(os.path.join(
@@ -81,7 +82,20 @@ class _PixelValidator(cloud_storage_test_base.ValidatorBase):
elif self.options.download_refimg_from_cloud_storage:
# This bot doesn't have the ability to properly generate a
# reference image, so download it from cloud storage.
- ref_png = self._DownloadFromCloudStorage(image_name, page, tab)
+ try:
+ ref_png = self._DownloadFromCloudStorage(image_name, page, tab)
+ except cloud_storage.NotFoundError as e:
+ # There is no reference image yet in cloud storage. This
+ # happens when the revision of the test is incremented or when
+ # a new test is added, because the trybots are not allowed to
+ # produce reference images, only the bots on the main
+ # waterfalls. Report this as a failure so the developer has to
+ # take action by explicitly suppressing the failure and
+ # removing the suppression once the reference images have been
+ # generated. Otherwise silent failures could happen for long
+ # periods of time.
+ raise page_test.Failure('Could not find image %s in cloud storage' %
+ image_name)
else:
# Legacy path using on-disk results.
ref_png = self._GetReferenceImage(self.options.reference_dir,
« 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