Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Unified Diff: test/mac/gyptest-identical-name.py

Issue 748793002: Fixed Gyp Xcode generator for libraries with identical names. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Added comments in the empty CLs for them to be correctly patched. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pylib/gyp/xcodeproj_file.py ('k') | test/mac/identical-name/proxy/proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mac/gyptest-identical-name.py
diff --git a/test/mac/gyptest-identical-name.py b/test/mac/gyptest-identical-name.py
new file mode 100644
index 0000000000000000000000000000000000000000..0d358df9210f878244c5bf53b6b85af5d69866bf
--- /dev/null
+++ b/test/mac/gyptest-identical-name.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2014 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.
+
+"""
+Verifies libraries (in identical-names) are properly handeled by xcode.
+
+The names for all libraries participating in this build are:
+libtestlib.a - identical-name/testlib
+libtestlib.a - identical-name/proxy/testlib
+libproxy.a - identical-name/proxy
+The first two libs produce a hash collision in Xcode when Gyp is executed,
+because they have the same name and would be copied to the same directory with
+Xcode default settings.
+For this scenario to work one needs to change the Xcode variables SYMROOT and
+CONFIGURATION_BUILD_DIR. Setting these to per-lib-unique directories, avoids
+copying the libs into the same directory.
+
+The test consists of two steps. The first one verifies that by setting both
+vars, there is no hash collision anymore during Gyp execution and that the libs
+can actually be be built. The second one verifies that there is still a hash
+collision if the vars are not set and thus the current behavior is preserved.
+"""
+
+import TestGyp
+
+import sys
+
+def IgnoreOutput(string, expected_string):
+ return True
+
+if sys.platform == 'darwin':
+ test = TestGyp.TestGyp(formats=['xcode'])
+
+
+ test.run_gyp('test.gyp', chdir='identical-name')
+ test.build('test.gyp', test.ALL, chdir='identical-name')
+
+ test.run_gyp('test-should-fail.gyp', chdir='identical-name')
+ test.built_file_must_not_exist('test-should-fail.xcodeproj')
+
+ test.pass_test()
+
« no previous file with comments | « pylib/gyp/xcodeproj_file.py ('k') | test/mac/identical-name/proxy/proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698