OLD | NEW |
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 29 matching lines...) Expand all Loading... |
40 _log = logging.getLogger(__name__) | 40 _log = logging.getLogger(__name__) |
41 | 41 |
42 | 42 |
43 class BotTestExpectations(object): | 43 class BotTestExpectations(object): |
44 RLE_LENGTH = 0 | 44 RLE_LENGTH = 0 |
45 RLE_VALUE = 1 | 45 RLE_VALUE = 1 |
46 RESULTS_KEY = 'results' | 46 RESULTS_KEY = 'results' |
47 TESTS_KEY = 'tests' | 47 TESTS_KEY = 'tests' |
48 RESULTS_URL_PREFIX = 'http://test-results.appspot.com/testfile?master=Chromi
umWebkit&testtype=layout-tests&name=results-small.json&builder=' | 48 RESULTS_URL_PREFIX = 'http://test-results.appspot.com/testfile?master=Chromi
umWebkit&testtype=layout-tests&name=results-small.json&builder=' |
49 | 49 |
50 # FIXME: This map should be generated from data in json_layout_results_gener
ator.py and test_expectations.py. | 50 # FIXME: This data is now in the results json. Get it from there. |
51 MAP_ENCODED_RESULT_STRING_TO_EXPECTATIONS_VALUE = { | 51 MAP_ENCODED_RESULT_STRING_TO_EXPECTATIONS_VALUE = { |
52 'P': 'Pass', | 52 'P': 'Pass', |
53 'N': '', # No data | 53 'N': '', # No data |
54 'X': '', # Skip | 54 'X': '', # Skip |
55 'T': 'Timeout', | 55 'T': 'Timeout', |
56 'F': 'Failure', # text-only | 56 'F': 'Failure', # text-only |
57 'C': 'Crash', | 57 'C': 'Crash', |
58 'I': 'ImageOnlyFailure', | 58 'I': 'ImageOnlyFailure', |
59 'Z': 'Failure', # image+text | 59 'Z': 'Failure', # image+text |
60 'O': 'Missing', | 60 'O': 'Missing', |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 for name in trie: | 114 for name in trie: |
115 new_path = os.path.join(path_so_far, name) | 115 new_path = os.path.join(path_so_far, name) |
116 if self.RESULTS_KEY not in trie[name]: | 116 if self.RESULTS_KEY not in trie[name]: |
117 self._walk_tests_trie(trie[name], out, new_path) | 117 self._walk_tests_trie(trie[name], out, new_path) |
118 continue | 118 continue |
119 | 119 |
120 results = trie[name][self.RESULTS_KEY] | 120 results = trie[name][self.RESULTS_KEY] |
121 actual_results = self._actual_results_for_test(results) | 121 actual_results = self._actual_results_for_test(results) |
122 if len(actual_results) > 1: | 122 if len(actual_results) > 1: |
123 out.append('Bug(auto) %s [ %s ]' % (new_path, " ".join(actual_re
sults))) | 123 out.append('Bug(auto) %s [ %s ]' % (new_path, " ".join(actual_re
sults))) |
OLD | NEW |