aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar stephana <stephana@google.com>2014-08-18 13:37:59 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-18 13:37:59 -0700
commit3b5c86c7a2db25f82a8415b6c79d1ac580fc64ae (patch)
tree5f32f80a0b26ea505b95c706bd6e3bf963405d16 /gm
parent2a51d7c74cec217195f861677de8998b382b39e4 (diff)
This adds renderMode and builder as columns to the front end when looking at SKPs.
BUG=skia:2833 NOTRY=true R=epoger@google.com Author: stephana@google.com Review URL: https://codereview.chromium.org/480153002
Diffstat (limited to 'gm')
-rw-r--r--gm/gm_json.py3
-rwxr-xr-xgm/rebaseline_server/compare_configs.py2
-rwxr-xr-xgm/rebaseline_server/compare_configs_test.py2
-rwxr-xr-xgm/rebaseline_server/compare_rendered_pictures.py44
-rwxr-xr-xgm/rebaseline_server/compare_rendered_pictures_test.py2
-rwxr-xr-xgm/rebaseline_server/compare_to_expectations.py2
-rwxr-xr-xgm/rebaseline_server/download_actuals.py2
-rwxr-xr-xgm/rebaseline_server/download_actuals_test.py2
-rw-r--r--gm/rebaseline_server/imagediffdb.py2
-rw-r--r--gm/rebaseline_server/imagepairset.py2
-rwxr-xr-xgm/rebaseline_server/results.py2
-rwxr-xr-xgm/rebaseline_server/rs_fixpypath.py (renamed from gm/rebaseline_server/fix_pythonpath.py)0
-rwxr-xr-xgm/rebaseline_server/server.py2
-rw-r--r--gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd/compare_rendered_pictures.json72
-rw-r--r--gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_repo_url/compare_rendered_pictures.json72
15 files changed, 194 insertions, 17 deletions
diff --git a/gm/gm_json.py b/gm/gm_json.py
index 6a91cc4f51..1a53997f41 100644
--- a/gm/gm_json.py
+++ b/gm/gm_json.py
@@ -50,7 +50,8 @@ JSONKEY_ACTUALRESULTS_SUCCEEDED = 'succeeded'
# Descriptions of the result set as a whole.
JSONKEY_DESCRIPTIONS = 'descriptions'
-
+JSONKEY_DESCRIPTIONS_BUILDER = 'builder'
+JSONKEY_DESCRIPTIONS_RENDER_MODE = 'renderMode'
JSONKEY_EXPECTEDRESULTS = 'expected-results'
diff --git a/gm/rebaseline_server/compare_configs.py b/gm/rebaseline_server/compare_configs.py
index 202eec7c02..73a5570cf5 100755
--- a/gm/rebaseline_server/compare_configs.py
+++ b/gm/rebaseline_server/compare_configs.py
@@ -15,7 +15,7 @@ import logging
import time
# Must fix up PYTHONPATH before importing from within Skia
-import fix_pythonpath # pylint: disable=W0611
+import rs_fixpypath # pylint: disable=W0611
# Imports from within Skia
from py.utils import url_utils
diff --git a/gm/rebaseline_server/compare_configs_test.py b/gm/rebaseline_server/compare_configs_test.py
index 0c701e44bf..612be99837 100755
--- a/gm/rebaseline_server/compare_configs_test.py
+++ b/gm/rebaseline_server/compare_configs_test.py
@@ -22,7 +22,7 @@ within self._output_dir_expected, which wouldn't be good...
import os
# Must fix up PYTHONPATH before importing from within Skia
-import fix_pythonpath # pylint: disable=W0611
+import rs_fixpypath # pylint: disable=W0611
# Imports from within Skia
import base_unittest
diff --git a/gm/rebaseline_server/compare_rendered_pictures.py b/gm/rebaseline_server/compare_rendered_pictures.py
index 265f997de9..91bce02eac 100755
--- a/gm/rebaseline_server/compare_rendered_pictures.py
+++ b/gm/rebaseline_server/compare_rendered_pictures.py
@@ -21,7 +21,7 @@ import tempfile
import time
# Must fix up PYTHONPATH before importing from within Skia
-import fix_pythonpath # pylint: disable=W0611
+import rs_fixpypath # pylint: disable=W0611
# Imports from within Skia
from py.utils import git_utils
@@ -47,6 +47,11 @@ COLUMN__RESULT_TYPE = results.KEY__EXTRACOLUMNS__RESULT_TYPE
COLUMN__SOURCE_SKP = 'sourceSkpFile'
COLUMN__TILED_OR_WHOLE = 'tiledOrWhole'
COLUMN__TILENUM = 'tilenum'
+COLUMN__BUILDER_A = 'builderA'
+COLUMN__RENDER_MODE_A = 'renderModeA'
+COLUMN__BUILDER_B = 'builderB'
+COLUMN__RENDER_MODE_B = 'renderModeB'
+
FREEFORM_COLUMN_IDS = [
COLUMN__SOURCE_SKP,
COLUMN__TILENUM,
@@ -56,6 +61,10 @@ ORDERED_COLUMN_IDS = [
COLUMN__SOURCE_SKP,
COLUMN__TILED_OR_WHOLE,
COLUMN__TILENUM,
+ COLUMN__BUILDER_A,
+ COLUMN__RENDER_MODE_A,
+ COLUMN__BUILDER_B,
+ COLUMN__RENDER_MODE_B,
]
# A special "repo:" URL type that we use to refer to Skia repo contents.
@@ -262,6 +271,20 @@ class RenderedPicturesComparisons(results.BaseComparisons):
self._validate_dict_version(dictB)
dictB_results = self.get_default(dictB, {}, setB_section)
+ # get the builders and render modes for each set
+ builder_A = self.get_default(dictA, None,
+ gm_json.JSONKEY_DESCRIPTIONS,
+ gm_json.JSONKEY_DESCRIPTIONS_BUILDER)
+ render_mode_A = self.get_default(dictA, None,
+ gm_json.JSONKEY_DESCRIPTIONS,
+ gm_json.JSONKEY_DESCRIPTIONS_RENDER_MODE)
+ builder_B = self.get_default(dictB, None,
+ gm_json.JSONKEY_DESCRIPTIONS,
+ gm_json.JSONKEY_DESCRIPTIONS_BUILDER)
+ render_mode_B = self.get_default(dictB, None,
+ gm_json.JSONKEY_DESCRIPTIONS,
+ gm_json.JSONKEY_DESCRIPTIONS_RENDER_MODE)
+
skp_names = sorted(set(dictA_results.keys() + dictB_results.keys()))
# Just for manual testing... truncate to an arbitrary subset.
if self.truncate_results:
@@ -277,6 +300,8 @@ class RenderedPicturesComparisons(results.BaseComparisons):
skp_name, gm_json.JSONKEY_SOURCE_WHOLEIMAGE)
imagepairs_for_this_skp.append(self._create_image_pair(
image_dict_A=whole_image_A, image_dict_B=whole_image_B,
+ builder_A=builder_A, render_mode_A=render_mode_A,
+ builder_B=builder_B, render_mode_B=render_mode_B,
source_skp_name=skp_name, tilenum=None))
tiled_images_A = self.get_default(
@@ -295,6 +320,8 @@ class RenderedPicturesComparisons(results.BaseComparisons):
if tile_num < num_tiles_A else None),
image_dict_B=(tiled_images_B[tile_num]
if tile_num < num_tiles_B else None),
+ builder_A=builder_A, render_mode_A=render_mode_A,
+ builder_B=builder_B, render_mode_B=render_mode_B,
source_skp_name=skp_name, tilenum=tile_num))
for one_imagepair in imagepairs_for_this_skp:
@@ -340,13 +367,22 @@ class RenderedPicturesComparisons(results.BaseComparisons):
raise Exception('expected header_revision %d, but got %d' % (
expected_header_revision, header_revision))
- def _create_image_pair(self, image_dict_A, image_dict_B, source_skp_name,
+ def _create_image_pair(self, image_dict_A, image_dict_B,
+ builder_A, render_mode_A,
+ builder_B, render_mode_B,
+ source_skp_name,
tilenum):
"""Creates an ImagePair object for this pair of images.
Args:
image_dict_A: dict with JSONKEY_IMAGE_* keys, or None if no image
image_dict_B: dict with JSONKEY_IMAGE_* keys, or None if no image
+ builder_A: builder that created image set A or None if unknow
+ render_mode_A: render mode used to generate image set A or None if
+ unknown.
+ builder_B: builder that created image set A or None if unknow
+ render_mode_B: render mode used to generate image set A or None if
+ unknown.
source_skp_name: string; name of the source SKP file
tilenum: which tile, or None if a wholeimage
@@ -382,6 +418,10 @@ class RenderedPicturesComparisons(results.BaseComparisons):
extra_columns_dict = {
COLUMN__RESULT_TYPE: result_type,
COLUMN__SOURCE_SKP: source_skp_name,
+ COLUMN__BUILDER_A: builder_A,
+ COLUMN__RENDER_MODE_A: render_mode_A,
+ COLUMN__BUILDER_B: builder_B,
+ COLUMN__RENDER_MODE_B: render_mode_B,
}
if tilenum == None:
extra_columns_dict[COLUMN__TILED_OR_WHOLE] = 'whole'
diff --git a/gm/rebaseline_server/compare_rendered_pictures_test.py b/gm/rebaseline_server/compare_rendered_pictures_test.py
index c8f47e35f1..d6006dc279 100755
--- a/gm/rebaseline_server/compare_rendered_pictures_test.py
+++ b/gm/rebaseline_server/compare_rendered_pictures_test.py
@@ -24,7 +24,7 @@ import posixpath
import subprocess
# Must fix up PYTHONPATH before importing from within Skia
-import fix_pythonpath # pylint: disable=W0611
+import rs_fixpypath # pylint: disable=W0611
# Imports from within Skia
import base_unittest
diff --git a/gm/rebaseline_server/compare_to_expectations.py b/gm/rebaseline_server/compare_to_expectations.py
index 34b248c84b..a93d9b9fdf 100755
--- a/gm/rebaseline_server/compare_to_expectations.py
+++ b/gm/rebaseline_server/compare_to_expectations.py
@@ -17,7 +17,7 @@ import os
import time
# Must fix up PYTHONPATH before importing from within Skia
-import fix_pythonpath # pylint: disable=W0611
+import rs_fixpypath # pylint: disable=W0611
# Imports from within Skia
from py.utils import url_utils
diff --git a/gm/rebaseline_server/download_actuals.py b/gm/rebaseline_server/download_actuals.py
index c17befe92d..c11f1914b2 100755
--- a/gm/rebaseline_server/download_actuals.py
+++ b/gm/rebaseline_server/download_actuals.py
@@ -17,7 +17,7 @@ import re
import urllib2
# Must fix up PYTHONPATH before importing from within Skia
-import fix_pythonpath # pylint: disable=W0611
+import rs_fixpypath # pylint: disable=W0611
# Imports from within Skia
from py.utils import gs_utils
diff --git a/gm/rebaseline_server/download_actuals_test.py b/gm/rebaseline_server/download_actuals_test.py
index c6e7dea8e5..b9822245a3 100755
--- a/gm/rebaseline_server/download_actuals_test.py
+++ b/gm/rebaseline_server/download_actuals_test.py
@@ -22,7 +22,7 @@ within self._output_dir_expected, which wouldn't be good...
import os
# Must fix up PYTHONPATH before importing from within Skia
-import fix_pythonpath # pylint: disable=W0611
+import rs_fixpypath # pylint: disable=W0611
# Imports from within Skia
from py.utils import url_utils
diff --git a/gm/rebaseline_server/imagediffdb.py b/gm/rebaseline_server/imagediffdb.py
index 8142445e91..0bc75cfca4 100644
--- a/gm/rebaseline_server/imagediffdb.py
+++ b/gm/rebaseline_server/imagediffdb.py
@@ -24,7 +24,7 @@ import time
import urllib
# Must fix up PYTHONPATH before importing from within Skia
-import fix_pythonpath # pylint: disable=W0611
+import rs_fixpypath # pylint: disable=W0611
# Imports from within Skia
import find_run_binary
diff --git a/gm/rebaseline_server/imagepairset.py b/gm/rebaseline_server/imagepairset.py
index f6fe09fab7..a6101b9087 100644
--- a/gm/rebaseline_server/imagepairset.py
+++ b/gm/rebaseline_server/imagepairset.py
@@ -13,7 +13,7 @@ ImagePairSet class; see its docstring below.
import posixpath
# Must fix up PYTHONPATH before importing from within Skia
-import fix_pythonpath # pylint: disable=W0611
+import rs_fixpypath # pylint: disable=W0611
# Imports from within Skia
import column
diff --git a/gm/rebaseline_server/results.py b/gm/rebaseline_server/results.py
index b577a92955..11a7d6ecfd 100755
--- a/gm/rebaseline_server/results.py
+++ b/gm/rebaseline_server/results.py
@@ -15,7 +15,7 @@ import os
import re
# Must fix up PYTHONPATH before importing from within Skia
-import fix_pythonpath # pylint: disable=W0611
+import rs_fixpypath # pylint: disable=W0611
# Imports from within Skia
import gm_json
diff --git a/gm/rebaseline_server/fix_pythonpath.py b/gm/rebaseline_server/rs_fixpypath.py
index cc32f4a6bc..cc32f4a6bc 100755
--- a/gm/rebaseline_server/fix_pythonpath.py
+++ b/gm/rebaseline_server/rs_fixpypath.py
diff --git a/gm/rebaseline_server/server.py b/gm/rebaseline_server/server.py
index 8277c46de7..011428b57f 100755
--- a/gm/rebaseline_server/server.py
+++ b/gm/rebaseline_server/server.py
@@ -27,7 +27,7 @@ import urllib
import urlparse
# Must fix up PYTHONPATH before importing from within Skia
-import fix_pythonpath # pylint: disable=W0611
+import rs_fixpypath # pylint: disable=W0611
# Imports from within Skia
from py.utils import gs_utils
diff --git a/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd/compare_rendered_pictures.json b/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd/compare_rendered_pictures.json
index c334459c8e..81366205f1 100644
--- a/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd/compare_rendered_pictures.json
+++ b/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd/compare_rendered_pictures.json
@@ -1,5 +1,53 @@
{
"extraColumnHeaders": {
+ "builderA": {
+ "headerText": "builderA",
+ "isFilterable": true,
+ "isSortable": true,
+ "useFreeformFilter": false,
+ "valuesAndCounts": [
+ [
+ null,
+ 4
+ ]
+ ]
+ },
+ "builderB": {
+ "headerText": "builderB",
+ "isFilterable": true,
+ "isSortable": true,
+ "useFreeformFilter": false,
+ "valuesAndCounts": [
+ [
+ null,
+ 4
+ ]
+ ]
+ },
+ "renderModeA": {
+ "headerText": "renderModeA",
+ "isFilterable": true,
+ "isSortable": true,
+ "useFreeformFilter": false,
+ "valuesAndCounts": [
+ [
+ null,
+ 4
+ ]
+ ]
+ },
+ "renderModeB": {
+ "headerText": "renderModeB",
+ "isFilterable": true,
+ "isSortable": true,
+ "useFreeformFilter": false,
+ "valuesAndCounts": [
+ [
+ null,
+ 4
+ ]
+ ]
+ },
"resultType": {
"headerText": "resultType",
"isFilterable": true,
@@ -73,10 +121,14 @@
"resultType",
"sourceSkpFile",
"tiledOrWhole",
- "tilenum"
+ "tilenum",
+ "builderA",
+ "renderModeA",
+ "builderB",
+ "renderModeB"
],
"header": {
- "dataHash": "-4754972663365911725",
+ "dataHash": "-1510211866509185075",
"isEditable": false,
"isExported": true,
"schemaVersion": 5,
@@ -101,6 +153,10 @@
"imagePairs": [
{
"extraColumns": {
+ "builderA": null,
+ "builderB": null,
+ "renderModeA": null,
+ "renderModeB": null,
"resultType": "failed",
"sourceSkpFile": "changed.skp",
"tiledOrWhole": "whole",
@@ -112,6 +168,10 @@
},
{
"extraColumns": {
+ "builderA": null,
+ "builderB": null,
+ "renderModeA": null,
+ "renderModeB": null,
"resultType": "no-comparison",
"sourceSkpFile": "only-in-after.skp",
"tiledOrWhole": "whole",
@@ -123,6 +183,10 @@
},
{
"extraColumns": {
+ "builderA": null,
+ "builderB": null,
+ "renderModeA": null,
+ "renderModeB": null,
"resultType": "no-comparison",
"sourceSkpFile": "only-in-before.skp",
"tiledOrWhole": "whole",
@@ -134,6 +198,10 @@
},
{
"extraColumns": {
+ "builderA": null,
+ "builderB": null,
+ "renderModeA": null,
+ "renderModeB": null,
"resultType": "succeeded",
"sourceSkpFile": "unchanged.skp",
"tiledOrWhole": "whole",
diff --git a/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_repo_url/compare_rendered_pictures.json b/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_repo_url/compare_rendered_pictures.json
index 099e995436..1c81d5f6fb 100644
--- a/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_repo_url/compare_rendered_pictures.json
+++ b/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_repo_url/compare_rendered_pictures.json
@@ -1,5 +1,53 @@
{
"extraColumnHeaders": {
+ "builderA": {
+ "headerText": "builderA",
+ "isFilterable": true,
+ "isSortable": true,
+ "useFreeformFilter": false,
+ "valuesAndCounts": [
+ [
+ null,
+ 4
+ ]
+ ]
+ },
+ "builderB": {
+ "headerText": "builderB",
+ "isFilterable": true,
+ "isSortable": true,
+ "useFreeformFilter": false,
+ "valuesAndCounts": [
+ [
+ null,
+ 4
+ ]
+ ]
+ },
+ "renderModeA": {
+ "headerText": "renderModeA",
+ "isFilterable": true,
+ "isSortable": true,
+ "useFreeformFilter": false,
+ "valuesAndCounts": [
+ [
+ null,
+ 4
+ ]
+ ]
+ },
+ "renderModeB": {
+ "headerText": "renderModeB",
+ "isFilterable": true,
+ "isSortable": true,
+ "useFreeformFilter": false,
+ "valuesAndCounts": [
+ [
+ null,
+ 4
+ ]
+ ]
+ },
"resultType": {
"headerText": "resultType",
"isFilterable": true,
@@ -73,10 +121,14 @@
"resultType",
"sourceSkpFile",
"tiledOrWhole",
- "tilenum"
+ "tilenum",
+ "builderA",
+ "renderModeA",
+ "builderB",
+ "renderModeB"
],
"header": {
- "dataHash": "-4754972663365911725",
+ "dataHash": "-1510211866509185075",
"isEditable": false,
"isExported": true,
"schemaVersion": 5,
@@ -101,6 +153,10 @@
"imagePairs": [
{
"extraColumns": {
+ "builderA": null,
+ "builderB": null,
+ "renderModeA": null,
+ "renderModeB": null,
"resultType": "failed",
"sourceSkpFile": "changed.skp",
"tiledOrWhole": "whole",
@@ -112,6 +168,10 @@
},
{
"extraColumns": {
+ "builderA": null,
+ "builderB": null,
+ "renderModeA": null,
+ "renderModeB": null,
"resultType": "no-comparison",
"sourceSkpFile": "only-in-after.skp",
"tiledOrWhole": "whole",
@@ -123,6 +183,10 @@
},
{
"extraColumns": {
+ "builderA": null,
+ "builderB": null,
+ "renderModeA": null,
+ "renderModeB": null,
"resultType": "no-comparison",
"sourceSkpFile": "only-in-before.skp",
"tiledOrWhole": "whole",
@@ -134,6 +198,10 @@
},
{
"extraColumns": {
+ "builderA": null,
+ "builderB": null,
+ "renderModeA": null,
+ "renderModeB": null,
"resultType": "succeeded",
"sourceSkpFile": "unchanged.skp",
"tiledOrWhole": "whole",