OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 |
| 3 # Copyright (c) 2016 Mark Callow. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 7 """ |
| 8 Verifies that files are copied to the correct destinations when those |
| 9 destinations are specified using environment variables available in |
| 10 Xcode's PBXCopyFilesBuildPhase. |
| 11 """ |
| 12 |
| 13 import TestGyp |
| 14 |
| 15 import os |
| 16 import stat |
| 17 import sys |
| 18 |
| 19 |
| 20 test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode']) |
| 21 |
| 22 if sys.platform == 'darwin': |
| 23 test.run_gyp('copies-with-xcode-envvars.gyp', |
| 24 chdir='copies-with-xcode-envvars') |
| 25 |
| 26 test.build('copies-with-xcode-envvars.gyp', chdir='copies-with-xcode-envvars') |
| 27 |
| 28 wrapper_name = 'copies-with-xcode-envvars.app/' |
| 29 contents_path = wrapper_name + 'Contents/' |
| 30 out_path = test.built_file_path('file0', chdir='copies-with-xcode-envvars') |
| 31 test.must_contain(out_path, 'file0 contents\n') |
| 32 out_path = test.built_file_path(wrapper_name + 'file1', |
| 33 chdir='copies-with-xcode-envvars') |
| 34 test.must_contain(out_path, 'file1 contents\n') |
| 35 out_path = test.built_file_path(contents_path + 'MacOS/file2', |
| 36 chdir='copies-with-xcode-envvars') |
| 37 test.must_contain(out_path, 'file2 contents\n') |
| 38 out_path = test.built_file_path(contents_path + 'Resources/file3', |
| 39 chdir='copies-with-xcode-envvars') |
| 40 test.must_contain(out_path, 'file3 contents\n') |
| 41 out_path = test.built_file_path(contents_path + 'Resources/testimages/file4', |
| 42 chdir='copies-with-xcode-envvars') |
| 43 test.must_contain(out_path, 'file4 contents\n') |
| 44 out_path = test.built_file_path(contents_path + 'Resources/Java/file5', |
| 45 chdir='copies-with-xcode-envvars') |
| 46 test.must_contain(out_path, 'file5 contents\n') |
| 47 out_path = test.built_file_path(contents_path + 'Frameworks/file6', |
| 48 chdir='copies-with-xcode-envvars') |
| 49 test.must_contain(out_path, 'file6 contents\n') |
| 50 out_path = test.built_file_path(contents_path + 'Frameworks/file7', |
| 51 chdir='copies-with-xcode-envvars') |
| 52 test.must_contain(out_path, 'file7 contents\n') |
| 53 out_path = test.built_file_path(contents_path + 'SharedFrameworks/file8', |
| 54 chdir='copies-with-xcode-envvars') |
| 55 test.must_contain(out_path, 'file8 contents\n') |
| 56 out_path = test.built_file_path(contents_path + 'SharedSupport/file9', |
| 57 chdir='copies-with-xcode-envvars') |
| 58 test.must_contain(out_path, 'file9 contents\n') |
| 59 out_path = test.built_file_path(contents_path + 'PlugIns/file10', |
| 60 chdir='copies-with-xcode-envvars') |
| 61 test.must_contain(out_path, 'file10 contents\n') |
| 62 out_path = test.built_file_path(contents_path + 'XPCServices/file11', |
| 63 chdir='copies-with-xcode-envvars') |
| 64 test.must_contain(out_path, 'file11 contents\n') |
| 65 test.pass_test() |
OLD | NEW |