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

Side by Side Diff: test/configurations/target_platform/gyptest-target_platform.py

Issue 1454433002: Python 3 compatibility Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase with master (4ec6c4e3a94bd04a6da2858163d40b2429b8aad1) Created 4 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2009 Google Inc. All rights reserved. 3 # Copyright (c) 2009 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 Tests the msvs specific msvs_target_platform option. 8 Tests the msvs specific msvs_target_platform option.
9 """ 9 """
10 10
11 import TestGyp 11 import TestGyp
12 import TestCommon 12 import TestCommon
13 13
14 14
15 def RunX64(exe, stdout): 15 def RunX64(exe, stdout):
16 try: 16 try:
17 test.run_built_executable(exe, stdout=stdout) 17 test.run_built_executable(exe, stdout=stdout)
18 except WindowsError, e: 18 except WindowsError as e:
19 # Assume the exe is 64-bit if it can't load on 32-bit systems. 19 # Assume the exe is 64-bit if it can't load on 32-bit systems.
20 # Both versions of the error are required because different versions 20 # Both versions of the error are required because different versions
21 # of python seem to return different errors for invalid exe type. 21 # of python seem to return different errors for invalid exe type.
22 if e.errno != 193 and '[Error 193]' not in str(e): 22 if e.errno != 193 and '[Error 193]' not in str(e):
23 raise 23 raise
24 24
25 25
26 test = TestGyp.TestGyp(formats=['msvs']) 26 test = TestGyp.TestGyp(formats=['msvs'])
27 27
28 test.run_gyp('configurations.gyp') 28 test.run_gyp('configurations.gyp')
29 29
30 test.set_configuration('Debug|x64') 30 test.set_configuration('Debug|x64')
31 test.build('configurations.gyp', rebuild=True) 31 test.build('configurations.gyp', rebuild=True)
32 RunX64('front_left', stdout=('left\n')) 32 RunX64('front_left', stdout=('left\n'))
33 RunX64('front_right', stdout=('right\n')) 33 RunX64('front_right', stdout=('right\n'))
34 34
35 test.set_configuration('Debug|Win32') 35 test.set_configuration('Debug|Win32')
36 test.build('configurations.gyp', rebuild=True) 36 test.build('configurations.gyp', rebuild=True)
37 RunX64('front_left', stdout=('left\n')) 37 RunX64('front_left', stdout=('left\n'))
38 test.run_built_executable('front_right', stdout=('right\n')) 38 test.run_built_executable('front_right', stdout=('right\n'))
39 39
40 test.pass_test() 40 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698