results.KEY__EXPECTATIONS__REVIEWED,
]
DEFAULT_EXPECTATIONS_DIR = os.path.join(TRUNK_DIRECTORY, 'expectations', 'gm')
+DEFAULT_IGNORE_FAILURES_FILE = 'ignored-tests.txt'
IMAGEPAIR_SET_DESCRIPTIONS = ('expected image', 'actual image')
def __init__(self, actuals_root=results.DEFAULT_ACTUALS_DIR,
expected_root=DEFAULT_EXPECTATIONS_DIR,
+ ignore_failures_file=DEFAULT_IGNORE_FAILURES_FILE,
generated_images_root=results.DEFAULT_GENERATED_IMAGES_ROOT,
diff_base_url=None, builder_regex_list=None):
"""
Args:
actuals_root: root directory containing all actual-results.json files
expected_root: root directory containing all expected-results.json files
+ ignore_failures_file: if a file with this name is found within
+ expected_root, ignore failures for any tests listed in the file
generated_images_root: directory within which to create all pixel diffs;
if this directory does not yet exist, it will be created
diff_base_url: base URL within which the client should look for diff
download_actuals.create_filepath_url(generated_images_root))
self._actuals_root = actuals_root
self._expected_root = expected_root
+ self._ignore_failures_on_these_tests = []
+ if ignore_failures_file:
+ self._ignore_failures_on_these_tests = (
+ ExpectationComparisons._read_noncomment_lines(
+ os.path.join(expected_root, ignore_failures_file)))
self._load_actual_and_expected()
self._timestamp = int(time.time())
logging.info('Results complete; took %d seconds.' %
# categories recorded within the gm_actuals AT ALL, and
# instead evaluate the result_type ourselves based on what
# we see in expectations vs actual checksum?
- # See related http://skbug.com/2514 ('rebaseline_server: apply
- # ignored-tests.txt within rebaseline_server, not just on the bots')
if expected_image_relative_url == actual_image_relative_url:
updated_result_type = results.KEY__RESULT_TYPE__SUCCEEDED
+ elif ((result_type == results.KEY__RESULT_TYPE__FAILED) and
+ (test in self._ignore_failures_on_these_tests)):
+ updated_result_type = results.KEY__RESULT_TYPE__FAILUREIGNORED
else:
updated_result_type = result_type
extra_columns_dict = {
help='Directory containing all expected-result JSON files; defaults to '
'\'%(default)s\' .')
parser.add_argument(
+ '--ignore-failures-file', default=DEFAULT_IGNORE_FAILURES_FILE,
+ help='If a file with this name is found within the EXPECTATIONS dir, '
+ 'ignore failures for any tests listed in the file; defaults to '
+ '\'%(default)s\' .')
+ parser.add_argument(
'--outfile', required=True,
help='File to write result summary into, in JSON format.')
parser.add_argument(
help='Directory within which to download images and generate diffs; '
'defaults to \'%(default)s\' .')
args = parser.parse_args()
- results_obj = ExpectationComparisons(actuals_root=args.actuals,
- expected_root=args.expectations,
- generated_images_root=args.workdir)
+ results_obj = ExpectationComparisons(
+ actuals_root=args.actuals,
+ expected_root=args.expectations,
+ ignore_failures_file=args.ignore_failures_file,
+ generated_images_root=args.workdir)
gm_json.WriteToFile(
results_obj.get_packaged_results_of_type(results_type=args.results),
args.outfile)
{
"actual-results" : {
- "failed" : null,
+ "failed" : {
+ "blanket-ignored_565.png" : [ "bitmap-64bitMD5", 22222222 ],
+ "blanket-ignored_8888.png" : [ "bitmap-64bitMD5", 22222222 ]
+ },
"failure-ignored" : {
"displacement_565.png" : [ "bitmap-64bitMD5", 4569468668668628191 ],
"displacement_8888.png" : [ "bitmap-64bitMD5", 11401048196735046263 ],
],
"ignore-failure" : false
},
+ "blanket-ignored_565.png" : {
+ "allowed-digests" : [
+ [ "bitmap-64bitMD5", 111111111 ]
+ ],
+ "ignore-failure" : false
+ },
+ "blanket-ignored_8888.png" : {
+ "allowed-digests" : [
+ [ "bitmap-64bitMD5", 111111111 ]
+ ],
+ "ignore-failure" : false
+ },
"displacement_565.png" : {
"allowed-digests" : [
[ "bitmap-64bitMD5", 16249664097236120848 ]
],
[
"Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug",
- 15
+ 17
]
]
},
"valuesAndCounts": [
[
"565",
- 9
+ 10
],
[
"8888",
- 9
+ 10
],
[
"gpu",
],
[
"failure-ignored",
- 4
+ 6
],
[
"no-comparison",
2
],
[
+ "blanket-ignored",
+ 2
+ ],
+ [
"displacement",
5
],
}
},
"header": {
- "dataHash": "2775016045957284034",
+ "dataHash": "-7988419419043310401",
"isEditable": false,
"isExported": true,
"schemaVersion": 3,
"extraColumns": {
"builder": "Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug",
"config": "565",
+ "resultType": "failure-ignored",
+ "test": "blanket-ignored"
+ },
+ "imageAUrl": "bitmap-64bitMD5/blanket-ignored/111111111.png",
+ "imageBUrl": "bitmap-64bitMD5/blanket-ignored/22222222.png",
+ "isDifferent": true
+ },
+ {
+ "expectations": {
+ "bugs": null,
+ "ignore-failure": false,
+ "reviewed-by-human": null
+ },
+ "extraColumns": {
+ "builder": "Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug",
+ "config": "8888",
+ "resultType": "failure-ignored",
+ "test": "blanket-ignored"
+ },
+ "imageAUrl": "bitmap-64bitMD5/blanket-ignored/111111111.png",
+ "imageBUrl": "bitmap-64bitMD5/blanket-ignored/22222222.png",
+ "isDifferent": true
+ },
+ {
+ "expectations": {
+ "bugs": null,
+ "ignore-failure": false,
+ "reviewed-by-human": null
+ },
+ "extraColumns": {
+ "builder": "Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug",
+ "config": "565",
"resultType": "succeeded",
"test": "displacement"
},