Make Gold tests always use --passfail
Makes all uses of Skia Gold for the GPU pixel tests always pass
--passfail to goldctl. The way the GPU tests use Gold (per-test uploads
instead of batched uploads) requires that --passfail always be passed,
so not doing so just results in unhelpful errors and images not being
uploaded to Gold when they should be.
Bug: 850107
Change-Id: I2c09a5104bf47d9d17eb1f9472669f11f07fcb76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1620694
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661478}
diff --git a/content/test/gpu/gpu_tests/cloud_storage_integration_test_base.py b/content/test/gpu/gpu_tests/cloud_storage_integration_test_base.py
index 60d31ec..dd541f53 100644
--- a/content/test/gpu/gpu_tests/cloud_storage_integration_test_base.py
+++ b/content/test/gpu/gpu_tests/cloud_storage_integration_test_base.py
@@ -426,8 +426,7 @@
return 'None' if num == None else self.ToHex(num)
def _UploadTestResultToSkiaGold(self, image_name, screenshot,
- tab, page,
- is_check_mode=True, build_id_args=None):
+ tab, page, build_id_args=None):
if build_id_args is None:
raise Exception('Requires build args to be specified, including --commit')
if self._skia_gold_temp_dir is None:
@@ -447,7 +446,7 @@
'msaa': str(ref_img_params.msaa),
'model_name': str(ref_img_params.model_name),
}
- mode = ['--passfail'] if is_check_mode else []
+ mode = ['--passfail']
json_temp_file = tempfile.NamedTemporaryFile(suffix='.json').name
failure_file = tempfile.NamedTemporaryFile(suffix='.txt').name
with open(json_temp_file, 'w+') as f:
@@ -499,8 +498,6 @@
self._UploadTestResultToSkiaGold(
image_name, screenshot,
tab, page,
- # Always upload because we already did the check locally.
- is_check_mode=False,
build_id_args=build_id_args)
else:
self._WriteErrorImages(
diff --git a/content/test/gpu/gpu_tests/pixel_integration_test.py b/content/test/gpu/gpu_tests/pixel_integration_test.py
index b96e8e3..5e87c0d 100644
--- a/content/test/gpu/gpu_tests/pixel_integration_test.py
+++ b/content/test/gpu/gpu_tests/pixel_integration_test.py
@@ -287,7 +287,6 @@
self._UploadTestResultToSkiaGold(
image_name, screenshot,
tab, page,
- is_check_mode=True,
build_id_args=build_id_args)
except CalledProcessError:
self.fail('Gold said the test failed, so fail.')