| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/env python | |
| 2 | |
| 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 | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 """ | |
| 8 Verifies --root-target removes the unnecessary targets. | |
| 9 """ | |
| 10 | |
| 11 import TestGyp | |
| 12 | |
| 13 test = TestGyp.TestGyp() | |
| 14 | |
| 15 # By default, everything will be included. | |
| 16 test.run_gyp('test1.gyp') | |
| 17 test.build('test1.gyp', 'lib1') | |
| 18 test.build('test1.gyp', 'lib2') | |
| 19 test.build('test1.gyp', 'lib3') | |
| 20 test.build('test1.gyp', 'lib_indirect') | |
| 21 test.build('test1.gyp', 'program1') | |
| 22 test.build('test1.gyp', 'program2') | |
| 23 test.build('test1.gyp', 'program3') | |
| 24 | |
| 25 # With deep dependencies of program1 only. | |
| 26 test.run_gyp('test1.gyp', '--root-target=program1') | |
| 27 test.build('test1.gyp', 'lib1') | |
| 28 test.build('test1.gyp', 'lib2', status=[1,2], stderr=None) | |
| 29 test.build('test1.gyp', 'lib3', status=[1,2], stderr=None) | |
| 30 test.build('test1.gyp', 'lib_indirect') | |
| 31 test.build('test1.gyp', 'program1') | |
| 32 test.build('test1.gyp', 'program2', status=[1,2], stderr=None) | |
| 33 test.build('test1.gyp', 'program3', status=[1,2], stderr=None) | |
| 34 | |
| 35 # With deep dependencies of program2 only. | |
| 36 test.run_gyp('test1.gyp', '--root-target=program2') | |
| 37 test.build('test1.gyp', 'lib1', status=[1,2], stderr=None) | |
| 38 test.build('test1.gyp', 'lib2') | |
| 39 test.build('test1.gyp', 'lib3', status=[1,2], stderr=None) | |
| 40 test.build('test1.gyp', 'lib_indirect') | |
| 41 test.build('test1.gyp', 'program1', status=[1,2], stderr=None) | |
| 42 test.build('test1.gyp', 'program2') | |
| 43 test.build('test1.gyp', 'program3', status=[1,2], stderr=None) | |
| 44 | |
| 45 # With deep dependencies of program1 and program2. | |
| 46 test.run_gyp('test1.gyp', '--root-target=program1', '--root-target=program2') | |
| 47 test.build('test1.gyp', 'lib1') | |
| 48 test.build('test1.gyp', 'lib2') | |
| 49 test.build('test1.gyp', 'lib3', status=[1,2], stderr=None) | |
| 50 test.build('test1.gyp', 'lib_indirect') | |
| 51 test.build('test1.gyp', 'program1') | |
| 52 test.build('test1.gyp', 'program2') | |
| 53 test.build('test1.gyp', 'program3', status=[1,2], stderr=None) | |
| 54 | |
| 55 test.pass_test() | |
| OLD | NEW |