~ubuntu-branches/ubuntu/oneiric/mozc/oneiric

« back to all changes in this revision

Viewing changes to mozc_build_tools/gyp/test/generator-output/gyptest-top-all.py

  • Committer: Bazaar Package Importer
  • Author(s): Nobuhiro Iwamatsu
  • Date: 2010-07-14 03:26:47 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100714032647-13qjisj6m8cm8jdx
Tags: 0.12.410.102-1
* New upstream release (Closes: #588971).
  - Add mozc-server, mozc-utils-gui and scim-mozc packages.
* Update debian/rules.
  Add --gypdir option to build_mozc.py.
* Update debian/control.
  - Bumped standards-version to 3.9.0.
  - Update description.
* Add mozc icon (Closes: #588972).
* Add patch which revises issue 18.
  ibus_mozc_issue18.patch
* kFreeBSD build support.
  support_kfreebsd.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
"""
 
8
Verifies building a project hierarchy created when the --generator-output=
 
9
option is used to put the build configuration files in a separate
 
10
directory tree.
 
11
"""
 
12
 
 
13
import TestGyp
 
14
 
 
15
test = TestGyp.TestGyp()
 
16
 
 
17
test.writable(test.workpath('src'), False)
 
18
 
 
19
test.run_gyp('prog1.gyp',
 
20
             '-Dset_symroot=1',
 
21
             '--generator-output=' + test.workpath('gypfiles'),
 
22
             chdir='src')
 
23
 
 
24
test.writable(test.workpath('src/build'), True)
 
25
test.writable(test.workpath('src/subdir2/build'), True)
 
26
test.writable(test.workpath('src/subdir3/build'), True)
 
27
 
 
28
test.build('prog1.gyp', test.ALL, chdir='gypfiles')
 
29
 
 
30
chdir = 'gypfiles'
 
31
 
 
32
expect = """\
 
33
Hello from %s
 
34
Hello from inc.h
 
35
Hello from inc1/include1.h
 
36
Hello from inc2/include2.h
 
37
Hello from inc3/include3.h
 
38
Hello from subdir2/deeper/deeper.h
 
39
"""
 
40
 
 
41
if test.format == 'xcode':
 
42
  chdir = 'src'
 
43
test.run_built_executable('prog1', chdir=chdir, stdout=expect % 'prog1.c')
 
44
 
 
45
if test.format == 'xcode':
 
46
  chdir = 'src/subdir2'
 
47
test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c')
 
48
 
 
49
if test.format == 'xcode':
 
50
  chdir = 'src/subdir3'
 
51
test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c')
 
52
 
 
53
test.pass_test()