OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2014 Google Inc. All rights reserved. | 3 # Copyright (c) 2014 Google Inc. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """ | 7 """ |
8 Test VCCLCompilerTool EnableEnhancedInstructionSet setting. | 8 Test VCCLCompilerTool EnableEnhancedInstructionSet setting. |
9 """ | 9 """ |
10 | 10 |
| 11 from __future__ import print_function |
| 12 |
11 import TestGyp | 13 import TestGyp |
12 | 14 |
13 import os | 15 import os |
14 import sys | 16 import sys |
15 | 17 |
16 if sys.platform == 'win32': | 18 if sys.platform == 'win32': |
17 print "This test is currently disabled: https://crbug.com/483696." | 19 print("This test is currently disabled: https://crbug.com/483696.") |
18 sys.exit(0) | 20 sys.exit(0) |
19 | 21 |
20 test = TestGyp.TestGyp() | 22 test = TestGyp.TestGyp() |
21 | 23 |
22 CHDIR = 'compiler-flags' | 24 CHDIR = 'compiler-flags' |
23 test.run_gyp('enable-enhanced-instruction-set.gyp', chdir=CHDIR) | 25 test.run_gyp('enable-enhanced-instruction-set.gyp', chdir=CHDIR) |
24 | 26 |
25 test.build('enable-enhanced-instruction-set.gyp', test.ALL, chdir=CHDIR) | 27 test.build('enable-enhanced-instruction-set.gyp', test.ALL, chdir=CHDIR) |
26 | 28 |
27 test.run_built_executable('sse_extensions', chdir=CHDIR, | 29 test.run_built_executable('sse_extensions', chdir=CHDIR, |
(...skipping 10 matching lines...) Expand all Loading... |
38 if os.path.exists(test.built_file_path('no_extensions')): | 40 if os.path.exists(test.built_file_path('no_extensions')): |
39 test.run_built_executable('no_extensions', chdir=CHDIR, | 41 test.run_built_executable('no_extensions', chdir=CHDIR, |
40 stdout='/arch:IA32\n') | 42 stdout='/arch:IA32\n') |
41 | 43 |
42 # /arch:AVX2 introduced in VS2013r2. | 44 # /arch:AVX2 introduced in VS2013r2. |
43 if os.path.exists(test.built_file_path('avx2_extensions')): | 45 if os.path.exists(test.built_file_path('avx2_extensions')): |
44 test.run_built_executable('avx2_extensions', chdir=CHDIR, | 46 test.run_built_executable('avx2_extensions', chdir=CHDIR, |
45 stdout='/arch:AVX2\n') | 47 stdout='/arch:AVX2\n') |
46 | 48 |
47 test.pass_test() | 49 test.pass_test() |
OLD | NEW |