1#!/usr/bin/env python
2
3# Copyright (c) 2012 Google Inc. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7"""
8Verifies build of an executable in three different configurations.
9"""
10
11import TestGyp
12
13import sys
14
15formats = ['msvs']
16if sys.platform == 'win32':
17  formats += ['ninja']
18test = TestGyp.TestGyp(formats=formats)
19
20test.run_gyp('configurations.gyp')
21test.set_configuration('Debug|Win32')
22test.build('configurations.gyp', test.ALL)
23
24for machine, suffix in [('14C machine (x86)', ''),
25                        ('8664 machine (x64)', '64')]:
26  output = test.run_dumpbin(
27      '/headers', test.built_file_path('configurations%s.exe' % suffix))
28  if machine not in output:
29    test.fail_test()
30
31test.pass_test()
32