Index: testing/scripts/gyp_flag_compare.py |
diff --git a/testing/scripts/gyp_flag_compare.py b/testing/scripts/gyp_flag_compare.py |
new file mode 100755 |
index 0000000000000000000000000000000000000000..2673c83ea723cd3f0b748b6d66cbd8ae02cec019 |
--- /dev/null |
+++ b/testing/scripts/gyp_flag_compare.py |
@@ -0,0 +1,46 @@ |
+#!/usr/bin/env 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. |
+ |
+"""Wrap //tools/gn/bin/gyp_flag_compare.py for the bots. |
+ |
+This script wraps the GN test script in the facade needed for the |
+'ScriptTest' step class of the chromium recipe_module |
+(see scripts/slave/recipe_modules/chromium/steps.py in the build repo. |
+ |
+The script takes N arguments, for the N targets to compare flags for. |
+""" |
+ |
+import json |
+import os |
+import sys |
+ |
+ |
+import common |
+ |
+ |
+def main_run(args): |
+ rc = common.run_command([sys.executable, |
+ os.path.join(common.SRC_DIR, |
+ 'tools', 'gn', 'bin', |
+ 'gyp_flag_compare.py')] + args.args) |
Dirk Pranke
2015/05/15 01:00:54
gyp_flag_compare.py takes a list of build targets
Paweł Hajdan Jr.
2015/05/15 10:14:07
FWIW I don't see any args being passed to this scr
Dirk Pranke
2015/05/15 15:09:40
Yeah, I didn't add the step at all to the json fil
|
+ |
+ json.dump({ |
+ 'valid': True, |
+ 'failures': [], |
Paweł Hajdan Jr.
2015/05/15 10:14:07
Do you intend this to always pass? If there are an
Dirk Pranke
2015/05/15 15:09:40
same answer as the other one. eventually we might
|
+ }, args.output) |
+ |
+ return rc |
+ |
+ |
+def main_compile_targets(args): |
+ json.dump([], args.output) |
+ |
+ |
+if __name__ == '__main__': |
+ funcs = { |
+ 'run': main_run, |
+ 'compile_targets': main_compile_targets, |
+ } |
+ sys.exit(common.run_script(sys.argv[1:], funcs)) |