Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: test/rules-rebuild/gyptest-default.py

Issue 300016: Fix generators to make sure changes to rule inputs trigger correct rebuilds.... (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: add same_target.gyp Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/rules-rebuild/gyptest-all.py ('k') | test/rules-rebuild/src/main.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 """
4 Verifies that a rule that generates multiple outputs rebuilds
5 correctly when the inputs change.
6 """
7
8 import TestGyp
9
10 test = TestGyp.TestGyp()
11
12 if test.format == 'msvs':
13 msg = 'TODO: issue 120: disabled on MSVS due to test execution problems.\n'
14 test.skip_test(msg)
15
16 if test.format == 'xcode':
17 msg = 'TODO: issue 94: disabled on Xcode due to rule timing issues.\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()
OLDNEW
« no previous file with comments | « test/rules-rebuild/gyptest-all.py ('k') | test/rules-rebuild/src/main.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698