| 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 when multiple values are supplied for a gyp define, the last one | 8 Verifies that when multiple values are supplied for a gyp define, the last one |
| 9 is used. | 9 is used. |
| 10 """ | 10 """ |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 # The last occurrence of a repeated set should take precedence over other | 23 # The last occurrence of a repeated set should take precedence over other |
| 24 # values. | 24 # values. |
| 25 os.environ['GYP_DEFINES'] = 'key=repeated_value key=value1 key=repeated_value' | 25 os.environ['GYP_DEFINES'] = 'key=repeated_value key=value1 key=repeated_value' |
| 26 test.run_gyp('defines.gyp') | 26 test.run_gyp('defines.gyp') |
| 27 | 27 |
| 28 if test.format == 'msvs' and not test.uses_msbuild: | 28 if test.format == 'msvs' and not test.uses_msbuild: |
| 29 # msvs versions before 2010 don't detect build rule changes not reflected | 29 # msvs versions before 2010 don't detect build rule changes not reflected |
| 30 # in file system timestamps. Rebuild to see differences. | 30 # in file system timestamps. Rebuild to see differences. |
| 31 test.build('defines.gyp', rebuild=True) | 31 test.build('defines.gyp', rebuild=True) |
| 32 elif test.format == 'android': | |
| 33 # The Android build system doesn't currently have a way to get files whose | |
| 34 # build rules have changed (but whose timestamps haven't) to be rebuilt. | |
| 35 # See bug http://code.google.com/p/gyp/issues/detail?id=308 | |
| 36 test.unlink('action.txt') | |
| 37 test.build('defines.gyp') | |
| 38 else: | 32 else: |
| 39 test.build('defines.gyp') | 33 test.build('defines.gyp') |
| 40 test.must_contain('action.txt', 'repeated_value') | 34 test.must_contain('action.txt', 'repeated_value') |
| 41 | 35 |
| 42 test.pass_test() | 36 test.pass_test() |
| OLD | NEW |