OLD | NEW |
1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 FLAKY = "L" | 65 FLAKY = "L" |
66 IMAGE = "I" | 66 IMAGE = "I" |
67 IMAGE_PLUS_TEXT = "Z" | 67 IMAGE_PLUS_TEXT = "Z" |
68 MISSING = "O" | 68 MISSING = "O" |
69 NO_DATA = "N" | 69 NO_DATA = "N" |
70 NOTRUN = "Y" | 70 NOTRUN = "Y" |
71 PASS = "P" | 71 PASS = "P" |
72 SKIP = "X" | 72 SKIP = "X" |
73 TEXT = "F" | 73 TEXT = "F" |
74 TIMEOUT = "T" | 74 TIMEOUT = "T" |
| 75 LEAK = "K" |
75 | 76 |
76 AUDIO_STRING = "AUDIO" | 77 AUDIO_STRING = "AUDIO" |
77 CRASH_STRING = "CRASH" | 78 CRASH_STRING = "CRASH" |
78 IMAGE_PLUS_TEXT_STRING = "IMAGE+TEXT" | 79 IMAGE_PLUS_TEXT_STRING = "IMAGE+TEXT" |
79 IMAGE_STRING = "IMAGE" | 80 IMAGE_STRING = "IMAGE" |
80 FAIL_STRING = "FAIL" | 81 FAIL_STRING = "FAIL" |
81 FLAKY_STRING = "FLAKY" | 82 FLAKY_STRING = "FLAKY" |
82 MISSING_STRING = "MISSING" | 83 MISSING_STRING = "MISSING" |
83 NO_DATA_STRING = "NO DATA" | 84 NO_DATA_STRING = "NO DATA" |
84 NOTRUN_STRING = "NOTRUN" | 85 NOTRUN_STRING = "NOTRUN" |
85 PASS_STRING = "PASS" | 86 PASS_STRING = "PASS" |
86 SKIP_STRING = "SKIP" | 87 SKIP_STRING = "SKIP" |
87 TEXT_STRING = "TEXT" | 88 TEXT_STRING = "TEXT" |
88 TIMEOUT_STRING = "TIMEOUT" | 89 TIMEOUT_STRING = "TIMEOUT" |
| 90 LEAK_STRING = "LEAK" |
89 | 91 |
90 FAILURE_TO_CHAR = { | 92 FAILURE_TO_CHAR = { |
91 AUDIO_STRING: AUDIO, | 93 AUDIO_STRING: AUDIO, |
92 CRASH_STRING: CRASH, | 94 CRASH_STRING: CRASH, |
93 IMAGE_PLUS_TEXT_STRING: IMAGE_PLUS_TEXT, | 95 IMAGE_PLUS_TEXT_STRING: IMAGE_PLUS_TEXT, |
94 IMAGE_STRING: IMAGE, | 96 IMAGE_STRING: IMAGE, |
95 FLAKY_STRING: FLAKY, | 97 FLAKY_STRING: FLAKY, |
96 FAIL_STRING: FAIL, | 98 FAIL_STRING: FAIL, |
97 MISSING_STRING: MISSING, | 99 MISSING_STRING: MISSING, |
98 NO_DATA_STRING: NO_DATA, | 100 NO_DATA_STRING: NO_DATA, |
99 NOTRUN_STRING: NOTRUN, | 101 NOTRUN_STRING: NOTRUN, |
100 PASS_STRING: PASS, | 102 PASS_STRING: PASS, |
101 SKIP_STRING: SKIP, | 103 SKIP_STRING: SKIP, |
102 TEXT_STRING: TEXT, | 104 TEXT_STRING: TEXT, |
103 TIMEOUT_STRING: TIMEOUT, | 105 TIMEOUT_STRING: TIMEOUT, |
| 106 LEAK_STRING: LEAK, |
104 } | 107 } |
105 | 108 |
106 # FIXME: Use dict comprehensions once we update the server to python 2.7. | 109 # FIXME: Use dict comprehensions once we update the server to python 2.7. |
107 CHAR_TO_FAILURE = dict((value, key) for key, value in FAILURE_TO_CHAR.items()) | 110 CHAR_TO_FAILURE = dict((value, key) for key, value in FAILURE_TO_CHAR.items()) |
108 | 111 |
109 def _is_directory(subtree): | 112 def _is_directory(subtree): |
110 return RESULTS_KEY not in subtree | 113 return RESULTS_KEY not in subtree |
111 | 114 |
112 | 115 |
113 class JsonResults(object): | 116 class JsonResults(object): |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 | 515 |
513 check_json_error_string = cls._check_json(builder, json) | 516 check_json_error_string = cls._check_json(builder, json) |
514 if check_json_error_string: | 517 if check_json_error_string: |
515 return None | 518 return None |
516 | 519 |
517 test_list_json = {} | 520 test_list_json = {} |
518 tests = json[builder][TESTS_KEY] | 521 tests = json[builder][TESTS_KEY] |
519 cls._delete_results_and_times(tests) | 522 cls._delete_results_and_times(tests) |
520 test_list_json[builder] = {TESTS_KEY: tests} | 523 test_list_json[builder] = {TESTS_KEY: tests} |
521 return cls._generate_file_data(test_list_json) | 524 return cls._generate_file_data(test_list_json) |
OLD | NEW |