| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/python | |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | |
| 3 # Use of this source code is governed by a BSD-style license that can be | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 """This script runs the Dart content handler http load test in the mojo tree.""" | |
| 7 | |
| 8 import argparse | |
| 9 import os | |
| 10 import subprocess | |
| 11 import sys | |
| 12 | |
| 13 MOJO_SHELL = 'mojo_shell' | |
| 14 | |
| 15 | |
| 16 def main(build_dir, dart_exe, tester_script, tester_dir): | |
| 17 shell_exe = os.path.join(build_dir, MOJO_SHELL) | |
| 18 subprocess.check_call([ | |
| 19 dart_exe, | |
| 20 tester_script, | |
| 21 shell_exe, | |
| 22 tester_dir, | |
| 23 ]) | |
| 24 | |
| 25 if __name__ == '__main__': | |
| 26 parser = argparse.ArgumentParser( | |
| 27 description="List filenames of files in the packages/ subdir of the " | |
| 28 "given directory.") | |
| 29 parser.add_argument("--build-dir", | |
| 30 dest="build_dir", | |
| 31 metavar="<build-directory>", | |
| 32 type=str, | |
| 33 required=True, | |
| 34 help="The directory containing mojo_shell.") | |
| 35 parser.add_argument("--dart-exe", | |
| 36 dest="dart_exe", | |
| 37 metavar="<package-name>", | |
| 38 type=str, | |
| 39 required=True, | |
| 40 help="Path to dart executable.") | |
| 41 args = parser.parse_args() | |
| 42 tester_directory = os.path.dirname(os.path.realpath(__file__)) | |
| 43 tester_dart_script = os.path.join(tester_directory, 'bin', 'tester.dart') | |
| 44 package_directory = os.path.join( | |
| 45 args.build_dir, 'gen', 'dart-pkg', 'mojo_dart_http_load_test') | |
| 46 sys.exit(main(args.build_dir, args.dart_exe, tester_dart_script, | |
| 47 package_directory)) | |
| OLD | NEW |