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

Unified Diff: test/toolsets/gyptest-toolsets.py

Issue 13992005: Fix rpath for components when cross-compiling. (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: linux-only Created 7 years, 8 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 | « pylib/gyp/generator/ninja.py ('k') | test/toolsets/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/toolsets/gyptest-toolsets.py
diff --git a/test/toolsets/gyptest-toolsets.py b/test/toolsets/gyptest-toolsets.py
index 19737f83d0a164cb009553ac6c8d1e4054895961..f80fce70a2d0ab673f0d0b2a71067043ae4b592b 100755
--- a/test/toolsets/gyptest-toolsets.py
+++ b/test/toolsets/gyptest-toolsets.py
@@ -7,17 +7,25 @@
"""
Verifies that toolsets are correctly applied
"""
-
+import os
+import sys
import TestGyp
-# Multiple toolsets are currently only supported by the make generator.
-test = TestGyp.TestGyp(formats=['make'])
+if sys.platform.startswith('linux'):
+
+ test = TestGyp.TestGyp(formats=['make', 'ninja'])
-test.run_gyp('toolsets.gyp')
+ oldenv = os.environ.copy()
+ try:
+ os.environ['GYP_CROSSCOMPILE'] = '1'
+ test.run_gyp('toolsets.gyp')
+ finally:
+ os.environ.clear()
+ os.environ.update(oldenv)
-test.build('toolsets.gyp', test.ALL)
+ test.build('toolsets.gyp', test.ALL)
-test.run_built_executable('host-main', stdout="Host\n")
-test.run_built_executable('target-main', stdout="Target\n")
+ test.run_built_executable('host-main', stdout="Host\nShared: Host\n")
+ test.run_built_executable('target-main', stdout="Target\nShared: Target\n")
-test.pass_test()
+ test.pass_test()
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/toolsets/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698