Add live Javascript viewer for GM expectations

BUG=skia:1599

This is similar to the live viewer for GM actuals, at
https://skia-autogen.googlecode.com/svn/gm-actual/view.html

It will be the basis for GM expectations analysis as described in bug 1599.

R=rmistry@google.com

Review URL: https://codereview.chromium.org/23493024

git-svn-id: http://skia.googlecode.com/svn/trunk@11280 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
epoger@google.com 2013-09-15 02:18:07 +00:00
parent dc9888c409
commit 7687a83272
2 changed files with 205 additions and 0 deletions

52
expectations/gm/loader.js Normal file
View File

@ -0,0 +1,52 @@
/*
* GMExpectedResultsLoader:
* Reads an expected-results.json file, and imports its data into $scope.
*/
var GMExpectedResultsLoader = angular.module(
'GMExpectedResultsLoader',
[],
function($httpProvider) {
/* Override transformResponse so that the numeric checksums are interpreted as
* strings instead, since Javascript cannot handle 64-bit integers. */
$httpProvider.defaults.transformResponse = function(data, headersGetter) {
return JSON.parse(data.replace(/\s(\d+)\s/g, " \"$1\" "));
}
}
);
GMExpectedResultsLoader.controller(
'GMExpectedResultsLoader.Controller',
function($scope, $http) {
/* When the changePlatformPath function is called, download expected-results.json
* from the desired platform directory.
*
* When the JSON is received, predigest it and return it to the frontend as
* $scope.gmExpectedResults .
*/
$scope.changePlatformPath = function() {
$http.get($scope.platformPath + "/expected-results.json").success(
function(response) {
var jsonResults = [];
var imageNameRegex = /^(.+)_([^_]+).png/;
angular.forEach(response['expected-results'], function(imageExpectations, imageName) {
var matched = imageNameRegex.exec(imageName);
var allowedImages = [];
angular.forEach(imageExpectations['allowed-digests'], function(allowedDigest, key) {
var thisImage = {
hashType: allowedDigest[0], hashValue: allowedDigest[1]
};
allowedImages.push(thisImage);
});
var thisResult = {
test: matched[1], config: matched[2],
allowedImages: allowedImages,
bugs: imageExpectations['bugs'],
reviewedByHuman: imageExpectations['reviewed-by-human']
};
jsonResults.push(thisResult);
});
$scope.gmExpectedResults = jsonResults;
}
);
};
}
);

View File

