1#!/usr/bin/env python
2
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
5# found in the LICENSE file.
6
7"""
8Verifies build of an executable in three different configurations.
9"""
10
11import TestGyp
12
13test = TestGyp.TestGyp()
14
15if test.format == 'android':
16  # This test currently fails on android. Investigate why, fix the issues
17  # responsible, and reenable this test on android. See bug:
18  # https://code.google.com/p/gyp/issues/detail?id=436
19  test.skip_test(message='Test fails on android. Fix and reenable.\n')
20
21test.run_gyp('configurations.gyp')
22
23test.set_configuration('Release')
24test.build('configurations.gyp')
25test.run_built_executable('configurations',
26                          stdout=('Base configuration\n'
27                                  'Common configuration\n'
28                                  'Common2 configuration\n'
29                                  'Release configuration\n'))
30
31test.set_configuration('Debug')
32test.build('configurations.gyp')
33test.run_built_executable('configurations',
34                          stdout=('Base configuration\n'
35                                  'Common configuration\n'
36                                  'Common2 configuration\n'
37                                  'Debug configuration\n'))
38
39test.pass_test()
40