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

Unified Diff: test/mac/gyptest-copies-with-xcode-envvars.py

Issue 1785543006: Complete PBXCopyFilesBuildPhase TODO in xcodeproj_file.py. (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 4 years, 9 months 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
Index: test/mac/gyptest-copies-with-xcode-envvars.py
diff --git a/test/mac/gyptest-copies-with-xcode-envvars.py b/test/mac/gyptest-copies-with-xcode-envvars.py
new file mode 100644
index 0000000000000000000000000000000000000000..a7fce275ba52b26b0364e301bdacbb47c839c456
--- /dev/null
+++ b/test/mac/gyptest-copies-with-xcode-envvars.py
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2016, Mark Callow. All rights reserved.
Mark Mentovai 2016/05/06 20:26:53 Same.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""
+Verifies that files are copied to the correct destinations when those
+destinations are specified using environment variables available in
+Xcode's PBXCopyFilesBuildPhase.
+"""
+
+import TestGyp
+
+import os
+import stat
+import sys
+
+
+test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode'])
+
+if sys.platform == 'darwin':
+ test.run_gyp('copies-with-xcode-envvars.gyp',
+ chdir='copies-with-xcode-envvars')
+
+ test.build('copies-with-xcode-envvars.gyp', chdir='copies-with-xcode-envvars')
+
+ wrapper_name = 'copies-with-xcode-envvars.app/'
+ contents_path = wrapper_name + 'Contents/'
+ out_path = test.built_file_path('file0', chdir='copies-with-xcode-envvars')
+ test.must_contain(out_path, 'file0 contents\n')
+ out_path = test.built_file_path(wrapper_name + 'file1',
+ chdir='copies-with-xcode-envvars')
+ test.must_contain(out_path, 'file1 contents\n')
+ out_path = test.built_file_path(contents_path + 'MacOS/file2',
+ chdir='copies-with-xcode-envvars')
+ test.must_contain(out_path, 'file2 contents\n')
+ out_path = test.built_file_path(contents_path + 'Resources/file3',
+ chdir='copies-with-xcode-envvars')
+ test.must_contain(out_path, 'file3 contents\n')
+ out_path = test.built_file_path(contents_path + 'Resources/testimages/file4',
+ chdir='copies-with-xcode-envvars')
+ test.must_contain(out_path, 'file4 contents\n')
+ out_path = test.built_file_path(contents_path + 'Resources/Java/file5',
+ chdir='copies-with-xcode-envvars')
+ test.must_contain(out_path, 'file5 contents\n')
+ out_path = test.built_file_path(contents_path + 'Frameworks/file6',
+ chdir='copies-with-xcode-envvars')
+ test.must_contain(out_path, 'file6 contents\n')
+ out_path = test.built_file_path(contents_path + 'Frameworks/file7',
+ chdir='copies-with-xcode-envvars')
+ test.must_contain(out_path, 'file7 contents\n')
+ out_path = test.built_file_path(contents_path + 'SharedFrameworks/file8',
+ chdir='copies-with-xcode-envvars')
+ test.must_contain(out_path, 'file8 contents\n')
+ out_path = test.built_file_path(contents_path + 'SharedSupport/file9',
+ chdir='copies-with-xcode-envvars')
+ test.must_contain(out_path, 'file9 contents\n')
+ out_path = test.built_file_path(contents_path + 'PlugIns/file10',
+ chdir='copies-with-xcode-envvars')
+ test.must_contain(out_path, 'file10 contents\n')
+ out_path = test.built_file_path(contents_path + 'XPCServices/file11',
+ chdir='copies-with-xcode-envvars')
+ test.must_contain(out_path, 'file11 contents\n')
+ test.pass_test()

Powered by Google App Engine
This is Rietveld 408576698