@ -0,0 +1,153 @@
<!DOCTYPE html>
<html ng-app="GMExpectedResultsLoader">
<head>
<title>View GM Expected Results for One Platform</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>
<script src="loader.js"></script>
</head>
<body>
<div ng-controller="GMExpectedResultsLoader.Controller" >
Pick a platform...
<select ng-model="platformPath" ng-change="changePlatformPath()">
<!-- Generated the option lines as follows:
$ cd expectations/gm
$ ALL=$(ls -d Test*)
$ for ONE in $ALL; do echo " <option value=\"$ONE\">$ONE</option>"; done
TODO(epoger): Once https://code.google.com/p/skia/issues/detail?id=1544
('live query of builder list makes rebaseline.py slow to start up') has been
resolved, we should use similar techniques to populate this list automatically.
-->
<option value="Test-Android-GalaxyNexus-SGX540-Arm7-Debug">Test-Android-GalaxyNexus-SGX540-Arm7-Debug</option>
<option value="Test-Android-GalaxyNexus-SGX540-Arm7-Debug-Trybot">Test-Android-GalaxyNexus-SGX540-Arm7-Debug-Trybot</option>
<option value="Test-Android-GalaxyNexus-SGX540-Arm7-Release">Test-Android-GalaxyNexus-SGX540-Arm7-Release</option>
<option value="Test-Android-GalaxyNexus-SGX540-Arm7-Release-Trybot">Test-Android-GalaxyNexus-SGX540-Arm7-Release-Trybot</option>
<option value="Test-Android-IntelRhb-SGX544-x86-Debug">Test-Android-IntelRhb-SGX544-x86-Debug</option>
<option value="Test-Android-IntelRhb-SGX544-x86-Debug-Trybot">Test-Android-IntelRhb-SGX544-x86-Debug-Trybot</option>
<option value="Test-Android-IntelRhb-SGX544-x86-Release">Test-Android-IntelRhb-SGX544-x86-Release</option>
<option value="Test-Android-Nexus10-MaliT604-Arm7-Debug">Test-Android-Nexus10-MaliT604-Arm7-Debug</option>
<option value="Test-Android-Nexus10-MaliT604-Arm7-Release">Test-Android-Nexus10-MaliT604-Arm7-Release</option>
<option value="Test-Android-Nexus4-Adreno320-Arm7-Debug">Test-Android-Nexus4-Adreno320-Arm7-Debug</option>
<option value="Test-Android-Nexus4-Adreno320-Arm7-Debug-Trybot">Test-Android-Nexus4-Adreno320-Arm7-Debug-Trybot</option>
<option value="Test-Android-Nexus4-Adreno320-Arm7-Release">Test-Android-Nexus4-Adreno320-Arm7-Release</option>
<option value="Test-Android-Nexus4-Adreno320-Arm7-Release-Trybot">Test-Android-Nexus4-Adreno320-Arm7-Release-Trybot</option>
<option value="Test-Android-Nexus7-Tegra3-Arm7-Debug">Test-Android-Nexus7-Tegra3-Arm7-Debug</option>
<option value="Test-Android-Nexus7-Tegra3-Arm7-Debug-Trybot">Test-Android-Nexus7-Tegra3-Arm7-Debug-Trybot</option>
<option value="Test-Android-Nexus7-Tegra3-Arm7-Release">Test-Android-Nexus7-Tegra3-Arm7-Release</option>
<option value="Test-Android-NexusS-SGX540-Arm7-Debug">Test-Android-NexusS-SGX540-Arm7-Debug</option>
<option value="Test-Android-NexusS-SGX540-Arm7-Debug-Trybot">Test-Android-NexusS-SGX540-Arm7-Debug-Trybot</option>
<option value="Test-Android-NexusS-SGX540-Arm7-Release">Test-Android-NexusS-SGX540-Arm7-Release</option>
<option value="Test-Android-RazrI-SGX540-x86-Debug">Test-Android-RazrI-SGX540-x86-Debug</option>
<option value="Test-Android-RazrI-SGX540-x86-Release">Test-Android-RazrI-SGX540-x86-Release</option>
<option value="Test-Android-Xoom-Tegra2-Arm7-Debug">Test-Android-Xoom-Tegra2-Arm7-Debug</option>
<option value="Test-Android-Xoom-Tegra2-Arm7-Release">Test-Android-Xoom-Tegra2-Arm7-Release</option>
<option value="Test-ChromeOS-Alex-GMA3150-x86-Debug">Test-ChromeOS-Alex-GMA3150-x86-Debug</option>
<option value="Test-ChromeOS-Alex-GMA3150-x86-Debug-Trybot">Test-ChromeOS-Alex-GMA3150-x86-Debug-Trybot</option>
<option value="Test-ChromeOS-Alex-GMA3150-x86-Release">Test-ChromeOS-Alex-GMA3150-x86-Release</option>
<option value="Test-ChromeOS-Alex-GMA3150-x86-Release-Trybot">Test-ChromeOS-Alex-GMA3150-x86-Release-Trybot</option>
<option value="Test-ChromeOS-Daisy-MaliT604-Arm7-Debug">Test-ChromeOS-Daisy-MaliT604-Arm7-Debug</option>
<option value="Test-ChromeOS-Daisy-MaliT604-Arm7-Debug-Trybot">Test-ChromeOS-Daisy-MaliT604-Arm7-Debug-Trybot</option>
<option value="Test-ChromeOS-Daisy-MaliT604-Arm7-Release">Test-ChromeOS-Daisy-MaliT604-Arm7-Release</option>
<option value="Test-ChromeOS-Daisy-MaliT604-Arm7-Release-Trybot">Test-ChromeOS-Daisy-MaliT604-Arm7-Release-Trybot</option>
<option value="Test-ChromeOS-Link-HD4000-x86_64-Debug">Test-ChromeOS-Link-HD4000-x86_64-Debug</option>
<option value="Test-ChromeOS-Link-HD4000-x86_64-Debug-Trybot">Test-ChromeOS-Link-HD4000-x86_64-Debug-Trybot</option>
<option value="Test-ChromeOS-Link-HD4000-x86_64-Release">Test-ChromeOS-Link-HD4000-x86_64-Release</option>
<option value="Test-ChromeOS-Link-HD4000-x86_64-Release-Trybot">Test-ChromeOS-Link-HD4000-x86_64-Release-Trybot</option>
<option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug">Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug</option>
<option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug-Trybot">Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug-Trybot</option>
<option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release">Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release</option>
<option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release-Trybot">Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release-Trybot</option>
<option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86-Debug">Test-Mac10.6-MacMini4.1-GeForce320M-x86-Debug</option>
<option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86-Debug-Trybot">Test-Mac10.6-MacMini4.1-GeForce320M-x86-Debug-Trybot</option>
<option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release">Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release</option>
<option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release-Trybot">Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release-Trybot</option>
<option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug">Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug</option>
<option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug-Trybot">Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug-Trybot</option>
<option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Release">Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Release</option>
<option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Release-Trybot">Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Release-Trybot</option>
<option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86-Debug">Test-Mac10.7-MacMini4.1-GeForce320M-x86-Debug</option>
<option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86-Debug-Trybot">Test-Mac10.7-MacMini4.1-GeForce320M-x86-Debug-Trybot</option>
<option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release">Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release</option>
<option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release-Trybot">Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release-Trybot</option>
<option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug">Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug</option>
<option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug-Trybot">Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug-Trybot</option>
<option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Release">Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Release</option>
<option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Release-Trybot">Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Release-Trybot</option>
<option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86-Debug">Test-Mac10.8-MacMini4.1-GeForce320M-x86-Debug</option>
<option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86-Debug-Trybot">Test-Mac10.8-MacMini4.1-GeForce320M-x86-Debug-Trybot</option>
<option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86-Release">Test-Mac10.8-MacMini4.1-GeForce320M-x86-Release</option>
<option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86-Release-Trybot">Test-Mac10.8-MacMini4.1-GeForce320M-x86-Release-Trybot</option>
<option value="Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Debug">Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Debug</option>
<option value="Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Debug-Trybot">Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Debug-Trybot</option>
<option value="Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Release">Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Release</option>
<option value="Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Release-Trybot">Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Release-Trybot</option>
<option value="Test-Ubuntu12-ShuttleA-ATI5770-x86-Debug">Test-Ubuntu12-ShuttleA-ATI5770-x86-Debug</option>
<option value="Test-Ubuntu12-ShuttleA-ATI5770-x86-Debug-Trybot">Test-Ubuntu12-ShuttleA-ATI5770-x86-Debug-Trybot</option>
<option value="Test-Ubuntu12-ShuttleA-ATI5770-x86-Release">Test-Ubuntu12-ShuttleA-ATI5770-x86-Release</option>
<option value="Test-Ubuntu12-ShuttleA-ATI5770-x86-Release-Trybot">Test-Ubuntu12-ShuttleA-ATI5770-x86-Release-Trybot</option>
<option value="Test-Ubuntu12-ShuttleA-HD2000-x86_64-Release-Valgrind">Test-Ubuntu12-ShuttleA-HD2000-x86_64-Release-Valgrind</option>
<option value="Test-Ubuntu12-ShuttleA-HD2000-x86_64-Release-Valgrind-Trybot">Test-Ubuntu12-ShuttleA-HD2000-x86_64-Release-Valgrind-Trybot</option>
<option value="Test-Ubuntu12-ShuttleA-NoGPU-x86_64-Debug">Test-Ubuntu12-ShuttleA-NoGPU-x86_64-Debug</option>
<option value="Test-Ubuntu12-ShuttleA-NoGPU-x86_64-Debug-Trybot">Test-Ubuntu12-ShuttleA-NoGPU-x86_64-Debug-Trybot</option>
<option value="Test-Ubuntu13-ShuttleA-HD2000-x86_64-Debug-ASAN">Test-Ubuntu13-ShuttleA-HD2000-x86_64-Debug-ASAN</option>
<option value="Test-Ubuntu13-ShuttleA-HD2000-x86_64-Debug-ASAN-Trybot">Test-Ubuntu13-ShuttleA-HD2000-x86_64-Debug-ASAN-Trybot</option>
<option value="Test-Win7-ShuttleA-HD2000-x86_64-Debug">Test-Win7-ShuttleA-HD2000-x86_64-Debug</option>
<option value="Test-Win7-ShuttleA-HD2000-x86_64-Debug-Trybot">Test-Win7-ShuttleA-HD2000-x86_64-Debug-Trybot</option>
<option value="Test-Win7-ShuttleA-HD2000-x86_64-Release">Test-Win7-ShuttleA-HD2000-x86_64-Release</option>
<option value="Test-Win7-ShuttleA-HD2000-x86_64-Release-Trybot">Test-Win7-ShuttleA-HD2000-x86_64-Release-Trybot</option>
<option value="Test-Win7-ShuttleA-HD2000-x86-Debug">Test-Win7-ShuttleA-HD2000-x86-Debug</option>
<option value="Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE">Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE</option>
<option value="Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE-Trybot">Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE-Trybot</option>
<option value="Test-Win7-ShuttleA-HD2000-x86-Debug-DirectWrite">Test-Win7-ShuttleA-HD2000-x86-Debug-DirectWrite</option>
<option value="Test-Win7-ShuttleA-HD2000-x86-Debug-DirectWrite-Trybot">Test-Win7-ShuttleA-HD2000-x86-Debug-DirectWrite-Trybot</option>
<option value="Test-Win7-ShuttleA-HD2000-x86-Debug-Trybot">Test-Win7-ShuttleA-HD2000-x86-Debug-Trybot</option>
<option value="Test-Win7-ShuttleA-HD2000-x86-Release">Test-Win7-ShuttleA-HD2000-x86-Release</option>
<option value="Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE">Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE</option>
<option value="Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE-Trybot">Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE-Trybot</option>
<option value="Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite">Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite</option>
<option value="Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite-Trybot">Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite-Trybot</option>
<option value="Test-Win7-ShuttleA-HD2000-x86-Release-Trybot">Test-Win7-ShuttleA-HD2000-x86-Release-Trybot</option>
</select>
<p>
Expected GM results for platform {{platformPath}}:
<table border="1">
<tr>
<th>Test/Config</th>
<th>Allowed Images</th>
<th>Bugs</th>
<th>Reviewed By Human?</th>
</tr>
<tr ng-repeat="result in gmExpectedResults">
<td>{{result.test}}_{{result.config}}</td>
<td><span ng-repeat="image in result.allowedImages">
<a target="_blank"
href="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{image.hashType}}/{{result.test}}/{{image.hashValue}}.png">
{{image.hashValue}}</a><br>
</span></td>
<td><span ng-repeat="bug in result.bugs">
<a href="https://code.google.com/p/skia/issues/detail?id={{bug}}">{{bug}} </a>
</span></td>
<td>{{result.reviewedByHuman}}</td>
</tr>
</table>
</div>
<!-- TODO(epoger): Can we get the base URLs (commondatastorage and
issues list) from
http://skia.googlecode.com/svn/buildbot/site_config/global_variables.json ?
I tried importing the
http://skia.googlecode.com/svn/buildbot/skia_tools.js script and using
that to do so, but I got Access-Control-Allow-Origin errors.
-->
</body>
</html>