1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/webrtc/trunk/tools/gyp/test/same-target-name-different-directory/gyptest-all.py Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 +#!/usr/bin/env python 1.5 + 1.6 +# Copyright (c) 2012 Google Inc. All rights reserved. 1.7 +# Use of this source code is governed by a BSD-style license that can be 1.8 +# found in the LICENSE file. 1.9 + 1.10 +""" 1.11 +Test cases when multiple targets in different directories have the same name. 1.12 +""" 1.13 + 1.14 +import TestGyp 1.15 + 1.16 +test = TestGyp.TestGyp(formats=['android', 'ninja', 'make']) 1.17 + 1.18 +test.run_gyp('subdirs.gyp', chdir='src') 1.19 + 1.20 +test.relocate('src', 'relocate/src') 1.21 + 1.22 +# Test that we build all targets. 1.23 +test.build('subdirs.gyp', 'target', chdir='relocate/src') 1.24 +test.must_exist('relocate/src/subdir1/action1.txt') 1.25 +test.must_exist('relocate/src/subdir2/action2.txt') 1.26 + 1.27 +# Test that we build all targets using the correct actions, even if they have 1.28 +# the same names. 1.29 +test.build('subdirs.gyp', 'target_same_action_name', chdir='relocate/src') 1.30 +test.must_exist('relocate/src/subdir1/action.txt') 1.31 +test.must_exist('relocate/src/subdir2/action.txt') 1.32 + 1.33 +# Test that we build all targets using the correct rules, even if they have 1.34 +# the same names. 1.35 +test.build('subdirs.gyp', 'target_same_rule_name', chdir='relocate/src') 1.36 +test.must_exist('relocate/src/subdir1/rule.txt') 1.37 +test.must_exist('relocate/src/subdir2/rule.txt') 1.38 + 1.39 +test.pass_test()