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

« back to all changes in this revision

Viewing changes to third_party/gyp/test/actions/gyptest-default.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 simple actions when using the default build target.
 
9
"""
 
10
 
 
11
import TestGyp
 
12
 
 
13
test = TestGyp.TestGyp()
 
14
 
 
15
test.run_gyp('actions.gyp', chdir='src')
 
16
 
 
17
test.relocate('src', 'relocate/src')
 
18
 
 
19
# Test that an "always run" action increases a counter on multiple invocations,
 
20
# and that a dependent action updates in step.
 
21
test.build('actions.gyp', chdir='relocate/src')
 
22
test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '1')
 
23
test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '1')
 
24
test.build('actions.gyp', chdir='relocate/src')
 
25
test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '2')
 
26
test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '2')
 
27
 
 
28
# The "always run" action only counts to 2, but the dependent target will count
 
29
# forever if it's allowed to run. This verifies that the dependent target only
 
30
# runs when the "always run" action generates new output, not just because the
 
31
# "always run" ran.
 
32
test.build('actions.gyp', test.ALL, chdir='relocate/src')
 
33
test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '2')
 
34
test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '2')
 
35
 
 
36
expect = """\
 
37
Hello from program.c
 
38
Hello from make-prog1.py
 
39
Hello from make-prog2.py
 
40
"""
 
41
 
 
42
if test.format == 'xcode':
 
43
  chdir = 'relocate/src/subdir1'
 
44
else:
 
45
  chdir = 'relocate/src'
 
46
test.run_built_executable('program', chdir=chdir, stdout=expect)
 
47
 
 
48
 
 
49
test.must_match('relocate/src/subdir2/file.out', "Hello from make-file.py\n")
 
50
 
 
51
 
 
52
expect = "Hello from generate_main.py\n"
 
53
 
 
54
if test.format == 'xcode':
 
55
  chdir = 'relocate/src/subdir3'
 
56
else:
 
57
  chdir = 'relocate/src'
 
58
test.run_built_executable('null_input', chdir=chdir, stdout=expect)
 
59
 
 
60
 
 
61
test.pass_test()