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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 def setUp(self): | 119 def setUp(self): |
120 host = MockHost(initialize_scm_by_default=False) | 120 host = MockHost(initialize_scm_by_default=False) |
121 self.port = host.port_factory.get(port_name='test') | 121 self.port = host.port_factory.get(port_name='test') |
122 | 122 |
123 def test_no_svn_revision(self): | 123 def test_no_svn_revision(self): |
124 summary = summarized_results(self.port, expected=False, passing=False, f
laky=False) | 124 summary = summarized_results(self.port, expected=False, passing=False, f
laky=False) |
125 self.assertNotIn('revision', summary) | 125 self.assertNotIn('revision', summary) |
126 | 126 |
127 def test_num_failures_by_type(self): | 127 def test_num_failures_by_type(self): |
128 summary = summarized_results(self.port, expected=False, passing=False, f
laky=False) | 128 summary = summarized_results(self.port, expected=False, passing=False, f
laky=False) |
129 self.assertEquals(summary['num_failures_by_type'], {'CRASH': 1, 'MISSING
': 0, 'TEXT': 0, 'IMAGE': 0, 'NEEDSREBASELINE': 0, 'NEEDSMANUALREBASELINE': 0, '
PASS': 0, 'REBASELINE': 0, 'SKIP': 0, 'SLOW': 0, 'TIMEOUT': 2, 'IMAGE+TEXT': 0,
'FAIL': 0, 'AUDIO': 1, 'WONTFIX': 1}) | 129 self.assertEquals(summary['num_failures_by_type'], {'CRASH': 1, 'MISSING
': 0, 'TEXT': 0, 'IMAGE': 0, 'NEEDSREBASELINE': 0, 'NEEDSMANUALREBASELINE': 0, '
PASS': 0, 'REBASELINE': 0, 'SKIP': 0, 'SLOW': 0, 'TIMEOUT': 2, 'IMAGE+TEXT': 0,
'LEAK': 0, 'FAIL': 0, 'AUDIO': 1, 'WONTFIX': 1}) |
130 | 130 |
131 summary = summarized_results(self.port, expected=True, passing=False, fl
aky=False) | 131 summary = summarized_results(self.port, expected=True, passing=False, fl
aky=False) |
132 self.assertEquals(summary['num_failures_by_type'], {'CRASH': 1, 'MISSING
': 0, 'TEXT': 0, 'IMAGE': 0, 'NEEDSREBASELINE': 0, 'NEEDSMANUALREBASELINE': 0, '
PASS': 1, 'REBASELINE': 0, 'SKIP': 0, 'SLOW': 0, 'TIMEOUT': 1, 'IMAGE+TEXT': 0,
'FAIL': 0, 'AUDIO': 1, 'WONTFIX': 0}) | 132 self.assertEquals(summary['num_failures_by_type'], {'CRASH': 1, 'MISSING
': 0, 'TEXT': 0, 'IMAGE': 0, 'NEEDSREBASELINE': 0, 'NEEDSMANUALREBASELINE': 0, '
PASS': 1, 'REBASELINE': 0, 'SKIP': 0, 'SLOW': 0, 'TIMEOUT': 1, 'IMAGE+TEXT': 0,
'LEAK': 0, 'FAIL': 0, 'AUDIO': 1, 'WONTFIX': 0}) |
133 | 133 |
134 summary = summarized_results(self.port, expected=False, passing=True, fl
aky=False) | 134 summary = summarized_results(self.port, expected=False, passing=True, fl
aky=False) |
135 self.assertEquals(summary['num_failures_by_type'], {'CRASH': 0, 'MISSING
': 0, 'TEXT': 0, 'IMAGE': 0, 'NEEDSREBASELINE': 0, 'NEEDSMANUALREBASELINE': 0, '
PASS': 4, 'REBASELINE': 0, 'SKIP': 1, 'SLOW': 0, 'TIMEOUT': 0, 'IMAGE+TEXT': 0,
'FAIL': 0, 'AUDIO': 0, 'WONTFIX': 0}) | 135 self.assertEquals(summary['num_failures_by_type'], {'CRASH': 0, 'MISSING
': 0, 'TEXT': 0, 'IMAGE': 0, 'NEEDSREBASELINE': 0, 'NEEDSMANUALREBASELINE': 0, '
PASS': 4, 'REBASELINE': 0, 'SKIP': 1, 'SLOW': 0, 'TIMEOUT': 0, 'IMAGE+TEXT': 0,
'LEAK': 0, 'FAIL': 0, 'AUDIO': 0, 'WONTFIX': 0}) |
136 | 136 |
137 def test_svn_revision(self): | 137 def test_svn_revision(self): |
138 self.port._options.builder_name = 'dummy builder' | 138 self.port._options.builder_name = 'dummy builder' |
139 summary = summarized_results(self.port, expected=False, passing=False, f
laky=False) | 139 summary = summarized_results(self.port, expected=False, passing=False, f
laky=False) |
140 self.assertNotEquals(summary['blink_revision'], '') | 140 self.assertNotEquals(summary['blink_revision'], '') |
141 | 141 |
142 def test_bug_entry(self): | 142 def test_bug_entry(self): |
143 self.port._options.builder_name = 'dummy builder' | 143 self.port._options.builder_name = 'dummy builder' |
144 summary = summarized_results(self.port, expected=False, passing=True, fl
aky=False) | 144 summary = summarized_results(self.port, expected=False, passing=True, fl
aky=False) |
145 self.assertEquals(summary['tests']['passes']['skipped']['skip.html']['bu
gs'], ['Bug(test)']) | 145 self.assertEquals(summary['tests']['passes']['skipped']['skip.html']['bu
gs'], ['Bug(test)']) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 def test_timeout_then_unexpected_pass(self): | 189 def test_timeout_then_unexpected_pass(self): |
190 tests = ['failures/expected/image.html'] | 190 tests = ['failures/expected/image.html'] |
191 expectations = test_expectations.TestExpectations(self.port, tests) | 191 expectations = test_expectations.TestExpectations(self.port, tests) |
192 initial_results = test_run_results.TestRunResults(expectations, len(test
s)) | 192 initial_results = test_run_results.TestRunResults(expectations, len(test
s)) |
193 initial_results.add(get_result('failures/expected/image.html', test_expe
ctations.TIMEOUT, run_time=1), False, False) | 193 initial_results.add(get_result('failures/expected/image.html', test_expe
ctations.TIMEOUT, run_time=1), False, False) |
194 retry_results = test_run_results.TestRunResults(expectations, len(tests)
) | 194 retry_results = test_run_results.TestRunResults(expectations, len(tests)
) |
195 retry_results.add(get_result('failures/expected/image.html', test_expect
ations.PASS, run_time=0.1), False, False) | 195 retry_results.add(get_result('failures/expected/image.html', test_expect
ations.PASS, run_time=0.1), False, False) |
196 summary = test_run_results.summarize_results(self.port, expectations, in
itial_results, retry_results, enabled_pixel_tests_in_retry=True, only_include_fa
iling=True) | 196 summary = test_run_results.summarize_results(self.port, expectations, in
itial_results, retry_results, enabled_pixel_tests_in_retry=True, only_include_fa
iling=True) |
197 self.assertEquals(summary['num_regressions'], 0) | 197 self.assertEquals(summary['num_regressions'], 0) |
198 self.assertEquals(summary['num_passes'], 1) | 198 self.assertEquals(summary['num_passes'], 1) |
OLD | NEW |