OLD | NEW |
(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', test.ALL, 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', test.ALL, 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', test.ALL, 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() |
OLD | NEW |