| 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 multiprocessing | 10 import multiprocessing |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 '--metadata-dir', os.path.join(CHROME_OUT_DIR, options.target), | 504 '--metadata-dir', os.path.join(CHROME_OUT_DIR, options.target), |
| 505 '--cleanup', | 505 '--cleanup', |
| 506 '--output', os.path.join(coverage_html, 'index.html')]) | 506 '--output', os.path.join(coverage_html, 'index.html')]) |
| 507 return coverage_html | 507 return coverage_html |
| 508 | 508 |
| 509 | 509 |
| 510 def LogcatDump(options): | 510 def LogcatDump(options): |
| 511 # Print logcat, kill logcat monitor | 511 # Print logcat, kill logcat monitor |
| 512 bb_annotations.PrintNamedStep('logcat_dump') | 512 bb_annotations.PrintNamedStep('logcat_dump') |
| 513 logcat_file = os.path.join(CHROME_OUT_DIR, options.target, 'full_log') | 513 logcat_file = os.path.join(CHROME_OUT_DIR, options.target, 'full_log') |
| 514 with open(logcat_file, 'w') as f: | 514 RunCmd([SrcPath('build' , 'android', 'adb_logcat_printer.py'), |
| 515 RunCmd([ | 515 '--output-path', logcat_file, LOGCAT_DIR]) |
| 516 os.path.join(CHROME_SRC_DIR, 'build', 'android', | |
| 517 'adb_logcat_printer.py'), | |
| 518 LOGCAT_DIR], stdout=f) | |
| 519 RunCmd(['cat', logcat_file]) | 516 RunCmd(['cat', logcat_file]) |
| 520 | 517 |
| 521 | 518 |
| 522 def GenerateTestReport(options): | 519 def GenerateTestReport(options): |
| 523 bb_annotations.PrintNamedStep('test_report') | 520 bb_annotations.PrintNamedStep('test_report') |
| 524 for report in glob.glob( | 521 for report in glob.glob( |
| 525 os.path.join(CHROME_OUT_DIR, options.target, 'test_logs', '*.log')): | 522 os.path.join(CHROME_OUT_DIR, options.target, 'test_logs', '*.log')): |
| 526 RunCmd(['cat', report]) | 523 RunCmd(['cat', report]) |
| 527 os.remove(report) | 524 os.remove(report) |
| 528 | 525 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 605 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
| 609 if options.coverage_bucket: | 606 if options.coverage_bucket: |
| 610 setattr(options, 'coverage_dir', | 607 setattr(options, 'coverage_dir', |
| 611 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 608 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
| 612 | 609 |
| 613 MainTestWrapper(options) | 610 MainTestWrapper(options) |
| 614 | 611 |
| 615 | 612 |
| 616 if __name__ == '__main__': | 613 if __name__ == '__main__': |
| 617 sys.exit(main(sys.argv)) | 614 sys.exit(main(sys.argv)) |
| OLD | NEW |