summaryrefslogtreecommitdiff
path: root/deps/gyp/test/toolsets/gyptest-toolsets.py
diff options
context:
space:
mode:
Diffstat (limited to 'deps/gyp/test/toolsets/gyptest-toolsets.py')
-rwxr-xr-xdeps/gyp/test/toolsets/gyptest-toolsets.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/deps/gyp/test/toolsets/gyptest-toolsets.py b/deps/gyp/test/toolsets/gyptest-toolsets.py
new file mode 100755
index 0000000000..f80fce70a2
--- /dev/null
+++ b/deps/gyp/test/toolsets/gyptest-toolsets.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 toolsets are correctly applied
+"""
+import os
+import sys
+import TestGyp
+
+if sys.platform.startswith('linux'):
+
+ test = TestGyp.TestGyp(formats=['make', 'ninja'])
+
+ 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.run_built_executable('host-main', stdout="Host\nShared: Host\n")
+ test.run_built_executable('target-main', stdout="Target\nShared: Target\n")
+
+ test.pass_test()