| Index: mojo/dart/observatory_tester/runner.py
|
| diff --git a/mojo/dart/observatory_tester/runner.py b/mojo/dart/observatory_tester/runner.py
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..d78ec7d1a0a3bdc8bd273468513c34cf8dfde7c5
|
| --- /dev/null
|
| +++ b/mojo/dart/observatory_tester/runner.py
|
| @@ -0,0 +1,44 @@
|
| +#!/usr/bin/python
|
| +# Copyright 2015 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +"""This script runs the Observatory tests in the mojo tree."""
|
| +
|
| +import argparse
|
| +import os
|
| +import subprocess
|
| +import sys
|
| +
|
| +MOJO_SHELL = 'mojo_shell'
|
| +TESTEE = 'mojo:observatory_test'
|
| +
|
| +def main(build_dir, dart_exe, tester_script):
|
| + shell_exe = os.path.join(build_dir, MOJO_SHELL)
|
| + subprocess.check_call([
|
| + dart_exe,
|
| + tester_script,
|
| + shell_exe,
|
| + TESTEE
|
| + ])
|
| +
|
| +if __name__ == '__main__':
|
| + parser = argparse.ArgumentParser(
|
| + description="List filenames of files in the packages/ subdir of the "
|
| + "given directory.")
|
| + parser.add_argument("--build-dir",
|
| + dest="build_dir",
|
| + metavar="<build-directory>",
|
| + type=str,
|
| + required=True,
|
| + help="The directory containing mojo_shell.")
|
| + parser.add_argument("--dart-exe",
|
| + dest="dart_exe",
|
| + metavar="<package-name>",
|
| + type=str,
|
| + required=True,
|
| + help="Path to dart executable.")
|
| + args = parser.parse_args()
|
| + tester_dir = os.path.dirname(os.path.realpath(__file__))
|
| + tester_dart_script = os.path.join(tester_dir, 'tester.dart');
|
| + sys.exit(main(args.build_dir, args.dart_exe, tester_dart_script))
|
|
|