diff options
author | Orion Hodson <oth@google.com> | 2017-07-12 11:55:22 +0100 |
---|---|---|
committer | Orion Hodson <oth@google.com> | 2017-07-13 09:43:25 +0100 |
commit | 42f16581dc7bf1bfebe505d061379643adbb4a33 (patch) | |
tree | bef1c4e7d1c22bbbdbc4109c63dbdf8a9704c052 /test.py | |
parent | 8ea20746896a5930d99b74d54213ff5a742ae937 (diff) |
Testing: Remove old run-all-tests script
Update test.py with additional help
Update README.txt
Test: art/test.py -r
Change-Id: I25320aff9bd7041a1aad738119aec1422e5a0309
Diffstat (limited to 'test.py')
-rwxr-xr-x | test.py | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -28,14 +28,15 @@ import argparse ANDROID_BUILD_TOP = os.environ.get('ANDROID_BUILD_TOP', os.getcwd()) parser = argparse.ArgumentParser() -parser.add_argument('-j', default='', dest='n_threads') -parser.add_argument('--run-test', '-r', action='store_true', dest='run_test') -parser.add_argument('--gtest', '-g', action='store_true', dest='gtest') -parser.add_argument('--target', action='store_true', dest='target') -parser.add_argument('--host', action='store_true', dest='host') +parser.add_argument('-j', default='', dest='n_threads', help='specify number of concurrent tests') +parser.add_argument('--run-test', '-r', action='store_true', dest='run_test', help='execute run tests') +parser.add_argument('--gtest', '-g', action='store_true', dest='gtest', help='execute gtest tests') +parser.add_argument('--target', action='store_true', dest='target', help='test on target system') +parser.add_argument('--host', action='store_true', dest='host', help='test on build host system') +parser.add_argument('--help-runner', action='store_true', dest='help_runner', help='show help for optional run test arguments') options, unknown = parser.parse_known_args() -if options.run_test or not options.gtest: +if options.run_test or options.help_runner or not options.gtest: testrunner = os.path.join('./', ANDROID_BUILD_TOP, 'art/test/testrunner/testrunner.py') @@ -44,11 +45,14 @@ if options.run_test or not options.gtest: if arg == '--run-test' or arg == '--gtest' \ or arg == '-r' or arg == '-g': continue + if arg == '--help-runner': + run_test_args = ['--help'] + break run_test_args.append(arg) test_runner_cmd = [testrunner] + run_test_args print test_runner_cmd - if subprocess.call(test_runner_cmd): + if subprocess.call(test_runner_cmd) or options.help_runner: sys.exit(1) if options.gtest or not options.run_test: |