| 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 | 14 |
| 15 build_error_code = { | 15 build_error_code = { |
| 16 'android': 2, | 16 'android': 2, |
| 17 'cmake': 1, |
| 17 'make': 2, | 18 'make': 2, |
| 18 'msvs': 1, | 19 'msvs': 1, |
| 19 'ninja': 1, | 20 'ninja': 1, |
| 20 'xcode': 65, | 21 'xcode': 65, |
| 21 }[test.format] | 22 }[test.format] |
| 22 | 23 |
| 23 # By default, everything will be included. | 24 # By default, everything will be included. |
| 24 test.run_gyp('test1.gyp') | 25 test.run_gyp('test1.gyp') |
| 25 test.build('test2.gyp', 'lib1') | 26 test.build('test2.gyp', 'lib1') |
| 26 test.build('test2.gyp', 'lib2') | 27 test.build('test2.gyp', 'lib2') |
| (...skipping 27 matching lines...) Expand all Loading... |
| 54 test.run_gyp('test1.gyp', '--root-target=program1', '--root-target=program2') | 55 test.run_gyp('test1.gyp', '--root-target=program1', '--root-target=program2') |
| 55 test.build('test2.gyp', 'lib1') | 56 test.build('test2.gyp', 'lib1') |
| 56 test.build('test2.gyp', 'lib2') | 57 test.build('test2.gyp', 'lib2') |
| 57 test.build('test2.gyp', 'lib3', status=build_error_code, stderr=None) | 58 test.build('test2.gyp', 'lib3', status=build_error_code, stderr=None) |
| 58 test.build('test2.gyp', 'lib_indirect') | 59 test.build('test2.gyp', 'lib_indirect') |
| 59 test.build('test1.gyp', 'program1') | 60 test.build('test1.gyp', 'program1') |
| 60 test.build('test1.gyp', 'program2') | 61 test.build('test1.gyp', 'program2') |
| 61 test.build('test1.gyp', 'program3', status=build_error_code, stderr=None) | 62 test.build('test1.gyp', 'program3', status=build_error_code, stderr=None) |
| 62 | 63 |
| 63 test.pass_test() | 64 test.pass_test() |
| OLD | NEW |