Chromium Code Reviews| Index: test/win/gyptest-cl-enable-enhanced-instruction-set.py |
| diff --git a/test/win/gyptest-cl-enable-enhanced-instruction-set.py b/test/win/gyptest-cl-enable-enhanced-instruction-set.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0cc8d4c1ea86f93cefd803a4cd578a970652952f |
| --- /dev/null |
| +++ b/test/win/gyptest-cl-enable-enhanced-instruction-set.py |
| @@ -0,0 +1,39 @@ |
| +#!/usr/bin/env python |
| + |
| +# Copyright (c) 2014 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. |
| + |
| +""" |
| +Test VCCLCompilerTool EnableEnhancedInstructionSet setting. |
| +""" |
| + |
| +import TestGyp |
| + |
| +import os |
| +import sys |
| + |
| +if sys.platform == 'win32': |
| + test = TestGyp.TestGyp(formats=['msvs', 'ninja']) |
|
scottmg
2014/03/11 16:32:58
don't need formats= here
grt (UTC plus 2)
2014/03/11 17:57:30
Done.
|
| + |
| + CHDIR = 'compiler-flags' |
| + test.run_gyp('enable-enhanced-instruction-set.gyp', chdir=CHDIR) |
| + |
| + test.build('enable-enhanced-instruction-set.gyp', test.ALL, chdir=CHDIR) |
| + |
| + test.run_built_executable('sse_extensions', chdir=CHDIR, |
| + stdout='/arch:SSE\n') |
| + test.run_built_executable('sse2_extensions', chdir=CHDIR, |
| + stdout='/arch:SSE2\n') |
| + |
| + # /arch:AVX introduced in VS2010, but MSBuild support lagged until 2012. |
| + if os.path.exists(test.built_file_path('avx_extensions')): |
| + test.run_built_executable('no_extensions', chdir=CHDIR, |
| + stdout='/arch:AVX\n') |
| + |
| + # /arch:IA32 introduced in VS2012. |
| + if os.path.exists(test.built_file_path('no_extensions')): |
| + test.run_built_executable('no_extensions', chdir=CHDIR, |
| + stdout='/arch:IA32\n') |
| + |
| + test.pass_test() |