OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2013 Google Inc. All rights reserved. | 3 # Copyright (c) 2013 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 dependencies on generated headers work, even if the header has | 8 Verifies that dependencies on generated headers work, even if the header has |
9 a mixed-case file name. | 9 a mixed-case file name. |
10 """ | 10 """ |
11 | 11 |
12 import TestGyp | 12 import TestGyp |
13 | 13 |
14 test = TestGyp.TestGyp() | 14 test = TestGyp.TestGyp() |
15 | 15 |
| 16 if test.format == 'android': |
| 17 # This test currently fails on android. Investigate why, fix the issues |
| 18 # responsible, and reenable this test on android. See bug: |
| 19 # https://code.google.com/p/gyp/issues/detail?id=436 |
| 20 test.skip_test(message='Test fails on android. Fix and reenable.\n') |
| 21 |
16 CHDIR = 'generated-header' | 22 CHDIR = 'generated-header' |
17 | 23 |
18 test.run_gyp('test.gyp', chdir=CHDIR) | 24 test.run_gyp('test.gyp', chdir=CHDIR) |
19 test.build('test.gyp', 'program', chdir=CHDIR) | 25 test.build('test.gyp', 'program', chdir=CHDIR) |
20 test.up_to_date('test.gyp', 'program', chdir=CHDIR) | 26 test.up_to_date('test.gyp', 'program', chdir=CHDIR) |
21 | 27 |
22 expect = 'foobar output\n' | 28 expect = 'foobar output\n' |
23 test.run_built_executable('program', chdir=CHDIR, stdout=expect) | 29 test.run_built_executable('program', chdir=CHDIR, stdout=expect) |
24 | 30 |
25 # Change what's written to the generated header, regyp and rebuild, and check | 31 # Change what's written to the generated header, regyp and rebuild, and check |
26 # that the change makes it to the executable and that the build is clean. | 32 # that the change makes it to the executable and that the build is clean. |
27 test.sleep() | 33 test.sleep() |
28 test.write('generated-header/test.gyp', | 34 test.write('generated-header/test.gyp', |
29 test.read('generated-header/test.gyp').replace('foobar', 'barbaz')) | 35 test.read('generated-header/test.gyp').replace('foobar', 'barbaz')) |
30 | 36 |
31 test.run_gyp('test.gyp', chdir=CHDIR) | 37 test.run_gyp('test.gyp', chdir=CHDIR) |
32 test.build('test.gyp', 'program', chdir=CHDIR) | 38 test.build('test.gyp', 'program', chdir=CHDIR) |
33 test.up_to_date('test.gyp', 'program', chdir=CHDIR) | 39 test.up_to_date('test.gyp', 'program', chdir=CHDIR) |
34 | 40 |
35 expect = 'barbaz output\n' | 41 expect = 'barbaz output\n' |
36 test.run_built_executable('program', chdir=CHDIR, stdout=expect) | 42 test.run_built_executable('program', chdir=CHDIR, stdout=expect) |
37 | 43 |
38 test.pass_test() | 44 test.pass_test() |
OLD | NEW |