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

Unified Diff: test/compiler-override/gyptest-compiler.py

Issue 10833021: Honor $CC/$CC_host and friends in make generator. (Closed) Base URL: http://git.chromium.org/external/gyp.git@master
Patch Set: Remove docstring cleanups (better to commit seperately) Created 8 years, 5 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: 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()

Powered by Google App Engine
This is Rietveld 408576698