• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 simplest-possible build of a "Hello, world!" program
9using the default build target.
10"""
11
12import TestGyp
13
14# Android does not support setting the build directory.
15test = TestGyp.TestGyp(formats=['!android'])
16
17test.run_gyp('product.gyp')
18test.build('product.gyp')
19
20# executables
21test.built_file_must_exist('alt1' + test._exe, test.EXECUTABLE, bare=True)
22test.built_file_must_exist('hello2.stuff', test.EXECUTABLE, bare=True)
23test.built_file_must_exist('yoalt3.stuff', test.EXECUTABLE, bare=True)
24
25# shared libraries
26test.built_file_must_exist(test.dll_ + 'alt4' + test._dll,
27                           test.SHARED_LIB, bare=True)
28test.built_file_must_exist(test.dll_ + 'hello5.stuff',
29                           test.SHARED_LIB, bare=True)
30test.built_file_must_exist('yoalt6.stuff', test.SHARED_LIB, bare=True)
31
32# static libraries
33test.built_file_must_exist(test.lib_ + 'alt7' + test._lib,
34                           test.STATIC_LIB, bare=True)
35test.built_file_must_exist(test.lib_ + 'hello8.stuff',
36                           test.STATIC_LIB, bare=True)
37test.built_file_must_exist('yoalt9.stuff', test.STATIC_LIB, bare=True)
38
39# alternate product_dir
40test.built_file_must_exist('bob/yoalt10.stuff', test.EXECUTABLE, bare=True)
41test.built_file_must_exist('bob/yoalt11.stuff', test.EXECUTABLE, bare=True)
42test.built_file_must_exist('bob/yoalt12.stuff', test.EXECUTABLE, bare=True)
43
44test.pass_test()
45