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 |
14 test = TestGyp.TestGyp(workdir='workarea_default') | 17 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 |
15 | 23 |
16 test.run_gyp('same_target.gyp', chdir='src') | 24 test.run_gyp('same_target.gyp', chdir='src') |
17 | 25 |
18 test.relocate('src', 'relocate/src') | 26 test.relocate('src', 'relocate/src') |
19 | 27 |
20 | 28 |
21 test.build('same_target.gyp', chdir='relocate/src') | 29 test.build('same_target.gyp', chdir='relocate/src') |
22 | 30 |
23 expect = """\ | 31 expect = """\ |
24 Hello from main.c | 32 Hello from main.c |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 Hello from the amazing prog1.in AGAIN! | 90 Hello from the amazing prog1.in AGAIN! |
83 Hello from the amazing prog2.in AGAIN! | 91 Hello from the amazing prog2.in AGAIN! |
84 """ | 92 """ |
85 | 93 |
86 test.run_built_executable('program', chdir='relocate/src', stdout=expect) | 94 test.run_built_executable('program', chdir='relocate/src', stdout=expect) |
87 | 95 |
88 test.up_to_date('same_target.gyp', 'program', chdir='relocate/src') | 96 test.up_to_date('same_target.gyp', 'program', chdir='relocate/src') |
89 | 97 |
90 | 98 |
91 test.pass_test() | 99 test.pass_test() |
OLD | NEW |