19621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com#!/usr/bin/env python
29621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com
39621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com# Copyright (c) 2009 Google Inc. All rights reserved.
49621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com# Use of this source code is governed by a BSD-style license that can be
59621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com# found in the LICENSE file.
69621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com
79621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com"""
89621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.comVerifies build of an executable in three different configurations.
99621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com"""
109621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com
119621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.comimport TestGyp
129621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com
139621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.comtest = TestGyp.TestGyp()
149621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com
15dacdd38025590eb2d6f443401d018c34e9e5c3b7torne@chromium.orgif test.format == 'android':
16dacdd38025590eb2d6f443401d018c34e9e5c3b7torne@chromium.org  # This test currently fails on android. Investigate why, fix the issues
17dacdd38025590eb2d6f443401d018c34e9e5c3b7torne@chromium.org  # responsible, and reenable this test on android. See bug:
18dacdd38025590eb2d6f443401d018c34e9e5c3b7torne@chromium.org  # https://code.google.com/p/gyp/issues/detail?id=436
19dacdd38025590eb2d6f443401d018c34e9e5c3b7torne@chromium.org  test.skip_test(message='Test fails on android. Fix and reenable.\n')
20dacdd38025590eb2d6f443401d018c34e9e5c3b7torne@chromium.org
219621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.comtest.run_gyp('configurations.gyp')
229621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com
239621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.comtest.set_configuration('Release')
249621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.comtest.build('configurations.gyp')
259621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.comtest.run_built_executable('configurations',
269621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com                          stdout=('Base configuration\n'
279621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com                                  'Common configuration\n'
289621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com                                  'Common2 configuration\n'
299621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com                                  'Release configuration\n'))
309621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com
319621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.comtest.set_configuration('Debug')
329621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.comtest.build('configurations.gyp')
339621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.comtest.run_built_executable('configurations',
349621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com                          stdout=('Base configuration\n'
359621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com                                  'Common configuration\n'
369621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com                                  'Common2 configuration\n'
379621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com                                  'Debug configuration\n'))
389621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.com
399621efca74be61ae212dd2ca848cb21179c3e8c1bradnelson@google.comtest.pass_test()
40