OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2012 Google Inc. All rights reserved. | 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 | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """ | 7 """ |
8 Verifies that a rule that generates multiple outputs rebuilds | 8 Verifies that a rule that generates multiple outputs rebuilds |
9 correctly when the inputs change. | 9 correctly when the inputs change. |
10 """ | 10 """ |
11 | 11 |
12 import TestGyp | 12 import TestGyp |
13 | 13 |
14 import os | |
15 import sys | |
16 | |
17 test = TestGyp.TestGyp(workdir='workarea_default') | 14 test = TestGyp.TestGyp(workdir='workarea_default') |
18 if (test.format == 'msvs' and | |
19 int(os.environ.get('GYP_MSVS_VERSION', 0)) == 2013): | |
20 print 'This test is broken on VS2013. https://code.google.com/p/gyp/issues/det
ail?id=465' | |
21 sys.exit(0) | |
22 | |
23 | 15 |
24 test.run_gyp('same_target.gyp', chdir='src') | 16 test.run_gyp('same_target.gyp', chdir='src') |
25 | 17 |
26 test.relocate('src', 'relocate/src') | 18 test.relocate('src', 'relocate/src') |
27 | 19 |
28 | 20 |
29 test.build('same_target.gyp', chdir='relocate/src') | 21 test.build('same_target.gyp', chdir='relocate/src') |
30 | 22 |
31 expect = """\ | 23 expect = """\ |
32 Hello from main.c | 24 Hello from main.c |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 Hello from the amazing prog1.in AGAIN! | 82 Hello from the amazing prog1.in AGAIN! |
91 Hello from the amazing prog2.in AGAIN! | 83 Hello from the amazing prog2.in AGAIN! |
92 """ | 84 """ |
93 | 85 |
94 test.run_built_executable('program', chdir='relocate/src', stdout=expect) | 86 test.run_built_executable('program', chdir='relocate/src', stdout=expect) |
95 | 87 |
96 test.up_to_date('same_target.gyp', 'program', chdir='relocate/src') | 88 test.up_to_date('same_target.gyp', 'program', chdir='relocate/src') |
97 | 89 |
98 | 90 |
99 test.pass_test() | 91 test.pass_test() |
OLD | NEW |