summaryrefslogtreecommitdiff
path: root/tools/gyp/test/same-target-name-different-directory/gyptest-all.py
diff options
context:
space:
mode:
authorShigeki Ohtsu <ohtsu@iij.ad.jp>2015-03-30 14:33:17 +0900
committerShigeki Ohtsu <ohtsu@iij.ad.jp>2015-04-04 11:01:26 +0900
commit21f4fb62157567eb6e1eac08927d832c7b5b89dd (patch)
treea0f9f81df66f9ba9d2a925c6ce0d15954db57ffa /tools/gyp/test/same-target-name-different-directory/gyptest-all.py
parentefadffe8616b895cd67fd270eadbd241d1069a47 (diff)
downloadnode-new-21f4fb62157567eb6e1eac08927d832c7b5b89dd.tar.gz
deps: update gyp to e1c8fcf7
PR-URL: https://github.com/iojs/io.js/pull/1325 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'tools/gyp/test/same-target-name-different-directory/gyptest-all.py')
-rw-r--r--tools/gyp/test/same-target-name-different-directory/gyptest-all.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/tools/gyp/test/same-target-name-different-directory/gyptest-all.py b/tools/gyp/test/same-target-name-different-directory/gyptest-all.py
new file mode 100644
index 0000000000..bc9b960ffe
--- /dev/null
+++ b/tools/gyp/test/same-target-name-different-directory/gyptest-all.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2012 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""
+Test cases when multiple targets in different directories have the same name.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp(formats=['android', 'ninja', 'make'])
+
+# xcode-ninja fails to generate a project due to id collisions
+# cf. https://code.google.com/p/gyp/issues/detail?id=461
+if test.format == 'xcode-ninja':
+ test.skip_test()
+
+test.run_gyp('subdirs.gyp', chdir='src')
+
+test.relocate('src', 'relocate/src')
+
+# Test that we build all targets.
+test.build('subdirs.gyp', 'target', chdir='relocate/src')
+test.must_exist('relocate/src/subdir1/action1.txt')
+test.must_exist('relocate/src/subdir2/action2.txt')
+
+# Test that we build all targets using the correct actions, even if they have
+# the same names.
+test.build('subdirs.gyp', 'target_same_action_name', chdir='relocate/src')
+test.must_exist('relocate/src/subdir1/action.txt')
+test.must_exist('relocate/src/subdir2/action.txt')
+
+# Test that we build all targets using the correct rules, even if they have
+# the same names.
+test.build('subdirs.gyp', 'target_same_rule_name', chdir='relocate/src')
+test.must_exist('relocate/src/subdir1/rule.txt')
+test.must_exist('relocate/src/subdir2/rule.txt')
+
+test.pass_test()