| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2014 Google Inc. All rights reserved. | 3 # Copyright (c) 2014 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 Verify that running gyp in a different directory does not cause actions and | 8 Verify that running gyp in a different directory does not cause actions and |
| 9 rules to rerun. | 9 rules to rerun. |
| 10 """ | 10 """ |
| 11 | 11 |
| 12 import os | 12 import os |
| 13 import sys | 13 import sys |
| 14 import TestGyp | 14 import TestGyp |
| 15 | 15 |
| 16 test = TestGyp.TestGyp(formats=['ninja']) | 16 test = TestGyp.TestGyp(formats=['ninja']) |
| 17 # The xcode-ninja generator handles gypfiles which are not at the |
| 18 # project root incorrectly. |
| 19 # cf. https://code.google.com/p/gyp/issues/detail?id=460 |
| 20 if test.format == 'xcode-ninja': |
| 21 test.skip_test() |
| 17 | 22 |
| 18 test.run_gyp('subdir/action-rule-hash.gyp') | 23 test.run_gyp('subdir/action-rule-hash.gyp') |
| 19 test.build('subdir/action-rule-hash.gyp', test.ALL) | 24 test.build('subdir/action-rule-hash.gyp', test.ALL) |
| 20 test.up_to_date('subdir/action-rule-hash.gyp') | 25 test.up_to_date('subdir/action-rule-hash.gyp') |
| 21 | 26 |
| 22 # Verify that everything is still up-to-date when we re-invoke gyp from a | 27 # Verify that everything is still up-to-date when we re-invoke gyp from a |
| 23 # different directory. | 28 # different directory. |
| 24 test.run_gyp('action-rule-hash.gyp', '--depth=../', chdir='subdir') | 29 test.run_gyp('action-rule-hash.gyp', '--depth=../', chdir='subdir') |
| 25 test.up_to_date('subdir/action-rule-hash.gyp') | 30 test.up_to_date('subdir/action-rule-hash.gyp') |
| 26 | 31 |
| 27 test.pass_test() | 32 test.pass_test() |
| OLD | NEW |