Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(651)

Unified Diff: mojo/tools/run_mojo_python_bindings_tests.py

Issue 509863002: Remove python bindings unittests from the build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/tools/pylib/mojo_python_tests_runner.py ('k') | mojo/tools/run_mojo_python_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/run_mojo_python_bindings_tests.py
diff --git a/mojo/tools/run_mojo_python_bindings_tests.py b/mojo/tools/run_mojo_python_bindings_tests.py
new file mode 100755
index 0000000000000000000000000000000000000000..3793ee0ce4478501608dcdf856a045004a117352
--- /dev/null
+++ b/mojo/tools/run_mojo_python_bindings_tests.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python
+# Copyright 2014 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.
+
+import os
+import sys
+
+_script_dir = os.path.dirname(os.path.abspath(__file__))
+sys.path.insert(0, os.path.join(_script_dir, "pylib"))
+
+from mojo_python_tests_runner import MojoPythonTestRunner
+
+
+class PythonBindingsTestRunner(MojoPythonTestRunner):
+
+ def add_custom_commandline_options(self, parser):
+ parser.add_argument('--build_dir', action='store',
+ help='path to the build output directory')
+
+ def apply_customization(self, args):
+ if args.build_dir:
+ python_build_dir = os.path.join(args.build_dir, 'python')
+ if python_build_dir not in sys.path:
+ sys.path.append(python_build_dir)
+
+
+def main():
+ runner = PythonBindingsTestRunner(os.path.join('mojo', 'python', 'tests'))
+ sys.exit(runner.run())
+
+
+if __name__ == '__main__':
+ sys.exit(main())
« no previous file with comments | « mojo/tools/pylib/mojo_python_tests_runner.py ('k') | mojo/tools/run_mojo_python_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698