Index: test/compiler-override/gyptest-compiler.py |
diff --git a/test/compiler-override/gyptest-compiler.py b/test/compiler-override/gyptest-compiler.py |
new file mode 100755 |
index 0000000000000000000000000000000000000000..cfc85b798389c728d8f3268c608c21387ad9ae09 |
--- /dev/null |
+++ b/test/compiler-override/gyptest-compiler.py |
@@ -0,0 +1,31 @@ |
+#!/usr/bin/env python |
+ |
+# Copyright (c) 2009 Google Inc. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+""" |
+Verifies that the user can override the compiler and linker using LD_target |
+and CC_target. |
+""" |
+ |
+import TestGyp |
+import os |
+ |
+here = os.path.dirname(os.path.abspath(__file__)) |
+ |
+test = TestGyp.TestGyp(formats=['ninja', 'make']) |
+ |
+os.environ['CC_target'] = "%s/my_cc.py" % here |
+os.environ['CXX_target'] = "%s/my_cxx.py" % here |
+os.environ['LINK_target'] = "%s/my_ld.py" % here |
+ |
+test.run_gyp('compiler.gyp') |
+ |
+test.build('compiler.gyp') |
+ |
+# We can't test to presence of my_ld.py in the output since |
+# ninja will use CXX_target as the linker regardless |
+test.must_contain_all_lines(test.stdout(), ['my_cc.py', 'my_cxx.py']) |
+ |
+test.pass_test() |