OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Runs all the native unit tests. | 7 """Runs all the native unit tests. |
8 | 8 |
9 1. Copy over test binary to /data/local on device. | 9 1. Copy over test binary to /data/local on device. |
10 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) | 10 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) |
(...skipping 30 matching lines...) Expand all Loading... |
41 import optparse | 41 import optparse |
42 import os | 42 import os |
43 import signal | 43 import signal |
44 import subprocess | 44 import subprocess |
45 import sys | 45 import sys |
46 import time | 46 import time |
47 | 47 |
48 from pylib import android_commands | 48 from pylib import android_commands |
49 from pylib import cmd_helper | 49 from pylib import cmd_helper |
50 from pylib import ports | 50 from pylib import ports |
51 from pylib.base_test_sharder import BaseTestSharder | 51 from pylib.base.base_test_sharder import BaseTestSharder |
52 from pylib.gtest import debug_info | 52 from pylib.gtest import debug_info |
53 from pylib.gtest import gtest_config | 53 from pylib.gtest import gtest_config |
54 from pylib.gtest.single_test_runner import SingleTestRunner | 54 from pylib.gtest.single_test_runner import SingleTestRunner |
55 from pylib.utils import emulator | 55 from pylib.utils import emulator |
56 from pylib.utils import run_tests_helper | 56 from pylib.utils import run_tests_helper |
57 from pylib.utils import test_options_parser | 57 from pylib.utils import test_options_parser |
58 from pylib.utils import time_profile | 58 from pylib.utils import time_profile |
59 from pylib.utils import xvfb | 59 from pylib.utils import xvfb |
60 | 60 |
61 | 61 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 # the batch (this happens because the exit status is a sum of all failures | 334 # the batch (this happens because the exit status is a sum of all failures |
335 # from all suites, but the buildbot associates the exit status only with the | 335 # from all suites, but the buildbot associates the exit status only with the |
336 # most recent step). | 336 # most recent step). |
337 if options.exit_code: | 337 if options.exit_code: |
338 return failed_tests_count | 338 return failed_tests_count |
339 return 0 | 339 return 0 |
340 | 340 |
341 | 341 |
342 if __name__ == '__main__': | 342 if __name__ == '__main__': |
343 sys.exit(main(sys.argv)) | 343 sys.exit(main(sys.argv)) |
OLD | NEW |