OLD | NEW |
---|---|
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 Verifies build of an executable in three different configurations. | 8 Verifies build of an executable in three different configurations. |
9 """ | 9 """ |
10 | 10 |
11 import TestGyp | 11 import TestGyp |
12 | 12 |
13 test = TestGyp.TestGyp(formats=['msvs']) | 13 import sys |
14 | |
15 formats = ['msvs'] | |
16 if sys.platform =='win32': | |
17 formats += ['ninja'] | |
18 test = TestGyp.TestGyp(formats=formats) | |
14 | 19 |
15 test.run_gyp('configurations.gyp') | 20 test.run_gyp('configurations.gyp') |
21 test.set_configuration('Debug|Win32') | |
22 test.build('configurations.gyp', test.ALL) | |
16 | 23 |
17 for platform in ['Win32', 'x64']: | 24 for platform, suffix in [('Win32', ''), ('x64', '64')]: |
18 test.set_configuration('Debug|%s' % platform) | |
19 test.build('configurations.gyp', rebuild=True) | |
20 try: | 25 try: |
21 test.run_built_executable('configurations', | 26 test.run_built_executable('configurations' + suffix, |
scottmg
2012/06/27 23:08:11
This doesn't seem to test too much, since most mac
bradn
2012/06/28 01:37:51
Done.
| |
22 stdout=('Running %s\n' % platform)) | 27 stdout=('Running %s\n' % platform)) |
23 except WindowsError, e: | 28 except WindowsError, e: |
24 # Assume the exe is 64-bit if it can't load on 32-bit systems. | 29 # Assume the exe is 64-bit if it can't load on 32-bit systems. |
25 if platform == 'x64' and (e.errno == 193 or '[Error 193]' in str(e)): | 30 if platform == 'x64' and (e.errno == 193 or '[Error 193]' in str(e)): |
26 continue | 31 continue |
27 raise | 32 raise |
28 | 33 |
29 test.pass_test() | 34 test.pass_test() |
OLD | NEW |