Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | #!/usr/bin/env python |
michael@0 | 2 | |
michael@0 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. |
michael@0 | 4 | # Use of this source code is governed by a BSD-style license that can be |
michael@0 | 5 | # found in the LICENSE file. |
michael@0 | 6 | |
michael@0 | 7 | """ |
michael@0 | 8 | Verify that a hard_dependency that is not exported is not pulled in as a |
michael@0 | 9 | dependency for a target if the target does not explicitly specify a dependency |
michael@0 | 10 | and none of its dependencies export the hard_dependency. |
michael@0 | 11 | """ |
michael@0 | 12 | |
michael@0 | 13 | import TestGyp |
michael@0 | 14 | |
michael@0 | 15 | test = TestGyp.TestGyp() |
michael@0 | 16 | |
michael@0 | 17 | if test.format == 'dump_dependency_json': |
michael@0 | 18 | test.skip_test('Skipping test; dependency JSON does not adjust ' \ |
michael@0 | 19 | 'static libaries.\n') |
michael@0 | 20 | |
michael@0 | 21 | test.run_gyp('hard_dependency.gyp', chdir='src') |
michael@0 | 22 | |
michael@0 | 23 | chdir = 'relocate/src' |
michael@0 | 24 | test.relocate('src', chdir) |
michael@0 | 25 | |
michael@0 | 26 | test.build('hard_dependency.gyp', 'd', chdir=chdir) |
michael@0 | 27 | |
michael@0 | 28 | # Because 'c' does not export a hard_dependency, only the target 'd' should |
michael@0 | 29 | # be built. This is because the 'd' target does not need the generated headers |
michael@0 | 30 | # in order to be compiled. |
michael@0 | 31 | test.built_file_must_not_exist('a', type=test.STATIC_LIB, chdir=chdir) |
michael@0 | 32 | test.built_file_must_not_exist('b', type=test.STATIC_LIB, chdir=chdir) |
michael@0 | 33 | test.built_file_must_not_exist('c', type=test.STATIC_LIB, chdir=chdir) |
michael@0 | 34 | test.built_file_must_exist('d', type=test.STATIC_LIB, chdir=chdir) |
michael@0 | 35 | |
michael@0 | 36 | test.pass_test() |