| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 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 import collections | 6 import collections |
| 7 import glob | 7 import glob |
| 8 import hashlib | 8 import hashlib |
| 9 import json | 9 import json |
| 10 import os | 10 import os |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 'gs://%s' % gs_path]) | 623 'gs://%s' % gs_path]) |
| 624 bb_annotations.PrintLink('logcat dump', '%s/%s' % (GS_AUTH_URL, gs_path)) | 624 bb_annotations.PrintLink('logcat dump', '%s/%s' % (GS_AUTH_URL, gs_path)) |
| 625 | 625 |
| 626 | 626 |
| 627 def RunStackToolSteps(options): | 627 def RunStackToolSteps(options): |
| 628 """Run stack tool steps. | 628 """Run stack tool steps. |
| 629 | 629 |
| 630 Stack tool is run for logcat dump, optionally for ASAN. | 630 Stack tool is run for logcat dump, optionally for ASAN. |
| 631 """ | 631 """ |
| 632 bb_annotations.PrintNamedStep('Run stack tool with logcat dump') | 632 bb_annotations.PrintNamedStep('Run stack tool with logcat dump') |
| 633 build_dir = os.path.join(CHROME_OUT_DIR, options.target) | 633 logcat_file = os.path.join(CHROME_OUT_DIR, options.target, 'full_log.txt') |
| 634 logcat_file = os.path.join(build_dir, 'full_log.txt') | |
| 635 RunCmd([os.path.join(CHROME_SRC_DIR, 'third_party', 'android_platform', | 634 RunCmd([os.path.join(CHROME_SRC_DIR, 'third_party', 'android_platform', |
| 636 'development', 'scripts', 'stack'), | 635 'development', 'scripts', 'stack'), |
| 637 '--more-info', logcat_file, | 636 '--more-info', logcat_file]) |
| 638 '--output-directory', build_dir]) | |
| 639 if options.asan_symbolize: | 637 if options.asan_symbolize: |
| 640 bb_annotations.PrintNamedStep('Run stack tool for ASAN') | 638 bb_annotations.PrintNamedStep('Run stack tool for ASAN') |
| 641 RunCmd([ | 639 RunCmd([ |
| 642 os.path.join(CHROME_SRC_DIR, 'build', 'android', 'asan_symbolize.py'), | 640 os.path.join(CHROME_SRC_DIR, 'build', 'android', 'asan_symbolize.py'), |
| 643 '-l', logcat_file, | 641 '-l', logcat_file]) |
| 644 '--output-directory', build_dir]) | |
| 645 | 642 |
| 646 | 643 |
| 647 def GenerateTestReport(options): | 644 def GenerateTestReport(options): |
| 648 bb_annotations.PrintNamedStep('test_report') | 645 bb_annotations.PrintNamedStep('test_report') |
| 649 for report in glob.glob( | 646 for report in glob.glob( |
| 650 os.path.join(CHROME_OUT_DIR, options.target, 'test_logs', '*.log')): | 647 os.path.join(CHROME_OUT_DIR, options.target, 'test_logs', '*.log')): |
| 651 RunCmd(['cat', report]) | 648 RunCmd(['cat', report]) |
| 652 os.remove(report) | 649 os.remove(report) |
| 653 | 650 |
| 654 | 651 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 | 763 |
| 767 if options.coverage_bucket: | 764 if options.coverage_bucket: |
| 768 setattr(options, 'coverage_dir', | 765 setattr(options, 'coverage_dir', |
| 769 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 766 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
| 770 | 767 |
| 771 MainTestWrapper(options) | 768 MainTestWrapper(options) |
| 772 | 769 |
| 773 | 770 |
| 774 if __name__ == '__main__': | 771 if __name__ == '__main__': |
| 775 sys.exit(main(sys.argv)) | 772 sys.exit(main(sys.argv)) |
| OLD | NEW |