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

Unified Diff: mojo/public/tools/bindings/pylib/mojom_tests/support/run_bindings_generator.py

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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
Index: mojo/public/tools/bindings/pylib/mojom_tests/support/run_bindings_generator.py
diff --git a/mojo/public/tools/bindings/pylib/mojom_tests/support/run_bindings_generator.py b/mojo/public/tools/bindings/pylib/mojom_tests/support/run_bindings_generator.py
deleted file mode 100644
index 20ef461969923ec9f63d3fedfd921f713f1c8bd2..0000000000000000000000000000000000000000
--- a/mojo/public/tools/bindings/pylib/mojom_tests/support/run_bindings_generator.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# 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.path
-from subprocess import check_call
-import sys
-
-
-def RunBindingsGenerator(out_dir, root_dir, mojom_file, extra_flags=None):
- out_dir = os.path.abspath(out_dir)
- root_dir = os.path.abspath(root_dir)
- mojom_file = os.path.abspath(mojom_file)
-
- # The mojom file should be under the root directory somewhere.
- assert mojom_file.startswith(root_dir)
- mojom_reldir = os.path.dirname(os.path.relpath(mojom_file, root_dir))
-
- # TODO(vtl): Abstract out the "main" functions, so that we can just import
- # the bindings generator (which would be more portable and easier to use in
- # tests).
- this_dir = os.path.dirname(os.path.abspath(__file__))
- # We're in src/mojo/public/tools/bindings/pylib/mojom_tests/support;
- # mojom_bindings_generator.py is in .../bindings.
- bindings_generator = os.path.join(this_dir, os.pardir, os.pardir, os.pardir,
- "mojom_bindings_generator.py")
-
- args = ["python", bindings_generator,
- "-o", os.path.join(out_dir, mojom_reldir)]
- if extra_flags:
- args.extend(extra_flags)
- args.append(mojom_file)
-
- check_call(args)
-
-
-def main(argv):
- if len(argv) < 4:
- print "usage: %s out_dir root_dir mojom_file [extra_flags]" % argv[0]
- return 1
-
- RunBindingsGenerator(argv[1], argv[2], argv[3], extra_flags=argv[4:])
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv))
« no previous file with comments | « mojo/public/tools/bindings/pylib/mojom_tests/support/find_files.py ('k') | mojo/public/tools/download_shell_binary.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698