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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 '--metadata-dir', os.path.join(CHROME_OUT_DIR, options.target), | 575 '--metadata-dir', os.path.join(CHROME_OUT_DIR, options.target), |
576 '--cleanup', | 576 '--cleanup', |
577 '--output', os.path.join(coverage_html, 'index.html')]) | 577 '--output', os.path.join(coverage_html, 'index.html')]) |
578 return coverage_html | 578 return coverage_html |
579 | 579 |
580 | 580 |
581 def LogcatDump(options): | 581 def LogcatDump(options): |
582 # Print logcat, kill logcat monitor | 582 # Print logcat, kill logcat monitor |
583 bb_annotations.PrintNamedStep('logcat_dump') | 583 bb_annotations.PrintNamedStep('logcat_dump') |
584 logcat_file = os.path.join(CHROME_OUT_DIR, options.target, 'full_log.txt') | 584 logcat_file = os.path.join(CHROME_OUT_DIR, options.target, 'full_log.txt') |
585 RunCmd([SrcPath('build' , 'android', 'adb_logcat_printer.py'), | 585 RunCmd([SrcPath('build', 'android', 'adb_logcat_printer.py'), |
586 '--output-path', logcat_file, LOGCAT_DIR]) | 586 '--output-path', logcat_file, LOGCAT_DIR]) |
587 gs_path = MakeGSPath(options, 'chromium-android/logcat_dumps') | 587 gs_path = MakeGSPath(options, 'chromium-android/logcat_dumps') |
588 RunCmd([bb_utils.GSUTIL_PATH, 'cp', '-z', 'txt', logcat_file, | 588 RunCmd([bb_utils.GSUTIL_PATH, 'cp', '-z', 'txt', logcat_file, |
589 'gs://%s' % gs_path]) | 589 'gs://%s' % gs_path]) |
590 bb_annotations.PrintLink('logcat dump', '%s/%s' % (GS_AUTH_URL, gs_path)) | 590 bb_annotations.PrintLink('logcat dump', '%s/%s' % (GS_AUTH_URL, gs_path)) |
591 | 591 |
592 | 592 |
593 def RunStackToolSteps(options): | 593 def RunStackToolSteps(options): |
594 """Run stack tool steps. | 594 """Run stack tool steps. |
595 | 595 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 parser.add_option( | 686 parser.add_option( |
687 '--logcat-dump-output', | 687 '--logcat-dump-output', |
688 help='The logcat dump output will be "tee"-ed into this file') | 688 help='The logcat dump output will be "tee"-ed into this file') |
689 # During processing perf bisects, a seperate working directory created under | 689 # During processing perf bisects, a seperate working directory created under |
690 # which builds are produced. Therefore we should look for relevent output | 690 # which builds are produced. Therefore we should look for relevent output |
691 # file under this directory.(/b/build/slave/<slave_name>/build/bisect/src/out) | 691 # file under this directory.(/b/build/slave/<slave_name>/build/bisect/src/out) |
692 parser.add_option( | 692 parser.add_option( |
693 '--chrome-output-dir', | 693 '--chrome-output-dir', |
694 help='Chrome output directory to be used while bisecting.') | 694 help='Chrome output directory to be used while bisecting.') |
695 | 695 |
696 parser.add_option('--disable-stack-tool', action='store_true', | 696 parser.add_option('--disable-stack-tool', action='store_true', |
697 help='Do not run stack tool.') | 697 help='Do not run stack tool.') |
698 parser.add_option('--asan-symbolize', action='store_true', | 698 parser.add_option('--asan-symbolize', action='store_true', |
699 help='Run stack tool for ASAN') | 699 help='Run stack tool for ASAN') |
700 parser.add_option('--cleanup', action='store_true', | 700 parser.add_option('--cleanup', action='store_true', |
701 help='Delete out/<target> directory at the end of the run.') | 701 help='Delete out/<target> directory at the end of the run.') |
702 return parser | 702 return parser |
703 | 703 |
704 | 704 |
705 def main(argv): | 705 def main(argv): |
706 parser = GetDeviceStepsOptParser() | 706 parser = GetDeviceStepsOptParser() |
707 options, args = parser.parse_args(argv[1:]) | 707 options, args = parser.parse_args(argv[1:]) |
708 | 708 |
(...skipping 14 matching lines...) Expand all Loading... |
723 | 723 |
724 if options.coverage_bucket: | 724 if options.coverage_bucket: |
725 setattr(options, 'coverage_dir', | 725 setattr(options, 'coverage_dir', |
726 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 726 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
727 | 727 |
728 MainTestWrapper(options) | 728 MainTestWrapper(options) |
729 | 729 |
730 | 730 |
731 if __name__ == '__main__': | 731 if __name__ == '__main__': |
732 sys.exit(main(sys.argv)) | 732 sys.exit(main(sys.argv)) |
OLD | NEW |