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

« back to all changes in this revision

Viewing changes to mozc_build_tools/gyp/test/rules-rebuild/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 that a rule that generates multiple outputs rebuilds
 
9
correctly when the inputs change.
 
10
"""
 
11
 
 
12
import TestGyp
 
13
 
 
14
test = TestGyp.TestGyp()
 
15
 
 
16
if test.format == 'msvs':
 
17
  msg = 'TODO:  issue 120:  disabled on MSVS due to test execution problems.\n'
 
18
  test.skip_test(msg)
 
19
 
 
20
test.run_gyp('same_target.gyp', chdir='src')
 
21
 
 
22
test.relocate('src', 'relocate/src')
 
23
 
 
24
 
 
25
test.build('same_target.gyp', chdir='relocate/src')
 
26
 
 
27
expect = """\
 
28
Hello from main.c
 
29
Hello from prog1.in!
 
30
Hello from prog2.in!
 
31
"""
 
32
 
 
33
test.run_built_executable('program', chdir='relocate/src', stdout=expect)
 
34
 
 
35
test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')
 
36
 
 
37
 
 
38
test.sleep()
 
39
contents = test.read(['relocate', 'src', 'prog1.in'])
 
40
contents = contents.replace('!', ' AGAIN!')
 
41
test.write(['relocate', 'src', 'prog1.in'], contents)
 
42
 
 
43
test.build('same_target.gyp', chdir='relocate/src')
 
44
 
 
45
expect = """\
 
46
Hello from main.c
 
47
Hello from prog1.in AGAIN!
 
48
Hello from prog2.in!
 
49
"""
 
50
 
 
51
test.run_built_executable('program', chdir='relocate/src', stdout=expect)
 
52
 
 
53
test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')
 
54
 
 
55
 
 
56
test.sleep()
 
57
contents = test.read(['relocate', 'src', 'prog2.in'])
 
58
contents = contents.replace('!', ' AGAIN!')
 
59
test.write(['relocate', 'src', 'prog2.in'], contents)
 
60
 
 
61
test.build('same_target.gyp', chdir='relocate/src')
 
62
 
 
63
expect = """\
 
64
Hello from main.c
 
65
Hello from prog1.in AGAIN!
 
66
Hello from prog2.in AGAIN!
 
67
"""
 
68
 
 
69
test.run_built_executable('program', chdir='relocate/src', stdout=expect)
 
70
 
 
71
test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')
 
72
 
 
73
 
 
74
test.pass_test()