OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Unit tests for annotated log parsers in runtest.py. | 6 """Unit tests for annotated log parsers in runtest.py. |
7 | 7 |
8 runtest.py has the option to parse test output locally and send results to the | 8 runtest.py has the option to parse test output locally and send results to the |
9 master via annotator steps. This file tests those parsers. | 9 master via annotator steps. This file tests those parsers. |
10 | 10 |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 self.assertEqual(expected, step.PerformanceSummary()[0]) | 348 self.assertEqual(expected, step.PerformanceSummary()[0]) |
349 self.assertEqual(FAILURE, step.evaluateCommand('mycommand')) | 349 self.assertEqual(FAILURE, step.evaluateCommand('mycommand')) |
350 | 350 |
351 def testPerfExpectationsImproveZero(self): | 351 def testPerfExpectationsImproveZero(self): |
352 step = self._TestPerfExpectations( | 352 step = self._TestPerfExpectations( |
353 'perf_test_better_higher_improve_zero.json') | 353 'perf_test_better_higher_improve_zero.json') |
354 expected = ('PERF_IMPROVE: vm_final_browser/1t_vm_b (inf%)') | 354 expected = ('PERF_IMPROVE: vm_final_browser/1t_vm_b (inf%)') |
355 self.assertEqual(expected, step.PerformanceSummary()[0]) | 355 self.assertEqual(expected, step.PerformanceSummary()[0]) |
356 self.assertEqual(WARNINGS, step.evaluateCommand('mycommand')) | 356 self.assertEqual(WARNINGS, step.evaluateCommand('mycommand')) |
357 | 357 |
| 358 class GraphingPageCyclerLogProcessorPerfTest(LoggingStepBase): |
| 359 def testPageCycler(self): |
| 360 parser = self._ConstructDefaultProcessor( |
| 361 process_log_utils.GraphingPageCyclerLogProcessor) |
| 362 self._ProcessLog(parser, 'page_cycler.log') |
| 363 |
| 364 expected = 't: 2.32k' |
| 365 self.assertEqual(expected, parser.PerformanceSummary()[0]) |
| 366 |
358 if __name__ == '__main__': | 367 if __name__ == '__main__': |
359 unittest.main() | 368 unittest.main() |
OLD | NEW |