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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 test_obj = INSTRUMENTATION_TESTS[options.install] | 551 test_obj = INSTRUMENTATION_TESTS[options.install] |
552 InstallApk(options, test_obj, print_step=True) | 552 InstallApk(options, test_obj, print_step=True) |
553 | 553 |
554 if options.test_filter: | 554 if options.test_filter: |
555 bb_utils.RunSteps(options.test_filter, GetTestStepCmds(), options) | 555 bb_utils.RunSteps(options.test_filter, GetTestStepCmds(), options) |
556 | 556 |
557 if options.coverage_bucket: | 557 if options.coverage_bucket: |
558 coverage_html = GenerateJavaCoverageReport(options) | 558 coverage_html = GenerateJavaCoverageReport(options) |
559 UploadHTML(options, '%s/java' % options.coverage_bucket, coverage_html, | 559 UploadHTML(options, '%s/java' % options.coverage_bucket, coverage_html, |
560 'Coverage Report') | 560 'Coverage Report') |
| 561 shutil.rmtree(coverage_html, ignore_errors=True) |
561 | 562 |
562 if options.experimental: | 563 if options.experimental: |
563 RunTestSuites(options, gtest_config.EXPERIMENTAL_TEST_SUITES) | 564 RunTestSuites(options, gtest_config.EXPERIMENTAL_TEST_SUITES) |
564 | 565 |
565 finally: | 566 finally: |
566 # Run all post test steps | 567 # Run all post test steps |
567 LogcatDump(options) | 568 LogcatDump(options) |
568 GenerateTestReport(options) | 569 GenerateTestReport(options) |
569 # KillHostHeartbeat() has logic to check if heartbeat process is running, | 570 # KillHostHeartbeat() has logic to check if heartbeat process is running, |
570 # and kills only if it finds the process is running on the host. | 571 # and kills only if it finds the process is running on the host. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 620 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
620 if options.coverage_bucket: | 621 if options.coverage_bucket: |
621 setattr(options, 'coverage_dir', | 622 setattr(options, 'coverage_dir', |
622 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 623 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
623 | 624 |
624 MainTestWrapper(options) | 625 MainTestWrapper(options) |
625 | 626 |
626 | 627 |
627 if __name__ == '__main__': | 628 if __name__ == '__main__': |
628 sys.exit(main(sys.argv)) | 629 sys.exit(main(sys.argv)) |
OLD | NEW |