| 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 --root-target removes the unnecessary targets. | 8 Verifies --root-target removes the unnecessary targets. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import TestGyp | 11 import TestGyp |
| 12 | 12 |
| 13 test = TestGyp.TestGyp() | 13 test = TestGyp.TestGyp() |
| 14 # The xcode-ninja generator has its own logic for which targets to include |
| 15 if test.format == 'xcode-ninja': |
| 16 test.skip_test() |
| 14 | 17 |
| 15 build_error_code = { | 18 build_error_code = { |
| 16 'android': 2, | 19 'android': 2, |
| 17 'cmake': 1, | 20 'cmake': 1, |
| 18 'make': 2, | 21 'make': 2, |
| 19 'msvs': 1, | 22 'msvs': 1, |
| 20 'ninja': 1, | 23 'ninja': 1, |
| 21 'xcode': 65, | 24 'xcode': 65, |
| 22 }[test.format] | 25 }[test.format] |
| 23 | 26 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 test.run_gyp('test1.gyp', '--root-target=program1', '--root-target=program2') | 58 test.run_gyp('test1.gyp', '--root-target=program1', '--root-target=program2') |
| 56 test.build('test2.gyp', 'lib1') | 59 test.build('test2.gyp', 'lib1') |
| 57 test.build('test2.gyp', 'lib2') | 60 test.build('test2.gyp', 'lib2') |
| 58 test.build('test2.gyp', 'lib3', status=build_error_code, stderr=None) | 61 test.build('test2.gyp', 'lib3', status=build_error_code, stderr=None) |
| 59 test.build('test2.gyp', 'lib_indirect') | 62 test.build('test2.gyp', 'lib_indirect') |
| 60 test.build('test1.gyp', 'program1') | 63 test.build('test1.gyp', 'program1') |
| 61 test.build('test1.gyp', 'program2') | 64 test.build('test1.gyp', 'program2') |
| 62 test.build('test1.gyp', 'program3', status=build_error_code, stderr=None) | 65 test.build('test1.gyp', 'program3', status=build_error_code, stderr=None) |
| 63 | 66 |
| 64 test.pass_test() | 67 test.pass_test() |
| OLD | NEW |