pvjohnson / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

Xcode 5 compatibility #381

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I don’t think I’ll fix everything, but there are a bunch of tests that are 
easy to fix. Also, ninja should be made to use x86_64 as the default 
architecture if Xcode 5 is the installed Xcode, since that’s what Xcode 5 
does.

Original issue reported on code.google.com by mark@chromium.org on 15 Nov 2013 at 6:47

GoogleCodeExporter commented 9 years ago
https://codereview.chromium.org/74103002/
https://codereview.chromium.org/73063005/

Original comment by mark@chromium.org on 15 Nov 2013 at 6:49

GoogleCodeExporter commented 9 years ago
r1789 fixes a large number of tests on Xcode 5, and r1790 makes ninja match 
Xcode 5’s new default for ARCHS (and tests this as well).

These four tests are still failing on Xcode 5:

test/copies/gyptest-updir.py
Traceback (most recent call last):
  File "test/copies/gyptest-updir.py", line 22, in <module>
    chdir='relocate/src')
  File "/chrome/gyp/test/lib/TestGyp.py", line 150, in built_file_must_match
    return self.must_match(self.built_file_path(name, **kw), contents)
  File "/chrome/gyp/test/lib/TestCommon.py", line 326, in must_match
    file_contents = self.read(file, mode)
  File "/chrome/gyp/test/lib/TestCmd.py", line 1130, in read
    with open(file, mode) as f:
IOError: [Errno 2] No such file or directory: 
'/chrome/gyp/out/testworkarea/testgyp.jpPDDB/relocate/src/build/Default/../copie
s-out-updir/file1'

test/mac/gyptest-app.py
Expected "", got "macosx10.9"
FAILED test at line 25 of test/mac/gyptest-app.py (ExpectEq)
    from line 59 of test/mac/gyptest-app.py

test/mac/gyptest-type-envvars.py
STDERR =========================================================================
** BUILD FAILED **

The following build commands failed:
    PhaseScriptExecution Postbuild\ \"envtest\" build/test.build/Default/my_app.build/Script-40229F0DFC41E2024F73B236.sh
(1 failure)

FAILED test at line 423 of /chrome/gyp/test/lib/TestCommon.py (_complete)
    from line 532 of /chrome/gyp/test/lib/TestCommon.py (run)
    from line 275 of /chrome/gyp/test/lib/TestGyp.py (run)
    from line 948 of /chrome/gyp/test/lib/TestGyp.py (build)
    from line 20 of test/mac/gyptest-type-envvars.py

test/mac/gyptest-xcode-env-order.py
File 
`/chrome/gyp/out/testworkarea/testgyp.XT1lnj/xcode-env-order/build/Default/Test.
app/Contents/Info.plist' does not contain required string.
Required string ================================================================
    <key>BareProcessedKey3</key>
    <string>$PRODUCT_TYPE:D:/Source/Project/Test</string>
/chrome/gyp/out/testworkarea/testgyp.XT1lnj/xcode-env-order/build/Default/Test.a
pp/Contents/Info.plist contents 
[…]
    <key>BareProcessedKey3</key>
    <string>com.apple.product-type.application:D:/Source/Project/Test</string>
[…]

gyptest-updir is failing because Xcode 5 is not creating PRODUCT_DIR for a 
none-type target, so build/Default does not exist, and although 
build/copies-out-updir/file1 does exist, it can’t be located by the path 
build/Default/../copies-out-updir/file1.

gyptest-app and gyptest-type-envvars look like they’re failing because Xcode 
5 now always behaves as though an SDK is set, defaulting to the current OS SDK, 
even when no SDK is explicitly requested.

gyptest-xcode-env-order appears to be testing the behavior of an Xcode bug that 
has now been fixed: it does not run this part of the test on other generators.

Original comment by mark@chromium.org on 18 Nov 2013 at 3:28

GoogleCodeExporter commented 9 years ago
https://codereview.chromium.org/82763006/
https://codereview.chromium.org/190953006/

Original comment by sdefresne@chromium.org on 10 Mar 2014 at 2:03

GoogleCodeExporter commented 9 years ago
Note: test/mac/gyptest-updir.py pass with success when using Xcode 5.1.

Original comment by sdefresne@chromium.org on 12 Mar 2014 at 1:00

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/gyp/source/detail?r=1869

Original comment by sdefresne@chromium.org on 12 Mar 2014 at 1:48

GoogleCodeExporter commented 9 years ago
OK, I ran the test/mac tests with Xcode 5.0 and they all pass (or are disabled):

$ xcodebuild -version
Xcode 5.0
Build version 5A1412
$ python gyptest.py test/mac
No result from the following 10 tests:
    test/mac/gyptest-framework-headers.py
    test/mac/gyptest-postbuild-copy-bundle.py
    test/mac/gyptest-unicode-settings.py
    test/mac/gyptest-xcode-support-actions.py
    test/mac/gyptest-xctest.py
    test/mac/gyptest-framework-headers.py
    test/mac/gyptest-postbuild-static-library.py
    test/mac/gyptest-unicode-settings.py
    test/mac/gyptest-xcode-support-actions.py
    test/mac/gyptest-xctest.py

Original comment by sdefresne@chromium.org on 12 Mar 2014 at 3:21

GoogleCodeExporter commented 9 years ago
Great! Thanks.

Original comment by mark@chromium.org on 12 Mar 2014 at 3:33

GoogleCodeExporter commented 9 years ago
BTW, they also all pass with Xcode 5.1 \o/

Original comment by sdefresne@chromium.org on 12 Mar 2014 at 3:34