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 """Main functions for the Layout Test Analyzer module.""" | 6 """Main functions for the Layout Test Analyzer module.""" |
7 | 7 |
8 from datetime import datetime | 8 from datetime import datetime |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 # to make the following link work. | 409 # to make the following link work. |
410 'test_group_path': layouttest_root_path + '/' + test_group_name, | 410 'test_group_path': layouttest_root_path + '/' + test_group_name, |
411 'test_group_name': test_group_name, | 411 'test_group_name': test_group_name, |
412 'graph_path': escaped_tg_name + '.html', | 412 'graph_path': escaped_tg_name + '.html', |
413 'all_tests_path': escaped_tg_name + '_whole.html', | 413 'all_tests_path': escaped_tg_name + '_whole.html', |
414 'all_tests_count': len(data_map['whole'][0]), | 414 'all_tests_count': len(data_map['whole'][0]), |
415 'skip_tests_path': escaped_tg_name + '_skip.html', | 415 'skip_tests_path': escaped_tg_name + '_skip.html', |
416 'skip_tests_count': len(data_map['skip'][0]), | 416 'skip_tests_count': len(data_map['skip'][0]), |
417 'nonskip_tests_path': escaped_tg_name + '_nonskip.html', | 417 'nonskip_tests_path': escaped_tg_name + '_nonskip.html', |
418 'nonskip_tests_count': len(data_map['nonskip'][0]), | 418 'nonskip_tests_count': len(data_map['nonskip'][0]), |
419 'fail_rate': 100 - int(data_map['passingrate'][0]), | 419 'fail_rate': 100 - float(data_map['passingrate'][0]), |
420 'passing_rate': int(data_map['passingrate'][0]), | 420 'passing_rate': float(data_map['passingrate'][0]), |
421 'rev_url': DEFAULT_REVISION_VIEW_URL % rev, | 421 'rev_url': DEFAULT_REVISION_VIEW_URL % rev, |
422 'rev': rev, | 422 'rev': rev, |
423 'rev_date': rev_date, | 423 'rev_date': rev_date, |
424 'email': email, | 424 'email': email, |
425 'email_content': email_content_with_link | 425 'email_content': email_content_with_link |
426 } | 426 } |
427 layouttest_analyzer_helpers.ReplaceLineInFile( | 427 layouttest_analyzer_helpers.ReplaceLineInFile( |
428 dashboard_file_location, '<td>' + test_group_name + '</td>', | 428 dashboard_file_location, '<td>' + test_group_name + '</td>', |
429 test_group_str) | 429 test_group_str) |
430 | 430 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 # Report the result to dashboard. | 470 # Report the result to dashboard. |
471 if options.dashboard_file_location: | 471 if options.dashboard_file_location: |
472 UpdateDashboard(options.dashboard_file_location, options.test_group_name, | 472 UpdateDashboard(options.dashboard_file_location, options.test_group_name, |
473 data_map, layouttests.DEFAULT_LAYOUTTEST_LOCATION, rev, | 473 data_map, layouttests.DEFAULT_LAYOUTTEST_LOCATION, rev, |
474 rev_date, options.receiver_email_address, | 474 rev_date, options.receiver_email_address, |
475 email_content) | 475 email_content) |
476 | 476 |
477 | 477 |
478 if '__main__' == __name__: | 478 if '__main__' == __name__: |
479 main() | 479 main() |
OLD | NEW |