|
11 | 11 | """
|
12 | 12 |
|
13 | 13 | import TestGyp
|
14 |
| - |
15 |
| -import os |
16 |
| -import stat |
17 |
| -import sys |
18 |
| - |
19 |
| - |
20 |
| -test = TestGyp.TestGyp(formats=['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 |
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', chdir='copies-with-xcode-envvars') |
33 |
| - test.must_contain(out_path, 'file1 contents\n') |
34 |
| - out_path = test.built_file_path(contents_path + 'file2', chdir='copies-with-xcode-envvars') |
35 |
| - test.must_contain(out_path, 'file2 contents\n') |
36 |
| - out_path = test.built_file_path(contents_path + 'file3', chdir='copies-with-xcode-envvars') |
37 |
| - test.must_contain(out_path, 'file3 contents\n') |
38 |
| - out_path = test.built_file_path(contents_path + 'testimages/file4', chdir='copies-with-xcode-envvars') |
39 |
| - test.must_contain(out_path, 'file4 contents\n') |
40 |
| - out_path = test.built_file_path(contents_path + 'Java/file5', chdir='copies-with-xcode-envvars') |
41 |
| - test.must_contain(out_path, 'file5 contents\n') |
42 |
| - out_path = test.built_file_path(contents_path + 'Frameworks/file6', chdir='copies-with-xcode-envvars') |
43 |
| - test.must_contain(out_path, 'file6 contents\n') |
44 |
| - out_path = test.built_file_path(contents_path + 'Frameworks/file7', chdir='copies-with-xcode-envvars') |
45 |
| - test.must_contain(out_path, 'file7 contents\n') |
46 |
| - out_path = test.built_file_path(contents_path + 'SharedFrameworks/file8', chdir='copies-with-xcode-envvars') |
47 |
| - test.must_contain(out_path, 'file8 contents\n') |
48 |
| - out_path = test.built_file_path(contents_path + 'SharedSupport/file9', chdir='copies-with-xcode-envvars') |
49 |
| - test.must_contain(out_path, 'file9 contents\n') |
50 |
| - out_path = test.built_file_path(contents_path + 'PlugIns/file10', chdir='copies-with-xcode-envvars') |
51 |
| - test.must_contain(out_path, 'file10 contents\n') |
52 |
| - out_path = test.built_file_path(contents_path + 'XPCServices/file11', chdir='copies-with-xcode-envvars') |
53 |
| - test.must_contain(out_path, 'file11 contents\n') |
54 |
| - test.pass_test() |
| 14 | +import XCodeDetect |
| 15 | + |
| 16 | +test = TestGyp.TestGyp(formats=['ninja', 'xcode'], platforms=['darwin']) |
| 17 | + |
| 18 | +if not XCodeDetect.IPhoneSDKPath(): |
| 19 | + test.skip_test('Skip test when no IPhone SDK') |
| 20 | + |
| 21 | +test.run_gyp('copies-with-xcode-envvars.gyp', chdir='copies-with-xcode-envvars') |
| 22 | + |
| 23 | +test.build('copies-with-xcode-envvars.gyp', chdir='copies-with-xcode-envvars') |
| 24 | + |
| 25 | +wrapper_name = 'copies-with-xcode-envvars.app/' |
| 26 | +contents_path = wrapper_name |
| 27 | +out_path = test.built_file_path('file0', chdir='copies-with-xcode-envvars') |
| 28 | +test.must_contain(out_path, 'file0 contents\n') |
| 29 | +out_path = test.built_file_path(wrapper_name + 'file1', chdir='copies-with-xcode-envvars') |
| 30 | +test.must_contain(out_path, 'file1 contents\n') |
| 31 | +out_path = test.built_file_path(contents_path + 'file2', chdir='copies-with-xcode-envvars') |
| 32 | +test.must_contain(out_path, 'file2 contents\n') |
| 33 | +out_path = test.built_file_path(contents_path + 'file3', chdir='copies-with-xcode-envvars') |
| 34 | +test.must_contain(out_path, 'file3 contents\n') |
| 35 | +out_path = test.built_file_path(contents_path + 'testimages/file4', chdir='copies-with-xcode-envvars') |
| 36 | +test.must_contain(out_path, 'file4 contents\n') |
| 37 | +out_path = test.built_file_path(contents_path + 'Java/file5', chdir='copies-with-xcode-envvars') |
| 38 | +test.must_contain(out_path, 'file5 contents\n') |
| 39 | +out_path = test.built_file_path(contents_path + 'Frameworks/file6', chdir='copies-with-xcode-envvars') |
| 40 | +test.must_contain(out_path, 'file6 contents\n') |
| 41 | +out_path = test.built_file_path(contents_path + 'Frameworks/file7', chdir='copies-with-xcode-envvars') |
| 42 | +test.must_contain(out_path, 'file7 contents\n') |
| 43 | +out_path = test.built_file_path(contents_path + 'SharedFrameworks/file8', chdir='copies-with-xcode-envvars') |
| 44 | +test.must_contain(out_path, 'file8 contents\n') |
| 45 | +out_path = test.built_file_path(contents_path + 'SharedSupport/file9', chdir='copies-with-xcode-envvars') |
| 46 | +test.must_contain(out_path, 'file9 contents\n') |
| 47 | +out_path = test.built_file_path(contents_path + 'PlugIns/file10', chdir='copies-with-xcode-envvars') |
| 48 | +test.must_contain(out_path, 'file10 contents\n') |
| 49 | +out_path = test.built_file_path(contents_path + 'XPCServices/file11', chdir='copies-with-xcode-envvars') |
| 50 | +test.must_contain(out_path, 'file11 contents\n') |
| 51 | +test.pass_test() |
0 commit comments