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

Unified Diff: test/make_global_settings/ar/gyptest-make_global_settings_ar.py

Issue 336953002: Revise unittest for 'AR' in 'make_global_settings' (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/make_global_settings/ar/gyptest-make_global_settings_ar.py
diff --git a/test/make_global_settings/ar/gyptest-make_global_settings_ar.py b/test/make_global_settings/ar/gyptest-make_global_settings_ar.py
index a90baad94e485d32e9720e1244914b3829a0d86e..133727b85c7808ea880ea84d46be8a1e54320616 100644
--- a/test/make_global_settings/ar/gyptest-make_global_settings_ar.py
+++ b/test/make_global_settings/ar/gyptest-make_global_settings_ar.py
@@ -56,14 +56,7 @@ def verify_ar_host(test, ar=None, rel_path=False):
ar_expected = ar
# Resolve default values
if ar_expected is None:
- if test.format == 'make':
- ar_expected = '$(AR)'
- elif test.format == 'ninja':
- if sys.platform == 'win32':
- # TODO(yukawa): Make sure if this is an expected result or not.
- ar_expected = 'ar'
- else:
- ar_expected = '$ar'
+ ar_expected = 'ar'
if test.format == 'make':
test.must_contain('Makefile', 'AR.host ?= %s' % ar_expected)
elif test.format == 'ninja':
@@ -83,15 +76,24 @@ test.run_gyp('make_global_settings_ar.gyp')
verify_ar_target(test)
+# Check default values with GYP_CROSSCOMPILE enabled.
+with TestGyp.LocalEnv({'GYP_CROSSCOMPILE': '1'}):
+ test.run_gyp('make_global_settings_ar.gyp')
+verify_ar_target(test)
+verify_ar_host(test)
+
+
# Test 'AR' in 'make_global_settings'.
-test.run_gyp('make_global_settings_ar.gyp', '-Dcustom_ar_target=my_ar')
+with TestGyp.LocalEnv({'GYP_CROSSCOMPILE': '1'}):
+ test.run_gyp('make_global_settings_ar.gyp', '-Dcustom_ar_target=my_ar')
verify_ar_target(test, ar='my_ar', rel_path=True)
# Test 'AR'/'AR.host' in 'make_global_settings'.
-test.run_gyp('make_global_settings_ar.gyp',
- '-Dcustom_ar_target=my_ar_target1',
- '-Dcustom_ar_host=my_ar_host1')
+with TestGyp.LocalEnv({'GYP_CROSSCOMPILE': '1'}):
+ test.run_gyp('make_global_settings_ar.gyp',
+ '-Dcustom_ar_target=my_ar_target1',
+ '-Dcustom_ar_host=my_ar_host1')
verify_ar_target(test, ar='my_ar_target1', rel_path=True)
# TODO(yukawa): Support 'AR.host' in Ninja generator
if test.format == 'make':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698