Index: test/win/gyptest-link_target_machine.py |
diff --git a/test/win/gyptest-link_target_machine.py b/test/win/gyptest-link_target_machine.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d5d3e06488536cfda1823a8b5c084acb3bd97330 |
--- /dev/null |
+++ b/test/win/gyptest-link_target_machine.py |
@@ -0,0 +1,30 @@ |
+#!/usr/bin/env python |
+ |
+# Copyright (c) 2012 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. |
+ |
+""" |
+Make sure target machine setting is extracted properly. |
+""" |
+ |
+import TestGyp |
+ |
+import subprocess |
+import sys |
+ |
+if sys.platform == 'win32': |
+ test = TestGyp.TestGyp(formats=['ninja']) |
+ |
+ CHDIR = 'linker_flags' |
+ test.run_gyp('target-machine.gyp', chdir=CHDIR) |
+ |
+ ninja_file = test.built_file_path('obj/test_tm_x86.ninja', chdir=CHDIR) |
+ test.must_contain(ninja_file, '/MACHINE:X86') |
+ |
+ ninja_file = test.built_file_path('obj/test_tm_x64.ninja', chdir=CHDIR) |
+ test.must_contain(ninja_file, '/MACHINE:X64') |
+ |
+ # TODO(scottmg): There's a bunch of targets, but we don't use any of them. |
+ |
+ test.pass_test() |