From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../gyp/test/mac/action-envvars/action/action.gyp | 34 + .../gyp/test/mac/action-envvars/action/action.sh | 8 + .../TestApp/English.lproj/InfoPlist-error.strings | 3 + .../TestApp/English.lproj/InfoPlist.strings | 3 + .../app-bundle/TestApp/English.lproj/MainMenu.xib | 4119 ++++++++++++++++++++ .../TestApp/English.lproj/utf-16be.strings | Bin 0 -> 208 bytes .../TestApp/English.lproj/utf-16le.strings | Bin 0 -> 208 bytes .../AppIcon.appiconset/Contents.json | 58 + .../Images.xcassets/image.imageset/Contents.json | 23 + .../image.imageset/super_sylvain.png | Bin 0 -> 3263 bytes .../image.imageset/super_sylvain@2x.png | Bin 0 -> 3847 bytes .../image.imageset/super_sylvain@3x.png | Bin 0 -> 4394 bytes .../test/mac/app-bundle/TestApp/TestApp-Info.plist | 34 + .../mac/app-bundle/TestApp/TestAppAppDelegate.h | 13 + .../mac/app-bundle/TestApp/TestAppAppDelegate.m | 15 + .../python/gyp/test/mac/app-bundle/TestApp/main.m | 10 + third_party/python/gyp/test/mac/app-bundle/empty.c | 0 .../test/mac/app-bundle/test-assets-catalog.gyp | 43 + .../python/gyp/test/mac/app-bundle/test-error.gyp | 31 + .../python/gyp/test/mac/app-bundle/test.gyp | 41 + .../python/gyp/test/mac/archs/empty_main.cc | 1 + third_party/python/gyp/test/mac/archs/file.mm | 1 + third_party/python/gyp/test/mac/archs/file_a.cc | 8 + third_party/python/gyp/test/mac/archs/file_a.h | 10 + third_party/python/gyp/test/mac/archs/file_b.cc | 8 + third_party/python/gyp/test/mac/archs/file_b.h | 10 + third_party/python/gyp/test/mac/archs/file_c.cc | 11 + third_party/python/gyp/test/mac/archs/file_d.cc | 11 + third_party/python/gyp/test/mac/archs/header.h | 1 + third_party/python/gyp/test/mac/archs/my_file.cc | 4 + .../python/gyp/test/mac/archs/my_main_file.cc | 9 + .../gyp/test/mac/archs/test-archs-multiarch.gyp | 92 + .../gyp/test/mac/archs/test-archs-x86_64.gyp | 27 + .../gyp/test/mac/archs/test-dependencies.gyp | 92 + .../python/gyp/test/mac/archs/test-no-archs.gyp | 21 + .../python/gyp/test/mac/archs/test-valid-archs.gyp | 28 + .../python/gyp/test/mac/bundle-resources/change.sh | 3 + .../test/mac/bundle-resources/executable-file.sh | 3 + .../gyp/test/mac/bundle-resources/secret.txt | 1 + .../python/gyp/test/mac/bundle-resources/test.gyp | 59 + third_party/python/gyp/test/mac/cflags/ccfile.cc | 7 + .../gyp/test/mac/cflags/ccfile_withcflags.cc | 7 + third_party/python/gyp/test/mac/cflags/cfile.c | 7 + third_party/python/gyp/test/mac/cflags/cppfile.cpp | 7 + .../gyp/test/mac/cflags/cppfile_withcflags.cpp | 7 + third_party/python/gyp/test/mac/cflags/cxxfile.cxx | 7 + .../gyp/test/mac/cflags/cxxfile_withcflags.cxx | 7 + third_party/python/gyp/test/mac/cflags/mfile.m | 7 + third_party/python/gyp/test/mac/cflags/mmfile.mm | 7 + .../gyp/test/mac/cflags/mmfile_withcflags.mm | 7 + third_party/python/gyp/test/mac/cflags/test.gyp | 132 + .../test/mac/clang-cxx-language-standard/c++11.cc | 8 + .../test/mac/clang-cxx-language-standard/c++98.cc | 24 + .../clang-cxx-language-standard.gyp | 30 + .../mac/clang-cxx-library/clang-cxx-library.gyp | 32 + .../gyp/test/mac/clang-cxx-library/libc++.cc | 11 + .../gyp/test/mac/clang-cxx-library/libstdc++.cc | 11 + .../copies-with-xcode-envvars.gyp | 87 + .../gyp/test/mac/copies-with-xcode-envvars/empty.c | 1 + .../gyp/test/mac/copies-with-xcode-envvars/file0 | 1 + .../gyp/test/mac/copies-with-xcode-envvars/file1 | 1 + .../gyp/test/mac/copies-with-xcode-envvars/file10 | 1 + .../gyp/test/mac/copies-with-xcode-envvars/file11 | 1 + .../gyp/test/mac/copies-with-xcode-envvars/file2 | 1 + .../gyp/test/mac/copies-with-xcode-envvars/file3 | 1 + .../gyp/test/mac/copies-with-xcode-envvars/file4 | 1 + .../gyp/test/mac/copies-with-xcode-envvars/file5 | 1 + .../gyp/test/mac/copies-with-xcode-envvars/file6 | 1 + .../gyp/test/mac/copies-with-xcode-envvars/file7 | 1 + .../gyp/test/mac/copies-with-xcode-envvars/file8 | 1 + .../gyp/test/mac/copies-with-xcode-envvars/file9 | 1 + third_party/python/gyp/test/mac/copy-dylib/empty.c | 1 + .../python/gyp/test/mac/copy-dylib/test.gyp | 31 + third_party/python/gyp/test/mac/debuginfo/file.c | 6 + third_party/python/gyp/test/mac/debuginfo/test.gyp | 82 + .../English.lproj/InfoPlist.strings | 1 + .../gyp/test/mac/depend-on-bundle/Info.plist | 28 + .../python/gyp/test/mac/depend-on-bundle/bundle.c | 1 + .../gyp/test/mac/depend-on-bundle/executable.c | 4 + .../python/gyp/test/mac/depend-on-bundle/test.gyp | 28 + .../test/mac/deployment-target/check-version-min.c | 33 + .../mac/deployment-target/deployment-target.gyp | 28 + .../python/gyp/test/mac/framework-dirs/calculate.c | 15 + .../gyp/test/mac/framework-dirs/framework-dirs.gyp | 21 + .../gyp/test/mac/framework-headers/myframework.h | 8 + .../gyp/test/mac/framework-headers/myframework.m | 8 + .../python/gyp/test/mac/framework-headers/test.gyp | 44 + .../TestFramework/English.lproj/InfoPlist.strings | 2 + .../test/mac/framework/TestFramework/Info.plist | 28 + .../test/mac/framework/TestFramework/ObjCVector.h | 28 + .../test/mac/framework/TestFramework/ObjCVector.mm | 63 + .../framework/TestFramework/ObjCVectorInternal.h | 9 + .../TestFramework/TestFramework_Prefix.pch | 7 + third_party/python/gyp/test/mac/framework/empty.c | 0 .../python/gyp/test/mac/framework/framework.gyp | 108 + .../gyp/test/mac/global-settings/src/dir1/dir1.gyp | 11 + .../gyp/test/mac/global-settings/src/dir2/dir2.gyp | 22 + .../gyp/test/mac/global-settings/src/dir2/file.txt | 1 + .../python/gyp/test/mac/gyptest-action-envvars.py | 36 + .../gyp/test/mac/gyptest-app-assets-catalog.py | 125 + .../python/gyp/test/mac/gyptest-app-error.py | 49 + third_party/python/gyp/test/mac/gyptest-app.py | 122 + third_party/python/gyp/test/mac/gyptest-archs.py | 96 + .../gyp/test/mac/gyptest-bundle-resources.py | 64 + third_party/python/gyp/test/mac/gyptest-cflags.py | 21 + .../mac/gyptest-clang-cxx-language-standard.py | 25 + .../gyp/test/mac/gyptest-clang-cxx-library.py | 32 + .../test/mac/gyptest-copies-with-xcode-envvars.py | 65 + third_party/python/gyp/test/mac/gyptest-copies.py | 62 + .../python/gyp/test/mac/gyptest-copy-dylib.py | 25 + .../python/gyp/test/mac/gyptest-debuginfo.py | 36 + .../gyp/test/mac/gyptest-depend-on-bundle.py | 45 + .../gyp/test/mac/gyptest-deployment-target.py | 27 + .../python/gyp/test/mac/gyptest-framework-dirs.py | 23 + .../gyp/test/mac/gyptest-framework-headers.py | 38 + .../python/gyp/test/mac/gyptest-framework.py | 80 + .../python/gyp/test/mac/gyptest-global-settings.py | 33 + .../python/gyp/test/mac/gyptest-identical-name.py | 45 + .../gyp/test/mac/gyptest-infoplist-process.py | 56 + .../python/gyp/test/mac/gyptest-installname.py | 85 + third_party/python/gyp/test/mac/gyptest-kext.py | 27 + .../test/mac/gyptest-ldflags-passed-to-libtool.py | 37 + third_party/python/gyp/test/mac/gyptest-ldflags.py | 74 + .../python/gyp/test/mac/gyptest-libraries.py | 30 + .../python/gyp/test/mac/gyptest-libtool-zero.py | 26 + ...est-loadable-module-bundle-product-extension.py | 31 + .../python/gyp/test/mac/gyptest-loadable-module.py | 54 + third_party/python/gyp/test/mac/gyptest-lto.py | 66 + .../test/mac/gyptest-missing-cfbundlesignature.py | 34 + .../test/mac/gyptest-non-strs-flattened-to-env.py | 38 + .../python/gyp/test/mac/gyptest-objc-arc.py | 27 + third_party/python/gyp/test/mac/gyptest-objc-gc.py | 51 + .../gyp/test/mac/gyptest-postbuild-copy-bundle.py | 75 + .../gyp/test/mac/gyptest-postbuild-defaults.py | 34 + .../python/gyp/test/mac/gyptest-postbuild-fail.py | 71 + .../gyptest-postbuild-multiple-configurations.py | 26 + .../test/mac/gyptest-postbuild-static-library.py | 28 + .../python/gyp/test/mac/gyptest-postbuild.py | 53 + .../python/gyp/test/mac/gyptest-prefixheader.py | 20 + third_party/python/gyp/test/mac/gyptest-rebuild.py | 46 + third_party/python/gyp/test/mac/gyptest-rpath.py | 50 + third_party/python/gyp/test/mac/gyptest-sdkroot.py | 56 + .../gyp/test/mac/gyptest-sourceless-module.py | 77 + .../python/gyp/test/mac/gyptest-strip-default.py | 97 + third_party/python/gyp/test/mac/gyptest-strip.py | 66 + .../python/gyp/test/mac/gyptest-swift-library.py | 67 + .../python/gyp/test/mac/gyptest-type-envvars.py | 26 + .../gyp/test/mac/gyptest-unicode-settings.py | 20 + .../python/gyp/test/mac/gyptest-xcode-env-order.py | 95 + .../python/gyp/test/mac/gyptest-xcode-gcc-clang.py | 40 + .../python/gyp/test/mac/gyptest-xcode-gcc.py | 60 + .../gyp/test/mac/gyptest-xcode-support-actions.py | 25 + third_party/python/gyp/test/mac/gyptest-xctest.py | 41 + .../python/gyp/test/mac/gyptest-xcuitest.py | 39 + .../gyp/test/mac/identical-name/proxy/proxy.cc | 2 + .../gyp/test/mac/identical-name/proxy/proxy.gyp | 9 + .../mac/identical-name/proxy/testlib/testlib.cc | 2 + .../mac/identical-name/proxy/testlib/testlib.gyp | 8 + .../test/mac/identical-name/test-should-fail.gyp | 10 + .../python/gyp/test/mac/identical-name/test.gyp | 11 + .../python/gyp/test/mac/identical-name/test.gypi | 7 + .../gyp/test/mac/identical-name/testlib/main.cc | 3 + .../test/mac/identical-name/testlib/testlib.gyp | 14 + .../gyp/test/mac/identical-name/testlib/void.cc | 2 + .../gyp/test/mac/infoplist-process/Info.plist | 36 + .../python/gyp/test/mac/infoplist-process/main.c | 7 + .../gyp/test/mac/infoplist-process/test1.gyp | 25 + .../gyp/test/mac/infoplist-process/test2.gyp | 25 + .../gyp/test/mac/infoplist-process/test3.gyp | 25 + .../python/gyp/test/mac/installname/Info.plist | 28 + third_party/python/gyp/test/mac/installname/file.c | 1 + third_party/python/gyp/test/mac/installname/main.c | 1 + .../python/gyp/test/mac/installname/test.gyp | 93 + .../gyp/test/mac/kext/GypKext/GypKext-Info.plist | 35 + .../python/gyp/test/mac/kext/GypKext/GypKext.c | 16 + third_party/python/gyp/test/mac/kext/kext.gyp | 18 + .../python/gyp/test/mac/ldflags-libtool/file.c | 1 + .../python/gyp/test/mac/ldflags-libtool/test.gyp | 17 + .../gyp/test/mac/ldflags/subdirectory/Info.plist | 8 + .../gyp/test/mac/ldflags/subdirectory/file.c | 2 + .../test/mac/ldflags/subdirectory/symbol_list.def | 1 + .../gyp/test/mac/ldflags/subdirectory/test.gyp | 66 + .../gyp/test/mac/libraries/subdir/README.txt | 1 + .../python/gyp/test/mac/libraries/subdir/hello.cc | 10 + .../python/gyp/test/mac/libraries/subdir/mylib.c | 7 + .../python/gyp/test/mac/libraries/subdir/test.gyp | 65 + .../python/gyp/test/mac/libtool-zero/mylib.c | 7 + .../python/gyp/test/mac/libtool-zero/test.gyp | 18 + .../src.cc | 7 + .../test.gyp | 24 + .../python/gyp/test/mac/loadable-module/Info.plist | 26 + .../python/gyp/test/mac/loadable-module/module.c | 11 + .../python/gyp/test/mac/loadable-module/test.gyp | 18 + third_party/python/gyp/test/mac/lto/asmfile.S | 2 + third_party/python/gyp/test/mac/lto/ccfile.cc | 1 + third_party/python/gyp/test/mac/lto/cfile.c | 1 + third_party/python/gyp/test/mac/lto/mfile.m | 1 + third_party/python/gyp/test/mac/lto/mmfile.mm | 1 + third_party/python/gyp/test/mac/lto/test.gyp | 35 + .../test/mac/missing-cfbundlesignature/Info.plist | 10 + .../mac/missing-cfbundlesignature/Other-Info.plist | 12 + .../mac/missing-cfbundlesignature/Third-Info.plist | 12 + .../gyp/test/mac/missing-cfbundlesignature/file.c | 1 + .../test/mac/missing-cfbundlesignature/test.gyp | 34 + .../test/mac/non-strs-flattened-to-env/Info.plist | 15 + .../gyp/test/mac/non-strs-flattened-to-env/main.c | 7 + .../test/mac/non-strs-flattened-to-env/test.gyp | 27 + third_party/python/gyp/test/mac/objc-arc/c-file.c | 5 + .../python/gyp/test/mac/objc-arc/cc-file.cc | 5 + .../python/gyp/test/mac/objc-arc/m-file-arc-weak.m | 9 + .../python/gyp/test/mac/objc-arc/m-file-no-arc.m | 9 + third_party/python/gyp/test/mac/objc-arc/m-file.m | 9 + .../gyp/test/mac/objc-arc/mm-file-arc-weak.mm | 9 + .../python/gyp/test/mac/objc-arc/mm-file-no-arc.mm | 9 + .../python/gyp/test/mac/objc-arc/mm-file.mm | 9 + third_party/python/gyp/test/mac/objc-arc/test.gyp | 53 + third_party/python/gyp/test/mac/objc-gc/c-file.c | 1 + third_party/python/gyp/test/mac/objc-gc/cc-file.cc | 1 + third_party/python/gyp/test/mac/objc-gc/main.m | 6 + .../python/gyp/test/mac/objc-gc/needs-gc-mm.mm | 1 + third_party/python/gyp/test/mac/objc-gc/needs-gc.m | 1 + third_party/python/gyp/test/mac/objc-gc/test.gyp | 102 + .../mac/postbuild-copy-bundle/Framework-Info.plist | 30 + .../mac/postbuild-copy-bundle/TestApp-Info.plist | 32 + .../gyp/test/mac/postbuild-copy-bundle/copied.txt | 1 + .../gyp/test/mac/postbuild-copy-bundle/empty.c | 0 .../gyp/test/mac/postbuild-copy-bundle/main.c | 4 + .../postbuild-copy-framework.sh | 9 + .../mac/postbuild-copy-bundle/resource_file.sb | 1 + .../gyp/test/mac/postbuild-copy-bundle/test.gyp | 49 + .../gyp/test/mac/postbuild-defaults/Info.plist | 13 + .../python/gyp/test/mac/postbuild-defaults/main.c | 7 + .../mac/postbuild-defaults/postbuild-defaults.sh | 15 + .../gyp/test/mac/postbuild-defaults/test.gyp | 26 + .../python/gyp/test/mac/postbuild-fail/file.c | 6 + .../gyp/test/mac/postbuild-fail/postbuild-fail.sh | 6 + .../python/gyp/test/mac/postbuild-fail/test.gyp | 38 + .../gyp/test/mac/postbuild-fail/touch-dynamic.sh | 7 + .../gyp/test/mac/postbuild-fail/touch-static.sh | 7 + .../mac/postbuild-multiple-configurations/main.c | 4 + .../postbuild-touch-file.sh | 7 + .../mac/postbuild-multiple-configurations/test.gyp | 26 + .../gyp/test/mac/postbuild-static-library/empty.c | 4 + .../postbuild-touch-file.sh | 7 + .../gyp/test/mac/postbuild-static-library/test.gyp | 34 + third_party/python/gyp/test/mac/postbuilds/copy.sh | 3 + third_party/python/gyp/test/mac/postbuilds/file.c | 4 + .../python/gyp/test/mac/postbuilds/file_g.c | 4 + .../python/gyp/test/mac/postbuilds/file_h.c | 4 + .../postbuilds/script/shared_library_postbuild.sh | 23 + .../postbuilds/script/static_library_postbuild.sh | 23 + .../mac/postbuilds/subdirectory/copied_file.txt | 1 + .../mac/postbuilds/subdirectory/nested_target.gyp | 53 + .../python/gyp/test/mac/postbuilds/test.gyp | 93 + .../python/gyp/test/mac/prefixheader/file.c | 1 + .../python/gyp/test/mac/prefixheader/file.cc | 1 + .../python/gyp/test/mac/prefixheader/file.m | 1 + .../python/gyp/test/mac/prefixheader/file.mm | 1 + .../python/gyp/test/mac/prefixheader/header.h | 1 + .../python/gyp/test/mac/prefixheader/test.gyp | 82 + .../python/gyp/test/mac/rebuild/TestApp-Info.plist | 32 + .../python/gyp/test/mac/rebuild/delay-touch.sh | 6 + third_party/python/gyp/test/mac/rebuild/empty.c | 0 third_party/python/gyp/test/mac/rebuild/main.c | 1 + third_party/python/gyp/test/mac/rebuild/test.gyp | 56 + third_party/python/gyp/test/mac/rpath/file.c | 1 + third_party/python/gyp/test/mac/rpath/main.c | 1 + third_party/python/gyp/test/mac/rpath/test.gyp | 48 + third_party/python/gyp/test/mac/sdkroot/file.cc | 5 + third_party/python/gyp/test/mac/sdkroot/test.gyp | 35 + .../python/gyp/test/mac/sdkroot/test_shorthand.sh | 20 + .../python/gyp/test/mac/sourceless-module/empty.c | 1 + .../gyp/test/mac/sourceless-module/empty.txt | 2 + .../python/gyp/test/mac/sourceless-module/fun.c | 1 + .../python/gyp/test/mac/sourceless-module/test.gyp | 96 + third_party/python/gyp/test/mac/strip/file.c | 22 + third_party/python/gyp/test/mac/strip/main.c | 25 + third_party/python/gyp/test/mac/strip/strip.saves | 5 + .../gyp/test/mac/strip/subdirectory/nested_file.c | 1 + .../test/mac/strip/subdirectory/nested_strip.saves | 5 + .../test/mac/strip/subdirectory/subdirectory.gyp | 38 + .../test_reading_save_file_from_postbuild.sh | 5 + .../python/gyp/test/mac/strip/test-defaults.gyp | 51 + third_party/python/gyp/test/mac/strip/test.gyp | 119 + .../python/gyp/test/mac/swift-library/Info.plist | 28 + .../python/gyp/test/mac/swift-library/file.swift | 9 + .../python/gyp/test/mac/swift-library/test.gyp | 21 + .../python/gyp/test/mac/type_envvars/file.c | 6 + .../python/gyp/test/mac/type_envvars/test.gyp | 100 + .../mac/type_envvars/test_bundle_executable.sh | 30 + .../type_envvars/test_bundle_loadable_module.sh | 35 + .../mac/type_envvars/test_bundle_shared_library.sh | 38 + .../test/mac/type_envvars/test_check_sdkroot.sh | 47 + .../mac/type_envvars/test_nonbundle_executable.sh | 33 + .../type_envvars/test_nonbundle_loadable_module.sh | 31 + .../test/mac/type_envvars/test_nonbundle_none.sh | 32 + .../type_envvars/test_nonbundle_shared_library.sh | 31 + .../type_envvars/test_nonbundle_static_library.sh | 31 + .../python/gyp/test/mac/unicode-settings/file.cc | 2 + .../python/gyp/test/mac/unicode-settings/test.gyp | 23 + .../unicode-settings/test_bundle_display_name.sh | 7 + .../python/gyp/test/mac/xcode-env-order/Info.plist | 56 + .../python/gyp/test/mac/xcode-env-order/file.ext1 | 0 .../python/gyp/test/mac/xcode-env-order/file.ext2 | 0 .../python/gyp/test/mac/xcode-env-order/file.ext3 | 0 .../python/gyp/test/mac/xcode-env-order/main.c | 7 + .../python/gyp/test/mac/xcode-env-order/test.gyp | 121 + .../python/gyp/test/mac/xcode-gcc/aliasing.cc | 13 + .../python/gyp/test/mac/xcode-gcc/test-clang.gyp | 42 + third_party/python/gyp/test/mac/xcode-gcc/test.gyp | 60 + .../python/gyp/test/mac/xcode-gcc/valid_c.c | 8 + .../python/gyp/test/mac/xcode-gcc/valid_cc.cc | 8 + .../python/gyp/test/mac/xcode-gcc/valid_m.m | 8 + .../python/gyp/test/mac/xcode-gcc/valid_mm.mm | 8 + .../xcode-gcc/warn_about_invalid_offsetof_macro.cc | 15 + .../mac/xcode-gcc/warn_about_missing_newline.c | 8 + .../gyp/test/mac/xcode-support-actions/source.c | 0 .../gyp/test/mac/xcode-support-actions/test.gyp | 26 + third_party/python/gyp/test/mac/xctest/MyClass.h | 8 + third_party/python/gyp/test/mac/xctest/MyClass.m | 8 + third_party/python/gyp/test/mac/xctest/TestCase.m | 16 + .../python/gyp/test/mac/xctest/resource.txt | 1 + third_party/python/gyp/test/mac/xctest/test.gyp | 47 + .../xcshareddata/xcschemes/classes.xcscheme | 69 + .../python/gyp/test/mac/xcuitest/Info.plist | 28 + .../python/gyp/test/mac/xcuitest/MyAppDelegate.h | 8 + .../python/gyp/test/mac/xcuitest/MyAppDelegate.m | 19 + .../python/gyp/test/mac/xcuitest/TestCase.m | 15 + third_party/python/gyp/test/mac/xcuitest/main.m | 15 + .../python/gyp/test/mac/xcuitest/resource.txt | 1 + third_party/python/gyp/test/mac/xcuitest/test.gyp | 69 + 331 files changed, 12115 insertions(+) create mode 100644 third_party/python/gyp/test/mac/action-envvars/action/action.gyp create mode 100755 third_party/python/gyp/test/mac/action-envvars/action/action.sh create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist-error.strings create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist.strings create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/MainMenu.xib create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16be.strings create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16le.strings create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/TestApp-Info.plist create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.h create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.m create mode 100644 third_party/python/gyp/test/mac/app-bundle/TestApp/main.m create mode 100644 third_party/python/gyp/test/mac/app-bundle/empty.c create mode 100644 third_party/python/gyp/test/mac/app-bundle/test-assets-catalog.gyp create mode 100644 third_party/python/gyp/test/mac/app-bundle/test-error.gyp create mode 100644 third_party/python/gyp/test/mac/app-bundle/test.gyp create mode 100644 third_party/python/gyp/test/mac/archs/empty_main.cc create mode 100644 third_party/python/gyp/test/mac/archs/file.mm create mode 100644 third_party/python/gyp/test/mac/archs/file_a.cc create mode 100644 third_party/python/gyp/test/mac/archs/file_a.h create mode 100644 third_party/python/gyp/test/mac/archs/file_b.cc create mode 100644 third_party/python/gyp/test/mac/archs/file_b.h create mode 100644 third_party/python/gyp/test/mac/archs/file_c.cc create mode 100644 third_party/python/gyp/test/mac/archs/file_d.cc create mode 100644 third_party/python/gyp/test/mac/archs/header.h create mode 100644 third_party/python/gyp/test/mac/archs/my_file.cc create mode 100644 third_party/python/gyp/test/mac/archs/my_main_file.cc create mode 100644 third_party/python/gyp/test/mac/archs/test-archs-multiarch.gyp create mode 100644 third_party/python/gyp/test/mac/archs/test-archs-x86_64.gyp create mode 100644 third_party/python/gyp/test/mac/archs/test-dependencies.gyp create mode 100644 third_party/python/gyp/test/mac/archs/test-no-archs.gyp create mode 100644 third_party/python/gyp/test/mac/archs/test-valid-archs.gyp create mode 100755 third_party/python/gyp/test/mac/bundle-resources/change.sh create mode 100755 third_party/python/gyp/test/mac/bundle-resources/executable-file.sh create mode 100644 third_party/python/gyp/test/mac/bundle-resources/secret.txt create mode 100644 third_party/python/gyp/test/mac/bundle-resources/test.gyp create mode 100644 third_party/python/gyp/test/mac/cflags/ccfile.cc create mode 100644 third_party/python/gyp/test/mac/cflags/ccfile_withcflags.cc create mode 100644 third_party/python/gyp/test/mac/cflags/cfile.c create mode 100644 third_party/python/gyp/test/mac/cflags/cppfile.cpp create mode 100644 third_party/python/gyp/test/mac/cflags/cppfile_withcflags.cpp create mode 100644 third_party/python/gyp/test/mac/cflags/cxxfile.cxx create mode 100644 third_party/python/gyp/test/mac/cflags/cxxfile_withcflags.cxx create mode 100644 third_party/python/gyp/test/mac/cflags/mfile.m create mode 100644 third_party/python/gyp/test/mac/cflags/mmfile.mm create mode 100644 third_party/python/gyp/test/mac/cflags/mmfile_withcflags.mm create mode 100644 third_party/python/gyp/test/mac/cflags/test.gyp create mode 100644 third_party/python/gyp/test/mac/clang-cxx-language-standard/c++11.cc create mode 100644 third_party/python/gyp/test/mac/clang-cxx-language-standard/c++98.cc create mode 100644 third_party/python/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp create mode 100644 third_party/python/gyp/test/mac/clang-cxx-library/clang-cxx-library.gyp create mode 100644 third_party/python/gyp/test/mac/clang-cxx-library/libc++.cc create mode 100644 third_party/python/gyp/test/mac/clang-cxx-library/libstdc++.cc create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/empty.c create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/file0 create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/file1 create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/file10 create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/file11 create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/file2 create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/file3 create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/file4 create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/file5 create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/file6 create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/file7 create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/file8 create mode 100644 third_party/python/gyp/test/mac/copies-with-xcode-envvars/file9 create mode 100644 third_party/python/gyp/test/mac/copy-dylib/empty.c create mode 100644 third_party/python/gyp/test/mac/copy-dylib/test.gyp create mode 100644 third_party/python/gyp/test/mac/debuginfo/file.c create mode 100644 third_party/python/gyp/test/mac/debuginfo/test.gyp create mode 100644 third_party/python/gyp/test/mac/depend-on-bundle/English.lproj/InfoPlist.strings create mode 100644 third_party/python/gyp/test/mac/depend-on-bundle/Info.plist create mode 100644 third_party/python/gyp/test/mac/depend-on-bundle/bundle.c create mode 100644 third_party/python/gyp/test/mac/depend-on-bundle/executable.c create mode 100644 third_party/python/gyp/test/mac/depend-on-bundle/test.gyp create mode 100644 third_party/python/gyp/test/mac/deployment-target/check-version-min.c create mode 100644 third_party/python/gyp/test/mac/deployment-target/deployment-target.gyp create mode 100644 third_party/python/gyp/test/mac/framework-dirs/calculate.c create mode 100644 third_party/python/gyp/test/mac/framework-dirs/framework-dirs.gyp create mode 100644 third_party/python/gyp/test/mac/framework-headers/myframework.h create mode 100644 third_party/python/gyp/test/mac/framework-headers/myframework.m create mode 100644 third_party/python/gyp/test/mac/framework-headers/test.gyp create mode 100644 third_party/python/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings create mode 100644 third_party/python/gyp/test/mac/framework/TestFramework/Info.plist create mode 100644 third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.h create mode 100644 third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.mm create mode 100644 third_party/python/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h create mode 100644 third_party/python/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch create mode 100644 third_party/python/gyp/test/mac/framework/empty.c create mode 100644 third_party/python/gyp/test/mac/framework/framework.gyp create mode 100644 third_party/python/gyp/test/mac/global-settings/src/dir1/dir1.gyp create mode 100644 third_party/python/gyp/test/mac/global-settings/src/dir2/dir2.gyp create mode 100644 third_party/python/gyp/test/mac/global-settings/src/dir2/file.txt create mode 100644 third_party/python/gyp/test/mac/gyptest-action-envvars.py create mode 100755 third_party/python/gyp/test/mac/gyptest-app-assets-catalog.py create mode 100755 third_party/python/gyp/test/mac/gyptest-app-error.py create mode 100755 third_party/python/gyp/test/mac/gyptest-app.py create mode 100644 third_party/python/gyp/test/mac/gyptest-archs.py create mode 100644 third_party/python/gyp/test/mac/gyptest-bundle-resources.py create mode 100644 third_party/python/gyp/test/mac/gyptest-cflags.py create mode 100644 third_party/python/gyp/test/mac/gyptest-clang-cxx-language-standard.py create mode 100644 third_party/python/gyp/test/mac/gyptest-clang-cxx-library.py create mode 100644 third_party/python/gyp/test/mac/gyptest-copies-with-xcode-envvars.py create mode 100755 third_party/python/gyp/test/mac/gyptest-copies.py create mode 100644 third_party/python/gyp/test/mac/gyptest-copy-dylib.py create mode 100755 third_party/python/gyp/test/mac/gyptest-debuginfo.py create mode 100644 third_party/python/gyp/test/mac/gyptest-depend-on-bundle.py create mode 100644 third_party/python/gyp/test/mac/gyptest-deployment-target.py create mode 100644 third_party/python/gyp/test/mac/gyptest-framework-dirs.py create mode 100644 third_party/python/gyp/test/mac/gyptest-framework-headers.py create mode 100755 third_party/python/gyp/test/mac/gyptest-framework.py create mode 100644 third_party/python/gyp/test/mac/gyptest-global-settings.py create mode 100644 third_party/python/gyp/test/mac/gyptest-identical-name.py create mode 100755 third_party/python/gyp/test/mac/gyptest-infoplist-process.py create mode 100644 third_party/python/gyp/test/mac/gyptest-installname.py create mode 100755 third_party/python/gyp/test/mac/gyptest-kext.py create mode 100644 third_party/python/gyp/test/mac/gyptest-ldflags-passed-to-libtool.py create mode 100644 third_party/python/gyp/test/mac/gyptest-ldflags.py create mode 100755 third_party/python/gyp/test/mac/gyptest-libraries.py create mode 100644 third_party/python/gyp/test/mac/gyptest-libtool-zero.py create mode 100644 third_party/python/gyp/test/mac/gyptest-loadable-module-bundle-product-extension.py create mode 100755 third_party/python/gyp/test/mac/gyptest-loadable-module.py create mode 100644 third_party/python/gyp/test/mac/gyptest-lto.py create mode 100644 third_party/python/gyp/test/mac/gyptest-missing-cfbundlesignature.py create mode 100644 third_party/python/gyp/test/mac/gyptest-non-strs-flattened-to-env.py create mode 100755 third_party/python/gyp/test/mac/gyptest-objc-arc.py create mode 100644 third_party/python/gyp/test/mac/gyptest-objc-gc.py create mode 100644 third_party/python/gyp/test/mac/gyptest-postbuild-copy-bundle.py create mode 100644 third_party/python/gyp/test/mac/gyptest-postbuild-defaults.py create mode 100755 third_party/python/gyp/test/mac/gyptest-postbuild-fail.py create mode 100644 third_party/python/gyp/test/mac/gyptest-postbuild-multiple-configurations.py create mode 100644 third_party/python/gyp/test/mac/gyptest-postbuild-static-library.py create mode 100755 third_party/python/gyp/test/mac/gyptest-postbuild.py create mode 100755 third_party/python/gyp/test/mac/gyptest-prefixheader.py create mode 100755 third_party/python/gyp/test/mac/gyptest-rebuild.py create mode 100644 third_party/python/gyp/test/mac/gyptest-rpath.py create mode 100644 third_party/python/gyp/test/mac/gyptest-sdkroot.py create mode 100644 third_party/python/gyp/test/mac/gyptest-sourceless-module.py create mode 100644 third_party/python/gyp/test/mac/gyptest-strip-default.py create mode 100755 third_party/python/gyp/test/mac/gyptest-strip.py create mode 100644 third_party/python/gyp/test/mac/gyptest-swift-library.py create mode 100755 third_party/python/gyp/test/mac/gyptest-type-envvars.py create mode 100644 third_party/python/gyp/test/mac/gyptest-unicode-settings.py create mode 100755 third_party/python/gyp/test/mac/gyptest-xcode-env-order.py create mode 100644 third_party/python/gyp/test/mac/gyptest-xcode-gcc-clang.py create mode 100644 third_party/python/gyp/test/mac/gyptest-xcode-gcc.py create mode 100755 third_party/python/gyp/test/mac/gyptest-xcode-support-actions.py create mode 100644 third_party/python/gyp/test/mac/gyptest-xctest.py create mode 100755 third_party/python/gyp/test/mac/gyptest-xcuitest.py create mode 100644 third_party/python/gyp/test/mac/identical-name/proxy/proxy.cc create mode 100644 third_party/python/gyp/test/mac/identical-name/proxy/proxy.gyp create mode 100644 third_party/python/gyp/test/mac/identical-name/proxy/testlib/testlib.cc create mode 100644 third_party/python/gyp/test/mac/identical-name/proxy/testlib/testlib.gyp create mode 100644 third_party/python/gyp/test/mac/identical-name/test-should-fail.gyp create mode 100644 third_party/python/gyp/test/mac/identical-name/test.gyp create mode 100644 third_party/python/gyp/test/mac/identical-name/test.gypi create mode 100644 third_party/python/gyp/test/mac/identical-name/testlib/main.cc create mode 100644 third_party/python/gyp/test/mac/identical-name/testlib/testlib.gyp create mode 100644 third_party/python/gyp/test/mac/identical-name/testlib/void.cc create mode 100644 third_party/python/gyp/test/mac/infoplist-process/Info.plist create mode 100644 third_party/python/gyp/test/mac/infoplist-process/main.c create mode 100644 third_party/python/gyp/test/mac/infoplist-process/test1.gyp create mode 100644 third_party/python/gyp/test/mac/infoplist-process/test2.gyp create mode 100644 third_party/python/gyp/test/mac/infoplist-process/test3.gyp create mode 100644 third_party/python/gyp/test/mac/installname/Info.plist create mode 100644 third_party/python/gyp/test/mac/installname/file.c create mode 100644 third_party/python/gyp/test/mac/installname/main.c create mode 100644 third_party/python/gyp/test/mac/installname/test.gyp create mode 100644 third_party/python/gyp/test/mac/kext/GypKext/GypKext-Info.plist create mode 100644 third_party/python/gyp/test/mac/kext/GypKext/GypKext.c create mode 100644 third_party/python/gyp/test/mac/kext/kext.gyp create mode 100644 third_party/python/gyp/test/mac/ldflags-libtool/file.c create mode 100644 third_party/python/gyp/test/mac/ldflags-libtool/test.gyp create mode 100644 third_party/python/gyp/test/mac/ldflags/subdirectory/Info.plist create mode 100644 third_party/python/gyp/test/mac/ldflags/subdirectory/file.c create mode 100644 third_party/python/gyp/test/mac/ldflags/subdirectory/symbol_list.def create mode 100644 third_party/python/gyp/test/mac/ldflags/subdirectory/test.gyp create mode 100644 third_party/python/gyp/test/mac/libraries/subdir/README.txt create mode 100644 third_party/python/gyp/test/mac/libraries/subdir/hello.cc create mode 100644 third_party/python/gyp/test/mac/libraries/subdir/mylib.c create mode 100644 third_party/python/gyp/test/mac/libraries/subdir/test.gyp create mode 100644 third_party/python/gyp/test/mac/libtool-zero/mylib.c create mode 100644 third_party/python/gyp/test/mac/libtool-zero/test.gyp create mode 100644 third_party/python/gyp/test/mac/loadable-module-bundle-product-extension/src.cc create mode 100644 third_party/python/gyp/test/mac/loadable-module-bundle-product-extension/test.gyp create mode 100644 third_party/python/gyp/test/mac/loadable-module/Info.plist create mode 100644 third_party/python/gyp/test/mac/loadable-module/module.c create mode 100644 third_party/python/gyp/test/mac/loadable-module/test.gyp create mode 100644 third_party/python/gyp/test/mac/lto/asmfile.S create mode 100644 third_party/python/gyp/test/mac/lto/ccfile.cc create mode 100644 third_party/python/gyp/test/mac/lto/cfile.c create mode 100644 third_party/python/gyp/test/mac/lto/mfile.m create mode 100644 third_party/python/gyp/test/mac/lto/mmfile.mm create mode 100644 third_party/python/gyp/test/mac/lto/test.gyp create mode 100644 third_party/python/gyp/test/mac/missing-cfbundlesignature/Info.plist create mode 100644 third_party/python/gyp/test/mac/missing-cfbundlesignature/Other-Info.plist create mode 100644 third_party/python/gyp/test/mac/missing-cfbundlesignature/Third-Info.plist create mode 100644 third_party/python/gyp/test/mac/missing-cfbundlesignature/file.c create mode 100644 third_party/python/gyp/test/mac/missing-cfbundlesignature/test.gyp create mode 100644 third_party/python/gyp/test/mac/non-strs-flattened-to-env/Info.plist create mode 100644 third_party/python/gyp/test/mac/non-strs-flattened-to-env/main.c create mode 100644 third_party/python/gyp/test/mac/non-strs-flattened-to-env/test.gyp create mode 100644 third_party/python/gyp/test/mac/objc-arc/c-file.c create mode 100644 third_party/python/gyp/test/mac/objc-arc/cc-file.cc create mode 100644 third_party/python/gyp/test/mac/objc-arc/m-file-arc-weak.m create mode 100644 third_party/python/gyp/test/mac/objc-arc/m-file-no-arc.m create mode 100644 third_party/python/gyp/test/mac/objc-arc/m-file.m create mode 100644 third_party/python/gyp/test/mac/objc-arc/mm-file-arc-weak.mm create mode 100644 third_party/python/gyp/test/mac/objc-arc/mm-file-no-arc.mm create mode 100644 third_party/python/gyp/test/mac/objc-arc/mm-file.mm create mode 100644 third_party/python/gyp/test/mac/objc-arc/test.gyp create mode 100644 third_party/python/gyp/test/mac/objc-gc/c-file.c create mode 100644 third_party/python/gyp/test/mac/objc-gc/cc-file.cc create mode 100644 third_party/python/gyp/test/mac/objc-gc/main.m create mode 100644 third_party/python/gyp/test/mac/objc-gc/needs-gc-mm.mm create mode 100644 third_party/python/gyp/test/mac/objc-gc/needs-gc.m create mode 100644 third_party/python/gyp/test/mac/objc-gc/test.gyp create mode 100644 third_party/python/gyp/test/mac/postbuild-copy-bundle/Framework-Info.plist create mode 100644 third_party/python/gyp/test/mac/postbuild-copy-bundle/TestApp-Info.plist create mode 100644 third_party/python/gyp/test/mac/postbuild-copy-bundle/copied.txt create mode 100644 third_party/python/gyp/test/mac/postbuild-copy-bundle/empty.c create mode 100644 third_party/python/gyp/test/mac/postbuild-copy-bundle/main.c create mode 100755 third_party/python/gyp/test/mac/postbuild-copy-bundle/postbuild-copy-framework.sh create mode 100644 third_party/python/gyp/test/mac/postbuild-copy-bundle/resource_file.sb create mode 100644 third_party/python/gyp/test/mac/postbuild-copy-bundle/test.gyp create mode 100644 third_party/python/gyp/test/mac/postbuild-defaults/Info.plist create mode 100644 third_party/python/gyp/test/mac/postbuild-defaults/main.c create mode 100755 third_party/python/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh create mode 100644 third_party/python/gyp/test/mac/postbuild-defaults/test.gyp create mode 100644 third_party/python/gyp/test/mac/postbuild-fail/file.c create mode 100755 third_party/python/gyp/test/mac/postbuild-fail/postbuild-fail.sh create mode 100644 third_party/python/gyp/test/mac/postbuild-fail/test.gyp create mode 100755 third_party/python/gyp/test/mac/postbuild-fail/touch-dynamic.sh create mode 100755 third_party/python/gyp/test/mac/postbuild-fail/touch-static.sh create mode 100644 third_party/python/gyp/test/mac/postbuild-multiple-configurations/main.c create mode 100755 third_party/python/gyp/test/mac/postbuild-multiple-configurations/postbuild-touch-file.sh create mode 100644 third_party/python/gyp/test/mac/postbuild-multiple-configurations/test.gyp create mode 100644 third_party/python/gyp/test/mac/postbuild-static-library/empty.c create mode 100755 third_party/python/gyp/test/mac/postbuild-static-library/postbuild-touch-file.sh create mode 100644 third_party/python/gyp/test/mac/postbuild-static-library/test.gyp create mode 100755 third_party/python/gyp/test/mac/postbuilds/copy.sh create mode 100644 third_party/python/gyp/test/mac/postbuilds/file.c create mode 100644 third_party/python/gyp/test/mac/postbuilds/file_g.c create mode 100644 third_party/python/gyp/test/mac/postbuilds/file_h.c create mode 100755 third_party/python/gyp/test/mac/postbuilds/script/shared_library_postbuild.sh create mode 100755 third_party/python/gyp/test/mac/postbuilds/script/static_library_postbuild.sh create mode 100644 third_party/python/gyp/test/mac/postbuilds/subdirectory/copied_file.txt create mode 100644 third_party/python/gyp/test/mac/postbuilds/subdirectory/nested_target.gyp create mode 100644 third_party/python/gyp/test/mac/postbuilds/test.gyp create mode 100644 third_party/python/gyp/test/mac/prefixheader/file.c create mode 100644 third_party/python/gyp/test/mac/prefixheader/file.cc create mode 100644 third_party/python/gyp/test/mac/prefixheader/file.m create mode 100644 third_party/python/gyp/test/mac/prefixheader/file.mm create mode 100644 third_party/python/gyp/test/mac/prefixheader/header.h create mode 100644 third_party/python/gyp/test/mac/prefixheader/test.gyp create mode 100644 third_party/python/gyp/test/mac/rebuild/TestApp-Info.plist create mode 100755 third_party/python/gyp/test/mac/rebuild/delay-touch.sh create mode 100644 third_party/python/gyp/test/mac/rebuild/empty.c create mode 100644 third_party/python/gyp/test/mac/rebuild/main.c create mode 100644 third_party/python/gyp/test/mac/rebuild/test.gyp create mode 100644 third_party/python/gyp/test/mac/rpath/file.c create mode 100644 third_party/python/gyp/test/mac/rpath/main.c create mode 100644 third_party/python/gyp/test/mac/rpath/test.gyp create mode 100644 third_party/python/gyp/test/mac/sdkroot/file.cc create mode 100644 third_party/python/gyp/test/mac/sdkroot/test.gyp create mode 100755 third_party/python/gyp/test/mac/sdkroot/test_shorthand.sh create mode 100644 third_party/python/gyp/test/mac/sourceless-module/empty.c create mode 100644 third_party/python/gyp/test/mac/sourceless-module/empty.txt create mode 100644 third_party/python/gyp/test/mac/sourceless-module/fun.c create mode 100644 third_party/python/gyp/test/mac/sourceless-module/test.gyp create mode 100644 third_party/python/gyp/test/mac/strip/file.c create mode 100644 third_party/python/gyp/test/mac/strip/main.c create mode 100644 third_party/python/gyp/test/mac/strip/strip.saves create mode 100644 third_party/python/gyp/test/mac/strip/subdirectory/nested_file.c create mode 100644 third_party/python/gyp/test/mac/strip/subdirectory/nested_strip.saves create mode 100644 third_party/python/gyp/test/mac/strip/subdirectory/subdirectory.gyp create mode 100755 third_party/python/gyp/test/mac/strip/subdirectory/test_reading_save_file_from_postbuild.sh create mode 100644 third_party/python/gyp/test/mac/strip/test-defaults.gyp create mode 100644 third_party/python/gyp/test/mac/strip/test.gyp create mode 100644 third_party/python/gyp/test/mac/swift-library/Info.plist create mode 100644 third_party/python/gyp/test/mac/swift-library/file.swift create mode 100644 third_party/python/gyp/test/mac/swift-library/test.gyp create mode 100644 third_party/python/gyp/test/mac/type_envvars/file.c create mode 100644 third_party/python/gyp/test/mac/type_envvars/test.gyp create mode 100755 third_party/python/gyp/test/mac/type_envvars/test_bundle_executable.sh create mode 100755 third_party/python/gyp/test/mac/type_envvars/test_bundle_loadable_module.sh create mode 100755 third_party/python/gyp/test/mac/type_envvars/test_bundle_shared_library.sh create mode 100755 third_party/python/gyp/test/mac/type_envvars/test_check_sdkroot.sh create mode 100755 third_party/python/gyp/test/mac/type_envvars/test_nonbundle_executable.sh create mode 100755 third_party/python/gyp/test/mac/type_envvars/test_nonbundle_loadable_module.sh create mode 100755 third_party/python/gyp/test/mac/type_envvars/test_nonbundle_none.sh create mode 100755 third_party/python/gyp/test/mac/type_envvars/test_nonbundle_shared_library.sh create mode 100755 third_party/python/gyp/test/mac/type_envvars/test_nonbundle_static_library.sh create mode 100644 third_party/python/gyp/test/mac/unicode-settings/file.cc create mode 100644 third_party/python/gyp/test/mac/unicode-settings/test.gyp create mode 100755 third_party/python/gyp/test/mac/unicode-settings/test_bundle_display_name.sh create mode 100644 third_party/python/gyp/test/mac/xcode-env-order/Info.plist create mode 100644 third_party/python/gyp/test/mac/xcode-env-order/file.ext1 create mode 100644 third_party/python/gyp/test/mac/xcode-env-order/file.ext2 create mode 100644 third_party/python/gyp/test/mac/xcode-env-order/file.ext3 create mode 100644 third_party/python/gyp/test/mac/xcode-env-order/main.c create mode 100644 third_party/python/gyp/test/mac/xcode-env-order/test.gyp create mode 100644 third_party/python/gyp/test/mac/xcode-gcc/aliasing.cc create mode 100644 third_party/python/gyp/test/mac/xcode-gcc/test-clang.gyp create mode 100644 third_party/python/gyp/test/mac/xcode-gcc/test.gyp create mode 100644 third_party/python/gyp/test/mac/xcode-gcc/valid_c.c create mode 100644 third_party/python/gyp/test/mac/xcode-gcc/valid_cc.cc create mode 100644 third_party/python/gyp/test/mac/xcode-gcc/valid_m.m create mode 100644 third_party/python/gyp/test/mac/xcode-gcc/valid_mm.mm create mode 100644 third_party/python/gyp/test/mac/xcode-gcc/warn_about_invalid_offsetof_macro.cc create mode 100644 third_party/python/gyp/test/mac/xcode-gcc/warn_about_missing_newline.c create mode 100644 third_party/python/gyp/test/mac/xcode-support-actions/source.c create mode 100644 third_party/python/gyp/test/mac/xcode-support-actions/test.gyp create mode 100644 third_party/python/gyp/test/mac/xctest/MyClass.h create mode 100644 third_party/python/gyp/test/mac/xctest/MyClass.m create mode 100644 third_party/python/gyp/test/mac/xctest/TestCase.m create mode 100644 third_party/python/gyp/test/mac/xctest/resource.txt create mode 100644 third_party/python/gyp/test/mac/xctest/test.gyp create mode 100644 third_party/python/gyp/test/mac/xctest/test.xcodeproj/xcshareddata/xcschemes/classes.xcscheme create mode 100644 third_party/python/gyp/test/mac/xcuitest/Info.plist create mode 100644 third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.h create mode 100644 third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.m create mode 100644 third_party/python/gyp/test/mac/xcuitest/TestCase.m create mode 100644 third_party/python/gyp/test/mac/xcuitest/main.m create mode 100644 third_party/python/gyp/test/mac/xcuitest/resource.txt create mode 100644 third_party/python/gyp/test/mac/xcuitest/test.gyp (limited to 'third_party/python/gyp/test/mac') diff --git a/third_party/python/gyp/test/mac/action-envvars/action/action.gyp b/third_party/python/gyp/test/mac/action-envvars/action/action.gyp new file mode 100644 index 0000000000..d9d65745ca --- /dev/null +++ b/third_party/python/gyp/test/mac/action-envvars/action/action.gyp @@ -0,0 +1,34 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'action', + 'type': 'none', + 'actions': [ + { + 'inputs': [ ], + 'outputs': [ + '<(PRODUCT_DIR)/result', + '<(SHARED_INTERMEDIATE_DIR)/tempfile', + ], + 'action_name': 'Test action', + 'action': ['./action.sh', '<(SHARED_INTERMEDIATE_DIR)/tempfile' ], + }, + { + 'inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/tempfile', + ], + 'outputs': [ + '<(PRODUCT_DIR)/other_result', + ], + 'action_name': 'Other test action', + 'action': ['cp', '<(SHARED_INTERMEDIATE_DIR)/tempfile', + '<(PRODUCT_DIR)/other_result' ], + }, + ], + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/action-envvars/action/action.sh b/third_party/python/gyp/test/mac/action-envvars/action/action.sh new file mode 100755 index 0000000000..48d5f6bf86 --- /dev/null +++ b/third_party/python/gyp/test/mac/action-envvars/action/action.sh @@ -0,0 +1,8 @@ +# Copyright (c) 2012 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. + +set -e + +echo 'Test output' > "${BUILT_PRODUCTS_DIR}/result" +echo 'Other output' > "$1" diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist-error.strings b/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist-error.strings new file mode 100644 index 0000000000..452e7fabf9 --- /dev/null +++ b/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist-error.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "Copyright ©2011 Google Inc." diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist.strings b/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist.strings new file mode 100644 index 0000000000..35bd33a96e --- /dev/null +++ b/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "Copyright ©2011 Google Inc."; diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/MainMenu.xib b/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/MainMenu.xib new file mode 100644 index 0000000000..4524596787 --- /dev/null +++ b/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/MainMenu.xib @@ -0,0 +1,4119 @@ + + + + 1060 + 10A324 + 719 + 1015 + 418.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 719 + + + YES + + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + AMainMenu + + YES + + + TestApp + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + TestApp + + YES + + + About TestApp + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + Services + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide TestApp + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit TestApp + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + File + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open… + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + Open Recent + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1179648 + 2147483647 + + + + + + Revert to Saved + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup... + P + 1179648 + 2147483647 + + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + Edit + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1179648 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + Find + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1179648 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling and Grammar + + 1048576 + 2147483647 + + + submenuAction: + + Spelling and Grammar + + YES + + + Show Spelling and Grammar + : + 1048576 + 2147483647 + + + + + + Check Document Now + ; + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Check Spelling While Typing + + 1048576 + 2147483647 + + + + + + Check Grammar With Spelling + + 1048576 + 2147483647 + + + + + + Correct Spelling Automatically + + 2147483647 + + + + + + + + + Substitutions + + 1048576 + 2147483647 + + + submenuAction: + + Substitutions + + YES + + + Show Substitutions + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Smart Copy/Paste + f + 1048576 + 2147483647 + + + 1 + + + + Smart Quotes + g + 1048576 + 2147483647 + + + 2 + + + + Smart Dashes + + 2147483647 + + + + + + Smart Links + G + 1179648 + 2147483647 + + + 3 + + + + Text Replacement + + 2147483647 + + + + + + + + + Transformations + + 2147483647 + + + submenuAction: + + Transformations + + YES + + + Make Upper Case + + 2147483647 + + + + + + Make Lower Case + + 2147483647 + + + + + + Capitalize + + 2147483647 + + + + + + + + + Speech + + 1048576 + 2147483647 + + + submenuAction: + + Speech + + YES + + + Start Speaking + + 1048576 + 2147483647 + + + + + + Stop Speaking + + 1048576 + 2147483647 + + + + + + + + + + + + Format + + 2147483647 + + + submenuAction: + + Format + + YES + + + Font + + 2147483647 + + + submenuAction: + + Font + + YES + + + Show Fonts + t + 1048576 + 2147483647 + + + + + + Bold + b + 1048576 + 2147483647 + + + 2 + + + + Italic + i + 1048576 + 2147483647 + + + 1 + + + + Underline + u + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Bigger + + + 1048576 + 2147483647 + + + 3 + + + + Smaller + - + 1048576 + 2147483647 + + + 4 + + + + YES + YES + + + 2147483647 + + + + + + Kern + + 2147483647 + + + submenuAction: + + Kern + + YES + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Tighten + + 2147483647 + + + + + + Loosen + + 2147483647 + + + + + + + + + Ligature + + 2147483647 + + + submenuAction: + + Ligature + + YES + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Use All + + 2147483647 + + + + + + + + + Baseline + + 2147483647 + + + submenuAction: + + Baseline + + YES + + + Use Default + + 2147483647 + + + + + + Superscript + + 2147483647 + + + + + + Subscript + + 2147483647 + + + + + + Raise + + 2147483647 + + + + + + Lower + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Colors + C + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Copy Style + c + 1572864 + 2147483647 + + + + + + Paste Style + v + 1572864 + 2147483647 + + + + + _NSFontMenu + + + + + Text + + 2147483647 + + + submenuAction: + + Text + + YES + + + Align Left + { + 1048576 + 2147483647 + + + + + + Center + | + 1048576 + 2147483647 + + + + + + Justify + + 2147483647 + + + + + + Align Right + } + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Writing Direction + + 2147483647 + + + submenuAction: + + Writing Direction + + YES + + + YES + Paragraph + + 2147483647 + + + + + + CURlZmF1bHQ + + 2147483647 + + + + + + CUxlZnQgdG8gUmlnaHQ + + 2147483647 + + + + + + CVJpZ2h0IHRvIExlZnQ + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + YES + Selection + + 2147483647 + + + + + + CURlZmF1bHQ + + 2147483647 + + + + + + CUxlZnQgdG8gUmlnaHQ + + 2147483647 + + + + + + CVJpZ2h0IHRvIExlZnQ + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Ruler + + 2147483647 + + + + + + Copy Ruler + c + 1310720 + 2147483647 + + + + + + Paste Ruler + v + 1310720 + 2147483647 + + + + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + View + + YES + + + Show Toolbar + t + 1572864 + 2147483647 + + + + + + Customize Toolbar… + + 1048576 + 2147483647 + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + Window + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 2147483647 + + + submenuAction: + + Help + + YES + + + TestApp Help + ? + 1048576 + 2147483647 + + + + + _NSHelpMenu + + + + _NSMainMenu + + + 15 + 2 + {{335, 390}, {480, 360}} + 1954021376 + TestApp + NSWindow + + {1.79769e+308, 1.79769e+308} + + + 256 + {480, 360} + + + {{0, 0}, {1920, 1178}} + {1.79769e+308, 1.79769e+308} + + + TestAppAppDelegate + + + NSFontManager + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + clearRecentDocuments: + + + + 127 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + performClose: + + + + 193 + + + + toggleContinuousSpellChecking: + + + + 222 + + + + undo: + + + + 223 + + + + copy: + + + + 224 + + + + checkSpelling: + + + + 225 + + + + paste: + + + + 226 + + + + stopSpeaking: + + + + 227 + + + + cut: + + + + 228 + + + + showGuessPanel: + + + + 230 + + + + redo: + + + + 231 + + + + selectAll: + + + + 232 + + + + startSpeaking: + + + + 233 + + + + delete: + + + + 235 + + + + performZoom: + + + + 240 + + + + performFindPanelAction: + + + + 241 + + + + centerSelectionInVisibleArea: + + + + 245 + + + + toggleGrammarChecking: + + + + 347 + + + + toggleSmartInsertDelete: + + + + 355 + + + + toggleAutomaticQuoteSubstitution: + + + + 356 + + + + toggleAutomaticLinkDetection: + + + + 357 + + + + saveDocument: + + + + 362 + + + + saveDocumentAs: + + + + 363 + + + + revertDocumentToSaved: + + + + 364 + + + + runToolbarCustomizationPalette: + + + + 365 + + + + toggleToolbarShown: + + + + 366 + + + + hide: + + + + 367 + + + + hideOtherApplications: + + + + 368 + + + + unhideAllApplications: + + + + 370 + + + + newDocument: + + + + 373 + + + + openDocument: + + + + 374 + + + + addFontTrait: + + + + 421 + + + + addFontTrait: + + + + 422 + + + + modifyFont: + + + + 423 + + + + orderFrontFontPanel: + + + + 424 + + + + modifyFont: + + + + 425 + + + + raiseBaseline: + + + + 426 + + + + lowerBaseline: + + + + 427 + + + + copyFont: + + + + 428 + + + + subscript: + + + + 429 + + + + superscript: + + + + 430 + + + + tightenKerning: + + + + 431 + + + + underline: + + + + 432 + + + + orderFrontColorPanel: + + + + 433 + + + + useAllLigatures: + + + + 434 + + + + loosenKerning: + + + + 435 + + + + pasteFont: + + + + 436 + + + + unscript: + + + + 437 + + + + useStandardKerning: + + + + 438 + + + + useStandardLigatures: + + + + 439 + + + + turnOffLigatures: + + + + 440 + + + + turnOffKerning: + + + + 441 + + + + terminate: + + + + 449 + + + + toggleAutomaticSpellingCorrection: + + + + 456 + + + + orderFrontSubstitutionsPanel: + + + + 458 + + + + toggleAutomaticDashSubstitution: + + + + 461 + + + + toggleAutomaticTextReplacement: + + + + 463 + + + + uppercaseWord: + + + + 464 + + + + capitalizeWord: + + + + 467 + + + + lowercaseWord: + + + + 468 + + + + pasteAsPlainText: + + + + 486 + + + + performFindPanelAction: + + + + 487 + + + + performFindPanelAction: + + + + 488 + + + + performFindPanelAction: + + + + 489 + + + + showHelp: + + + + 493 + + + + delegate + + + + 495 + + + + alignCenter: + + + + 518 + + + + pasteRuler: + + + + 519 + + + + toggleRuler: + + + + 520 + + + + alignRight: + + + + 521 + + + + copyRuler: + + + + 522 + + + + alignJustified: + + + + 523 + + + + alignLeft: + + + + 524 + + + + makeBaseWritingDirectionNatural: + + + + 525 + + + + makeBaseWritingDirectionLeftToRight: + + + + 526 + + + + makeBaseWritingDirectionRightToLeft: + + + + 527 + + + + makeTextWritingDirectionNatural: + + + + 528 + + + + makeTextWritingDirectionLeftToRight: + + + + 529 + + + + makeTextWritingDirectionRightToLeft: + + + + 530 + + + + window + + + + 532 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + + + + + 19 + + + YES + + + + + + 56 + + + YES + + + + + + 217 + + + YES + + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 75 + + + + + 80 + + + + + 78 + + + + + 72 + + + + + 82 + + + + + 124 + + + YES + + + + + + 77 + + + + + 73 + + + + + 79 + + + + + 112 + + + + + 74 + + + + + 125 + + + YES + + + + + + 126 + + + + + 205 + + + YES + + + + + + + + + + + + + + + + + + + + 202 + + + + + 198 + + + + + 207 + + + + + 214 + + + + + 199 + + + + + 203 + + + + + 197 + + + + + 206 + + + + + 215 + + + + + 218 + + + YES + + + + + + 216 + + + YES + + + + + + 200 + + + YES + + + + + + + + + + + 219 + + + + + 201 + + + + + 204 + + + + + 220 + + + YES + + + + + + + + + + 213 + + + + + 210 + + + + + 221 + + + + + 208 + + + + + 209 + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 134 + + + + + 150 + + + + + 136 + + + + + 144 + + + + + 129 + + + + + 143 + + + + + 236 + + + + + 131 + + + YES + + + + + + 149 + + + + + 145 + + + + + 130 + + + + + 24 + + + YES + + + + + + + + + 92 + + + + + 5 + + + + + 239 + + + + + 23 + + + + + 295 + + + YES + + + + + + 296 + + + YES + + + + + + + 297 + + + + + 298 + + + + + 211 + + + YES + + + + + + 212 + + + YES + + + + + + + 195 + + + + + 196 + + + + + 346 + + + + + 348 + + + YES + + + + + + 349 + + + YES + + + + + + + + + + + + 350 + + + + + 351 + + + + + 354 + + + + + 371 + + + YES + + + + + + 372 + + + + + 375 + + + YES + + + + + + 376 + + + YES + + + + + + + 377 + + + YES + + + + + + 388 + + + YES + + + + + + + + + + + + + + + + + + + + + 389 + + + + + 390 + + + + + 391 + + + + + 392 + + + + + 393 + + + + + 394 + + + + + 395 + + + + + 396 + + + + + 397 + + + YES + + + + + + 398 + + + YES + + + + + + 399 + + + YES + + + + + + 400 + + + + + 401 + + + + + 402 + + + + + 403 + + + + + 404 + + + + + 405 + + + YES + + + + + + + + + + 406 + + + + + 407 + + + + + 408 + + + + + 409 + + + + + 410 + + + + + 411 + + + YES + + + + + + + + 412 + + + + + 413 + + + + + 414 + + + + + 415 + + + YES + + + + + + + + + 416 + + + + + 417 + + + + + 418 + + + + + 419 + + + + + 420 + + + + + 450 + + + YES + + + + + + 451 + + + YES + + + + + + + + 452 + + + + + 453 + + + + + 454 + + + + + 457 + + + + + 459 + + + + + 460 + + + + + 462 + + + + + 465 + + + + + 466 + + + + + 485 + + + + + 490 + + + YES + + + + + + 491 + + + YES + + + + + + 492 + + + + + 494 + + + + + 496 + + + YES + + + + + + 497 + + + YES + + + + + + + + + + + + + + + 498 + + + + + 499 + + + + + 500 + + + + + 501 + + + + + 502 + + + + + 503 + + + YES + + + + + + 504 + + + + + 505 + + + + + 506 + + + + + 507 + + + + + 508 + + + YES + + + + + + + + + + + + + + 509 + + + + + 510 + + + + + 511 + + + + + 512 + + + + + 513 + + + + + 514 + + + + + 515 + + + + + 516 + + + + + 517 + + + + + + + YES + + YES + -3.IBPluginDependency + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 125.editorWindowContentRectSynchronizationRect + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 130.editorWindowContentRectSynchronizationRect + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 195.IBPluginDependency + 195.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 198.IBPluginDependency + 198.ImportedFromIB2 + 199.IBPluginDependency + 199.ImportedFromIB2 + 200.IBEditorWindowLastContentRect + 200.IBPluginDependency + 200.ImportedFromIB2 + 200.editorWindowContentRectSynchronizationRect + 201.IBPluginDependency + 201.ImportedFromIB2 + 202.IBPluginDependency + 202.ImportedFromIB2 + 203.IBPluginDependency + 203.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 205.IBEditorWindowLastContentRect + 205.IBPluginDependency + 205.ImportedFromIB2 + 205.editorWindowContentRectSynchronizationRect + 206.IBPluginDependency + 206.ImportedFromIB2 + 207.IBPluginDependency + 207.ImportedFromIB2 + 208.IBPluginDependency + 208.ImportedFromIB2 + 209.IBPluginDependency + 209.ImportedFromIB2 + 210.IBPluginDependency + 210.ImportedFromIB2 + 211.IBPluginDependency + 211.ImportedFromIB2 + 212.IBPluginDependency + 212.ImportedFromIB2 + 212.editorWindowContentRectSynchronizationRect + 213.IBPluginDependency + 213.ImportedFromIB2 + 214.IBPluginDependency + 214.ImportedFromIB2 + 215.IBPluginDependency + 215.ImportedFromIB2 + 216.IBPluginDependency + 216.ImportedFromIB2 + 217.IBPluginDependency + 217.ImportedFromIB2 + 218.IBPluginDependency + 218.ImportedFromIB2 + 219.IBPluginDependency + 219.ImportedFromIB2 + 220.IBEditorWindowLastContentRect + 220.IBPluginDependency + 220.ImportedFromIB2 + 220.editorWindowContentRectSynchronizationRect + 221.IBPluginDependency + 221.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 236.IBPluginDependency + 236.ImportedFromIB2 + 239.IBPluginDependency + 239.ImportedFromIB2 + 24.IBEditorWindowLastContentRect + 24.IBPluginDependency + 24.ImportedFromIB2 + 24.editorWindowContentRectSynchronizationRect + 29.IBEditorWindowLastContentRect + 29.IBPluginDependency + 29.ImportedFromIB2 + 29.WindowOrigin + 29.editorWindowContentRectSynchronizationRect + 295.IBPluginDependency + 296.IBEditorWindowLastContentRect + 296.IBPluginDependency + 296.editorWindowContentRectSynchronizationRect + 297.IBPluginDependency + 298.IBPluginDependency + 346.IBPluginDependency + 346.ImportedFromIB2 + 348.IBPluginDependency + 348.ImportedFromIB2 + 349.IBEditorWindowLastContentRect + 349.IBPluginDependency + 349.ImportedFromIB2 + 349.editorWindowContentRectSynchronizationRect + 350.IBPluginDependency + 350.ImportedFromIB2 + 351.IBPluginDependency + 351.ImportedFromIB2 + 354.IBPluginDependency + 354.ImportedFromIB2 + 371.IBEditorWindowLastContentRect + 371.IBPluginDependency + 371.IBWindowTemplateEditedContentRect + 371.NSWindowTemplate.visibleAtLaunch + 371.editorWindowContentRectSynchronizationRect + 371.windowTemplate.maxSize + 372.IBPluginDependency + 375.IBPluginDependency + 376.IBEditorWindowLastContentRect + 376.IBPluginDependency + 377.IBPluginDependency + 388.IBEditorWindowLastContentRect + 388.IBPluginDependency + 389.IBPluginDependency + 390.IBPluginDependency + 391.IBPluginDependency + 392.IBPluginDependency + 393.IBPluginDependency + 394.IBPluginDependency + 395.IBPluginDependency + 396.IBPluginDependency + 397.IBPluginDependency + 398.IBPluginDependency + 399.IBPluginDependency + 400.IBPluginDependency + 401.IBPluginDependency + 402.IBPluginDependency + 403.IBPluginDependency + 404.IBPluginDependency + 405.IBPluginDependency + 406.IBPluginDependency + 407.IBPluginDependency + 408.IBPluginDependency + 409.IBPluginDependency + 410.IBPluginDependency + 411.IBPluginDependency + 412.IBPluginDependency + 413.IBPluginDependency + 414.IBPluginDependency + 415.IBPluginDependency + 416.IBPluginDependency + 417.IBPluginDependency + 418.IBPluginDependency + 419.IBPluginDependency + 450.IBPluginDependency + 451.IBEditorWindowLastContentRect + 451.IBPluginDependency + 452.IBPluginDependency + 453.IBPluginDependency + 454.IBPluginDependency + 457.IBPluginDependency + 459.IBPluginDependency + 460.IBPluginDependency + 462.IBPluginDependency + 465.IBPluginDependency + 466.IBPluginDependency + 485.IBPluginDependency + 490.IBPluginDependency + 491.IBEditorWindowLastContentRect + 491.IBPluginDependency + 492.IBPluginDependency + 496.IBPluginDependency + 497.IBEditorWindowLastContentRect + 497.IBPluginDependency + 498.IBPluginDependency + 499.IBPluginDependency + 5.IBPluginDependency + 5.ImportedFromIB2 + 500.IBPluginDependency + 501.IBPluginDependency + 502.IBPluginDependency + 503.IBPluginDependency + 504.IBPluginDependency + 505.IBPluginDependency + 506.IBPluginDependency + 507.IBPluginDependency + 508.IBEditorWindowLastContentRect + 508.IBPluginDependency + 509.IBPluginDependency + 510.IBPluginDependency + 511.IBPluginDependency + 512.IBPluginDependency + 513.IBPluginDependency + 514.IBPluginDependency + 515.IBPluginDependency + 516.IBPluginDependency + 517.IBPluginDependency + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBEditorWindowLastContentRect + 57.IBPluginDependency + 57.ImportedFromIB2 + 57.editorWindowContentRectSynchronizationRect + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBEditorWindowLastContentRect + 81.IBPluginDependency + 81.ImportedFromIB2 + 81.editorWindowContentRectSynchronizationRect + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{522, 812}, {146, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{436, 809}, {64, 6}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{753, 187}, {275, 113}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {275, 83}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{547, 180}, {254, 283}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{187, 434}, {243, 243}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {167, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{753, 217}, {238, 103}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {241, 103}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{654, 239}, {194, 73}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{525, 802}, {197, 73}} + {{380, 836}, {512, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {74, 862} + {{6, 978}, {478, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + {{604, 269}, {231, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + {{475, 832}, {234, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{746, 287}, {220, 133}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {215, 63}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{380, 496}, {480, 360}} + com.apple.InterfaceBuilder.CocoaPlugin + {{380, 496}, {480, 360}} + + {{33, 99}, {480, 360}} + {3.40282e+38, 3.40282e+38} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{591, 420}, {83, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{523, 2}, {178, 283}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{753, 197}, {170, 63}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{725, 289}, {246, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{674, 260}, {204, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{878, 180}, {164, 173}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{286, 129}, {275, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{23, 794}, {245, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{452, 109}, {196, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 474}, {199, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 532 + + + + YES + + TestAppAppDelegate + NSObject + + window + NSWindow + + + IBProjectSource + TestAppAppDelegate.h + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFontManager + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSTextView + NSText + + IBFrameworkSource + AppKit.framework/Headers/NSTextView.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + + 0 + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../TestApp.xcodeproj + 3 + + diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16be.strings b/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16be.strings new file mode 100644 index 0000000000..580783735f Binary files /dev/null and b/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16be.strings differ diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16le.strings b/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16le.strings new file mode 100644 index 0000000000..eeb383784c Binary files /dev/null and b/third_party/python/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16le.strings differ diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json b/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..2db2b1c7c6 --- /dev/null +++ b/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json b/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json new file mode 100644 index 0000000000..0a87b6edc6 --- /dev/null +++ b/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "super_sylvain.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "super_sylvain@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "super_sylvain@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png b/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png new file mode 100644 index 0000000000..0ba769182f Binary files /dev/null and b/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png differ diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png b/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png new file mode 100644 index 0000000000..edfa6a5682 Binary files /dev/null and b/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png differ diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png b/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png new file mode 100644 index 0000000000..e0652efc72 Binary files /dev/null and b/third_party/python/gyp/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png differ diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/TestApp-Info.plist b/third_party/python/gyp/test/mac/app-bundle/TestApp/TestApp-Info.plist new file mode 100644 index 0000000000..e005852f9f --- /dev/null +++ b/third_party/python/gyp/test/mac/app-bundle/TestApp/TestApp-Info.plist @@ -0,0 +1,34 @@ + + + + + BuildMachineOSBuild + Doesn't matter, will be overwritten + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.google.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ause + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.h b/third_party/python/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.h new file mode 100644 index 0000000000..518645eae9 --- /dev/null +++ b/third_party/python/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.h @@ -0,0 +1,13 @@ +// Copyright (c) 2011 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. + +#import + +@interface TestAppAppDelegate : NSObject { + NSWindow *window; +} + +@property (assign) IBOutlet NSWindow *window; + +@end diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.m b/third_party/python/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.m new file mode 100644 index 0000000000..9aafa42000 --- /dev/null +++ b/third_party/python/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.m @@ -0,0 +1,15 @@ +// Copyright (c) 2011 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. + +#import "TestAppAppDelegate.h" + +@implementation TestAppAppDelegate + +@synthesize window; + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application +} + +@end diff --git a/third_party/python/gyp/test/mac/app-bundle/TestApp/main.m b/third_party/python/gyp/test/mac/app-bundle/TestApp/main.m new file mode 100644 index 0000000000..df6a12d065 --- /dev/null +++ b/third_party/python/gyp/test/mac/app-bundle/TestApp/main.m @@ -0,0 +1,10 @@ +// Copyright (c) 2011 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. + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} diff --git a/third_party/python/gyp/test/mac/app-bundle/empty.c b/third_party/python/gyp/test/mac/app-bundle/empty.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/third_party/python/gyp/test/mac/app-bundle/test-assets-catalog.gyp b/third_party/python/gyp/test/mac/app-bundle/test-assets-catalog.gyp new file mode 100644 index 0000000000..25f94a12d0 --- /dev/null +++ b/third_party/python/gyp/test/mac/app-bundle/test-assets-catalog.gyp @@ -0,0 +1,43 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'dep_framework', + 'product_name': 'Dependency Framework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'empty.c', ], + }, + { + 'target_name': 'test_app', + 'product_name': 'Test App Assets Catalog Gyp', + 'type': 'executable', + 'mac_bundle': 1, + 'dependencies': [ 'dep_framework', ], + 'sources': [ + 'TestApp/main.m', + 'TestApp/TestApp_Prefix.pch', + 'TestApp/TestAppAppDelegate.h', + 'TestApp/TestAppAppDelegate.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', # UTF-8 + 'TestApp/English.lproj/utf-16be.strings', + 'TestApp/English.lproj/utf-16le.strings', + 'TestApp/English.lproj/MainMenu.xib', + 'TestApp/Images.xcassets', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework', + ], + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'MACOSX_DEPLOYMENT_TARGET': '10.9', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/app-bundle/test-error.gyp b/third_party/python/gyp/test/mac/app-bundle/test-error.gyp new file mode 100644 index 0000000000..370772cc31 --- /dev/null +++ b/third_party/python/gyp/test/mac/app-bundle/test-error.gyp @@ -0,0 +1,31 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test App Gyp', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + 'TestApp/TestApp_Prefix.pch', + 'TestApp/TestAppAppDelegate.h', + 'TestApp/TestAppAppDelegate.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist-error.strings', + 'TestApp/English.lproj/MainMenu.xib', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework', + ], + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/app-bundle/test.gyp b/third_party/python/gyp/test/mac/app-bundle/test.gyp new file mode 100644 index 0000000000..21973c3623 --- /dev/null +++ b/third_party/python/gyp/test/mac/app-bundle/test.gyp @@ -0,0 +1,41 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'dep_framework', + 'product_name': 'Dependency Framework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'empty.c', ], + }, + { + 'target_name': 'test_app', + 'product_name': 'Test App Gyp', + 'type': 'executable', + 'mac_bundle': 1, + 'dependencies': [ 'dep_framework', ], + 'sources': [ + 'TestApp/main.m', + 'TestApp/TestApp_Prefix.pch', + 'TestApp/TestAppAppDelegate.h', + 'TestApp/TestAppAppDelegate.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', # UTF-8 + 'TestApp/English.lproj/utf-16be.strings', + 'TestApp/English.lproj/utf-16le.strings', + 'TestApp/English.lproj/MainMenu.xib', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework', + ], + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/archs/empty_main.cc b/third_party/python/gyp/test/mac/archs/empty_main.cc new file mode 100644 index 0000000000..237c8ce181 --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/empty_main.cc @@ -0,0 +1 @@ +int main() {} diff --git a/third_party/python/gyp/test/mac/archs/file.mm b/third_party/python/gyp/test/mac/archs/file.mm new file mode 100644 index 0000000000..d0b39d1f6d --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/file.mm @@ -0,0 +1 @@ +MyInt f() { return 0; } diff --git a/third_party/python/gyp/test/mac/archs/file_a.cc b/third_party/python/gyp/test/mac/archs/file_a.cc new file mode 100644 index 0000000000..7307873c83 --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/file_a.cc @@ -0,0 +1,8 @@ +// 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. + +#include "file_a.h" + +void DependentFunctionA() { +} diff --git a/third_party/python/gyp/test/mac/archs/file_a.h b/third_party/python/gyp/test/mac/archs/file_a.h new file mode 100644 index 0000000000..7439d13182 --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/file_a.h @@ -0,0 +1,10 @@ +// 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. + +#ifndef _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_A_H_ +#define _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_A_H_ + +void DependentFunctionA(); + +#endif // _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_A_H_ diff --git a/third_party/python/gyp/test/mac/archs/file_b.cc b/third_party/python/gyp/test/mac/archs/file_b.cc new file mode 100644 index 0000000000..72d59cbfb4 --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/file_b.cc @@ -0,0 +1,8 @@ +// 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. + +#include "file_b.h" + +void DependentFunctionB() { +} diff --git a/third_party/python/gyp/test/mac/archs/file_b.h b/third_party/python/gyp/test/mac/archs/file_b.h new file mode 100644 index 0000000000..eb272ece55 --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/file_b.h @@ -0,0 +1,10 @@ +// 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. + +#ifndef _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_B_H_ +#define _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_B_H_ + +void DependentFunctionB(); + +#endif // _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_B_H_ diff --git a/third_party/python/gyp/test/mac/archs/file_c.cc b/third_party/python/gyp/test/mac/archs/file_c.cc new file mode 100644 index 0000000000..ca39f7a671 --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/file_c.cc @@ -0,0 +1,11 @@ +// 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. + +#include "file_a.h" +#include "file_b.h" + +void PublicFunctionC() { + DependentFunctionA(); + DependentFunctionB(); +} diff --git a/third_party/python/gyp/test/mac/archs/file_d.cc b/third_party/python/gyp/test/mac/archs/file_d.cc new file mode 100644 index 0000000000..c40911cdca --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/file_d.cc @@ -0,0 +1,11 @@ +// 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. + +#include "file_a.h" +#include "file_b.h" + +void PublicFunctionD() { + DependentFunctionA(); + DependentFunctionB(); +} diff --git a/third_party/python/gyp/test/mac/archs/header.h b/third_party/python/gyp/test/mac/archs/header.h new file mode 100644 index 0000000000..0716e500c5 --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/header.h @@ -0,0 +1 @@ +typedef int MyInt; diff --git a/third_party/python/gyp/test/mac/archs/my_file.cc b/third_party/python/gyp/test/mac/archs/my_file.cc new file mode 100644 index 0000000000..94216a74df --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/my_file.cc @@ -0,0 +1,4 @@ +/* Copyright (c) 2012 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. */ +int x = 1; diff --git a/third_party/python/gyp/test/mac/archs/my_main_file.cc b/third_party/python/gyp/test/mac/archs/my_main_file.cc new file mode 100644 index 0000000000..f1fa06f276 --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/my_main_file.cc @@ -0,0 +1,9 @@ +/* Copyright (c) 2012 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. */ +#include +extern int x; +int main() { + printf("hello, world %d\n", x); +} + diff --git a/third_party/python/gyp/test/mac/archs/test-archs-multiarch.gyp b/third_party/python/gyp/test/mac/archs/test-archs-multiarch.gyp new file mode 100644 index 0000000000..567e8a6653 --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/test-archs-multiarch.gyp @@ -0,0 +1,92 @@ +# Copyright (c) 2012 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. + +{ + 'targets': [ + { + 'target_name': 'static_32_64', + 'type': 'static_library', + 'sources': [ 'my_file.cc' ], + 'xcode_settings': { + 'ARCHS': [ 'i386', 'x86_64' ], + }, + }, + { + 'target_name': 'shared_32_64', + 'type': 'shared_library', + 'sources': [ 'my_file.cc' ], + 'xcode_settings': { + 'ARCHS': [ 'i386', 'x86_64' ], + }, + }, + { + 'target_name': 'shared_32_64_bundle', + 'product_name': 'My Framework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'my_file.cc' ], + 'xcode_settings': { + 'ARCHS': [ 'i386', 'x86_64' ], + }, + }, + { + 'target_name': 'module_32_64', + 'type': 'loadable_module', + 'sources': [ 'my_file.cc' ], + 'xcode_settings': { + 'ARCHS': [ 'i386', 'x86_64' ], + }, + }, + { + 'target_name': 'module_32_64_bundle', + 'product_name': 'My Bundle', + 'type': 'loadable_module', + 'mac_bundle': 1, + 'sources': [ 'my_file.cc' ], + 'xcode_settings': { + 'ARCHS': [ 'i386', 'x86_64' ], + }, + }, + { + 'target_name': 'exe_32_64', + 'type': 'executable', + 'sources': [ 'empty_main.cc' ], + 'xcode_settings': { + 'ARCHS': [ 'i386', 'x86_64' ], + }, + }, + { + 'target_name': 'exe_32_64_bundle', + 'product_name': 'Test App', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'empty_main.cc' ], + 'xcode_settings': { + 'ARCHS': [ 'i386', 'x86_64' ], + }, + }, + # This only needs to compile. + { + 'target_name': 'precompiled_prefix_header_mm_32_64', + 'type': 'shared_library', + 'sources': [ 'file.mm', ], + 'xcode_settings': { + 'GCC_PREFIX_HEADER': 'header.h', + 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES', + }, + }, + # This does not compile but should not cause generation errors. + { + 'target_name': 'exe_32_64_no_sources', + 'type': 'executable', + 'dependencies': [ + 'static_32_64', + ], + 'sources': [], + 'xcode_settings': { + 'ARCHS': ['i386', 'x86_64'], + }, + }, + ] +} diff --git a/third_party/python/gyp/test/mac/archs/test-archs-x86_64.gyp b/third_party/python/gyp/test/mac/archs/test-archs-x86_64.gyp new file mode 100644 index 0000000000..d11a896273 --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/test-archs-x86_64.gyp @@ -0,0 +1,27 @@ +# Copyright (c) 2012 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. + +{ + 'targets': [ + { + 'target_name': 'lib', + 'product_name': 'Test64', + 'type': 'static_library', + 'sources': [ 'my_file.cc' ], + 'xcode_settings': { + 'ARCHS': [ 'x86_64' ], + }, + }, + { + 'target_name': 'exe', + 'product_name': 'Test64', + 'type': 'executable', + 'dependencies': [ 'lib' ], + 'sources': [ 'my_main_file.cc' ], + 'xcode_settings': { + 'ARCHS': [ 'x86_64' ], + }, + }, + ] +} diff --git a/third_party/python/gyp/test/mac/archs/test-dependencies.gyp b/third_party/python/gyp/test/mac/archs/test-dependencies.gyp new file mode 100644 index 0000000000..0431f5f2f4 --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/test-dependencies.gyp @@ -0,0 +1,92 @@ +# 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. + +{ + 'target_defaults': { + 'xcode_settings': { + 'ARCHS': ['i386', 'x86_64'], + }, + }, + 'targets': [ + { + 'target_name': 'target_a', + 'type': 'static_library', + 'sources': [ + 'file_a.cc', + 'file_a.h', + ], + }, + { + 'target_name': 'target_b', + 'type': 'static_library', + 'sources': [ + 'file_b.cc', + 'file_b.h', + ], + }, + { + 'target_name': 'target_c_standalone_helper', + 'type': 'loadable_module', + 'hard_dependency': 1, + 'dependencies': [ + 'target_a', + 'target_b', + ], + 'sources': [ + 'file_c.cc', + ], + }, + { + 'target_name': 'target_c_standalone', + 'type': 'none', + 'dependencies': [ + 'target_c_standalone_helper', + ], + 'actions': [ + { + 'action_name': 'Package C', + 'inputs': [], + 'outputs': [ + '<(PRODUCT_DIR)/libc_standalone.a', + ], + 'action': [ + 'touch', + '<@(_outputs)', + ], + }, + ], + }, + { + 'target_name': 'target_d_standalone_helper', + 'type': 'shared_library', + 'dependencies': [ + 'target_a', + 'target_b', + ], + 'sources': [ + 'file_d.cc', + ], + }, + { + 'target_name': 'target_d_standalone', + 'type': 'none', + 'dependencies': [ + 'target_d_standalone_helper', + ], + 'actions': [ + { + 'action_name': 'Package D', + 'inputs': [], + 'outputs': [ + '<(PRODUCT_DIR)/libd_standalone.a', + ], + 'action': [ + 'touch', + '<@(_outputs)', + ], + }, + ], + } + ], +} diff --git a/third_party/python/gyp/test/mac/archs/test-no-archs.gyp b/third_party/python/gyp/test/mac/archs/test-no-archs.gyp new file mode 100644 index 0000000000..8f3b6b47cc --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/test-no-archs.gyp @@ -0,0 +1,21 @@ +# Copyright (c) 2012 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. + +{ + 'targets': [ + { + 'target_name': 'lib', + 'product_name': 'Test', + 'type': 'static_library', + 'sources': [ 'my_file.cc' ], + }, + { + 'target_name': 'exe', + 'product_name': 'Test', + 'type': 'executable', + 'dependencies': [ 'lib' ], + 'sources': [ 'my_main_file.cc' ], + }, + ] +} diff --git a/third_party/python/gyp/test/mac/archs/test-valid-archs.gyp b/third_party/python/gyp/test/mac/archs/test-valid-archs.gyp new file mode 100644 index 0000000000..c90ec1fe9b --- /dev/null +++ b/third_party/python/gyp/test/mac/archs/test-valid-archs.gyp @@ -0,0 +1,28 @@ +# 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. + +{ + 'targets': [ + { + 'target_name': 'lib', + 'product_name': 'Test', + 'type': 'static_library', + 'sources': [ 'my_file.cc' ], + 'xcode_settings': { + 'ARCHS': ['i386', 'x86_64', 'unknown-arch'], + 'VALID_ARCHS': ['x86_64'], + }, + }, + { + 'target_name': 'exe', + 'product_name': 'Test', + 'type': 'executable', + 'dependencies': [ 'lib' ], + 'sources': [ 'my_main_file.cc' ], + 'xcode_settings': { + 'ARCHS': ['i386', 'x86_64', 'unknown-arch'], + 'VALID_ARCHS': ['x86_64'], + }, + }] +} diff --git a/third_party/python/gyp/test/mac/bundle-resources/change.sh b/third_party/python/gyp/test/mac/bundle-resources/change.sh new file mode 100755 index 0000000000..6d0fe6c7c2 --- /dev/null +++ b/third_party/python/gyp/test/mac/bundle-resources/change.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +tr a-z A-Z < "${1}" > "${2}" diff --git a/third_party/python/gyp/test/mac/bundle-resources/executable-file.sh b/third_party/python/gyp/test/mac/bundle-resources/executable-file.sh new file mode 100755 index 0000000000..796953a1a2 --- /dev/null +++ b/third_party/python/gyp/test/mac/bundle-resources/executable-file.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo echo echo echo cho ho o o diff --git a/third_party/python/gyp/test/mac/bundle-resources/secret.txt b/third_party/python/gyp/test/mac/bundle-resources/secret.txt new file mode 100644 index 0000000000..8baef1b4ab --- /dev/null +++ b/third_party/python/gyp/test/mac/bundle-resources/secret.txt @@ -0,0 +1 @@ +abc diff --git a/third_party/python/gyp/test/mac/bundle-resources/test.gyp b/third_party/python/gyp/test/mac/bundle-resources/test.gyp new file mode 100644 index 0000000000..af034ce3f4 --- /dev/null +++ b/third_party/python/gyp/test/mac/bundle-resources/test.gyp @@ -0,0 +1,59 @@ +# Copyright (c) 2013 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. +{ + 'targets': [ + { + 'target_name': 'resource', + 'type': 'executable', + 'mac_bundle': 1, + 'mac_bundle_resources': [ + 'secret.txt', + 'executable-file.sh', + ], + }, + # A rule with process_outputs_as_mac_bundle_resources should copy files + # into the Resources folder. + { + 'target_name': 'source_rule', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'secret.txt', + ], + 'rules': [ + { + 'rule_name': 'bundlerule', + 'extension': 'txt', + 'outputs': [ + '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).txt', + ], + 'action': ['./change.sh', '<(RULE_INPUT_PATH)', '<@(_outputs)'], + 'message': 'Running rule on <(RULE_INPUT_PATH)', + 'process_outputs_as_mac_bundle_resources': 1, + }, + ], + }, + # So should an ordinary rule acting on mac_bundle_resources. + { + 'target_name': 'resource_rule', + 'type': 'executable', + 'mac_bundle': 1, + 'mac_bundle_resources': [ + 'secret.txt', + ], + 'rules': [ + { + 'rule_name': 'bundlerule', + 'extension': 'txt', + 'outputs': [ + '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).txt', + ], + 'action': ['./change.sh', '<(RULE_INPUT_PATH)', '<@(_outputs)'], + 'message': 'Running rule on <(RULE_INPUT_PATH)', + }, + ], + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/cflags/ccfile.cc b/third_party/python/gyp/test/mac/cflags/ccfile.cc new file mode 100644 index 0000000000..1a54d18eec --- /dev/null +++ b/third_party/python/gyp/test/mac/cflags/ccfile.cc @@ -0,0 +1,7 @@ +#ifdef CFLAG +#error CFLAG should not be set +#endif + +#ifndef CCFLAG +#error CCFLAG should be set +#endif diff --git a/third_party/python/gyp/test/mac/cflags/ccfile_withcflags.cc b/third_party/python/gyp/test/mac/cflags/ccfile_withcflags.cc new file mode 100644 index 0000000000..de078a0641 --- /dev/null +++ b/third_party/python/gyp/test/mac/cflags/ccfile_withcflags.cc @@ -0,0 +1,7 @@ +#ifndef CFLAG +#error CFLAG should be set +#endif + +#ifndef CCFLAG +#error CCFLAG should be set +#endif diff --git a/third_party/python/gyp/test/mac/cflags/cfile.c b/third_party/python/gyp/test/mac/cflags/cfile.c new file mode 100644 index 0000000000..0af9d0af5d --- /dev/null +++ b/third_party/python/gyp/test/mac/cflags/cfile.c @@ -0,0 +1,7 @@ +#ifndef CFLAG +#error CFLAG should be set +#endif + +#ifdef CCFLAG +#error CCFLAG should not be set +#endif diff --git a/third_party/python/gyp/test/mac/cflags/cppfile.cpp b/third_party/python/gyp/test/mac/cflags/cppfile.cpp new file mode 100644 index 0000000000..1a54d18eec --- /dev/null +++ b/third_party/python/gyp/test/mac/cflags/cppfile.cpp @@ -0,0 +1,7 @@ +#ifdef CFLAG +#error CFLAG should not be set +#endif + +#ifndef CCFLAG +#error CCFLAG should be set +#endif diff --git a/third_party/python/gyp/test/mac/cflags/cppfile_withcflags.cpp b/third_party/python/gyp/test/mac/cflags/cppfile_withcflags.cpp new file mode 100644 index 0000000000..de078a0641 --- /dev/null +++ b/third_party/python/gyp/test/mac/cflags/cppfile_withcflags.cpp @@ -0,0 +1,7 @@ +#ifndef CFLAG +#error CFLAG should be set +#endif + +#ifndef CCFLAG +#error CCFLAG should be set +#endif diff --git a/third_party/python/gyp/test/mac/cflags/cxxfile.cxx b/third_party/python/gyp/test/mac/cflags/cxxfile.cxx new file mode 100644 index 0000000000..1a54d18eec --- /dev/null +++ b/third_party/python/gyp/test/mac/cflags/cxxfile.cxx @@ -0,0 +1,7 @@ +#ifdef CFLAG +#error CFLAG should not be set +#endif + +#ifndef CCFLAG +#error CCFLAG should be set +#endif diff --git a/third_party/python/gyp/test/mac/cflags/cxxfile_withcflags.cxx b/third_party/python/gyp/test/mac/cflags/cxxfile_withcflags.cxx new file mode 100644 index 0000000000..de078a0641 --- /dev/null +++ b/third_party/python/gyp/test/mac/cflags/cxxfile_withcflags.cxx @@ -0,0 +1,7 @@ +#ifndef CFLAG +#error CFLAG should be set +#endif + +#ifndef CCFLAG +#error CCFLAG should be set +#endif diff --git a/third_party/python/gyp/test/mac/cflags/mfile.m b/third_party/python/gyp/test/mac/cflags/mfile.m new file mode 100644 index 0000000000..0af9d0af5d --- /dev/null +++ b/third_party/python/gyp/test/mac/cflags/mfile.m @@ -0,0 +1,7 @@ +#ifndef CFLAG +#error CFLAG should be set +#endif + +#ifdef CCFLAG +#error CCFLAG should not be set +#endif diff --git a/third_party/python/gyp/test/mac/cflags/mmfile.mm b/third_party/python/gyp/test/mac/cflags/mmfile.mm new file mode 100644 index 0000000000..1a54d18eec --- /dev/null +++ b/third_party/python/gyp/test/mac/cflags/mmfile.mm @@ -0,0 +1,7 @@ +#ifdef CFLAG +#error CFLAG should not be set +#endif + +#ifndef CCFLAG +#error CCFLAG should be set +#endif diff --git a/third_party/python/gyp/test/mac/cflags/mmfile_withcflags.mm b/third_party/python/gyp/test/mac/cflags/mmfile_withcflags.mm new file mode 100644 index 0000000000..de078a0641 --- /dev/null +++ b/third_party/python/gyp/test/mac/cflags/mmfile_withcflags.mm @@ -0,0 +1,7 @@ +#ifndef CFLAG +#error CFLAG should be set +#endif + +#ifndef CCFLAG +#error CCFLAG should be set +#endif diff --git a/third_party/python/gyp/test/mac/cflags/test.gyp b/third_party/python/gyp/test/mac/cflags/test.gyp new file mode 100644 index 0000000000..d330a548f6 --- /dev/null +++ b/third_party/python/gyp/test/mac/cflags/test.gyp @@ -0,0 +1,132 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'mytarget', + 'type': 'shared_library', + 'sources': [ + 'cfile.c', + 'mfile.m', + 'ccfile.cc', + 'cppfile.cpp', + 'cxxfile.cxx', + 'mmfile.mm', + ], + 'xcode_settings': { + # Normally, defines would go in 'defines' instead. This is just for + # testing. + 'OTHER_CFLAGS': [ + '-DCFLAG', + ], + 'OTHER_CPLUSPLUSFLAGS': [ + '-DCCFLAG', + ], + 'GCC_C_LANGUAGE_STANDARD': 'c99', + }, + }, + { + 'target_name': 'mytarget_reuse_cflags', + 'type': 'shared_library', + 'sources': [ + 'cfile.c', + 'mfile.m', + 'ccfile_withcflags.cc', + 'cppfile_withcflags.cpp', + 'cxxfile_withcflags.cxx', + 'mmfile_withcflags.mm', + ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-DCFLAG', + ], + 'OTHER_CPLUSPLUSFLAGS': [ + '$OTHER_CFLAGS', + '-DCCFLAG', + ], + # This is a C-only flag, to check these don't get added to C++ files. + 'GCC_C_LANGUAGE_STANDARD': 'c99', + }, + }, + { + 'target_name': 'mytarget_inherit_cflags', + 'type': 'shared_library', + 'sources': [ + 'cfile.c', + 'mfile.m', + 'ccfile_withcflags.cc', + 'cppfile_withcflags.cpp', + 'cxxfile_withcflags.cxx', + 'mmfile_withcflags.mm', + ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-DCFLAG', + ], + 'OTHER_CPLUSPLUSFLAGS': [ + '$inherited', + '-DCCFLAG', + ], + 'GCC_C_LANGUAGE_STANDARD': 'c99', + }, + }, + { + 'target_name': 'mytarget_inherit_cflags_parens', + 'type': 'shared_library', + 'sources': [ + 'cfile.c', + 'mfile.m', + 'ccfile_withcflags.cc', + 'cppfile_withcflags.cpp', + 'cxxfile_withcflags.cxx', + 'mmfile_withcflags.mm', + ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-DCFLAG', + ], + 'OTHER_CPLUSPLUSFLAGS': [ + '$(inherited)', + '-DCCFLAG', + ], + 'GCC_C_LANGUAGE_STANDARD': 'c99', + }, + }, + { + 'target_name': 'mytarget_inherit_cflags_braces', + 'type': 'shared_library', + 'sources': [ + 'cfile.c', + 'mfile.m', + 'ccfile_withcflags.cc', + 'cppfile_withcflags.cpp', + 'cxxfile_withcflags.cxx', + 'mmfile_withcflags.mm', + ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-DCFLAG', + ], + 'OTHER_CPLUSPLUSFLAGS': [ + '${inherited}', + '-DCCFLAG', + ], + 'GCC_C_LANGUAGE_STANDARD': 'c99', + }, + }, + { + 'target_name': 'ansi_standard', + 'type': 'shared_library', + 'sources': [ + 'cfile.c', + ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-DCFLAG', + ], + 'GCC_C_LANGUAGE_STANDARD': 'ansi', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/clang-cxx-language-standard/c++11.cc b/third_party/python/gyp/test/mac/clang-cxx-language-standard/c++11.cc new file mode 100644 index 0000000000..756dc1c7e6 --- /dev/null +++ b/third_party/python/gyp/test/mac/clang-cxx-language-standard/c++11.cc @@ -0,0 +1,8 @@ +// Copyright (c) 2013 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. + +static_assert(__cplusplus == 201103L, "wrong c++ standard version"); + +int main() { return 0; } + diff --git a/third_party/python/gyp/test/mac/clang-cxx-language-standard/c++98.cc b/third_party/python/gyp/test/mac/clang-cxx-language-standard/c++98.cc new file mode 100644 index 0000000000..a6a00c70f4 --- /dev/null +++ b/third_party/python/gyp/test/mac/clang-cxx-language-standard/c++98.cc @@ -0,0 +1,24 @@ +// Copyright (c) 2013 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. + +#if __cplusplus != 199711L +#error wrong c++ standard version +#endif + +enum cxx11_keywords { + alignas, + alignof, + char16_t, + char32_t, + constexpr, + decltype, + noexcept, + nullptr, + override, + static_assert, + thread_local, +}; + +int main() { return 0; } + diff --git a/third_party/python/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp b/third_party/python/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp new file mode 100644 index 0000000000..eb60bbd0e8 --- /dev/null +++ b/third_party/python/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp @@ -0,0 +1,30 @@ +# Copyright (c) 2013 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. +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + 'targets': [ + { + 'target_name': 'c++98', + 'type': 'executable', + 'sources': [ 'c++98.cc', ], + 'xcode_settings': { + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'CLANG_CXX_LANGUAGE_STANDARD': 'c++98', + }, + }, + { + 'target_name': 'c++11', + 'type': 'executable', + 'sources': [ 'c++11.cc', ], + 'xcode_settings': { + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'CLANG_CXX_LANGUAGE_STANDARD': 'c++0x', + }, + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/clang-cxx-library/clang-cxx-library.gyp b/third_party/python/gyp/test/mac/clang-cxx-library/clang-cxx-library.gyp new file mode 100644 index 0000000000..67006e50a0 --- /dev/null +++ b/third_party/python/gyp/test/mac/clang-cxx-library/clang-cxx-library.gyp @@ -0,0 +1,32 @@ +# Copyright (c) 2013 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. +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + 'targets': [ + { + 'target_name': 'libc++', + 'type': 'executable', + 'sources': [ 'libc++.cc', ], + 'xcode_settings': { + 'CC': 'clang', + # libc++ requires OS X 10.7+. + 'MACOSX_DEPLOYMENT_TARGET': '10.7', + 'CLANG_CXX_LIBRARY': 'libc++', + }, + }, + { + 'target_name': 'libstdc++', + 'type': 'executable', + 'sources': [ 'libstdc++.cc', ], + 'xcode_settings': { + 'CC': 'clang', + 'CLANG_CXX_LIBRARY': 'libstdc++', + }, + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/clang-cxx-library/libc++.cc b/third_party/python/gyp/test/mac/clang-cxx-library/libc++.cc new file mode 100644 index 0000000000..b8d6e6b3e2 --- /dev/null +++ b/third_party/python/gyp/test/mac/clang-cxx-library/libc++.cc @@ -0,0 +1,11 @@ +// Copyright (c) 2013 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. + +#include +#ifndef _LIBCPP_VERSION +#error expected std library: libc++ +#endif + +int main() { std::string x; return x.size(); } + diff --git a/third_party/python/gyp/test/mac/clang-cxx-library/libstdc++.cc b/third_party/python/gyp/test/mac/clang-cxx-library/libstdc++.cc new file mode 100644 index 0000000000..474dbf350d --- /dev/null +++ b/third_party/python/gyp/test/mac/clang-cxx-library/libstdc++.cc @@ -0,0 +1,11 @@ +// Copyright (c) 2013 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. + +#include +#ifndef __GLIBCXX__ +#error expected std library: libstdc++ +#endif + +int main() { std::string x; return x.size(); } + diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp new file mode 100644 index 0000000000..c1b1241fb7 --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp @@ -0,0 +1,87 @@ +# Copyright (c) 2016 Mark Callow. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# +# For testing use of the UI settings & environment variables +# available in Xcode's PBXCopyFilesBuildPhase. +{ +'targets': [ + { + 'target_name': 'copies-with-xcode-envvars', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'empty.c' ], + 'conditions': [ + ['OS == "ios" or OS == "mac"', { + 'copies': [{ + 'destination': '$(BUILT_PRODUCTS_DIR)', + 'files': [ + 'file0', + ], + }, { + 'destination': '$(BUILT_PRODUCTS_DIR)/$(WRAPPER_NAME)', + 'files': [ + 'file1', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(EXECUTABLE_FOLDER_PATH)', + 'files': [ + 'file2', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)', + 'files': [ + 'file3', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/testimages', + 'files': [ + 'file4', + ], + }, { + 'destination': '$(BUILT_PRODUCTS_DIR)/$(JAVA_FOLDER_PATH)', + 'files': [ + 'file5', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(FRAMEWORKS_FOLDER_PATH)', + 'files': [ + 'file6', + ], + }, { + # NOTE: This is not an Xcode macro name but + # xcodeproj_file.py recognizes it and sends + # the output to the same place as + # $(FRAMEWORKS_FOLDER_PATH). xcode_emulation.py + # sets its value to an absolute path. + 'destination': '$(BUILT_FRAMEWORKS_DIR)', + 'files': [ + 'file7', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(SHARED_FRAMEWORKS_FOLDER_PATH)', + 'files': [ + 'file8', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(SHARED_SUPPORT_FOLDER_PATH)', + 'files': [ + 'file9', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(PLUGINS_FOLDER_PATH)', + 'files': [ + 'file10', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(XPCSERVICES_FOLDER_PATH)', + 'files': [ + 'file11', + ], + }], # copies + }], # OS == "ios" or OS == "mac" + ], # conditions + }], # targets +} + +# vim:ai:ts=4:sts=4:sw=2:expandtab:textwidth=70 diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/empty.c b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/empty.c new file mode 100644 index 0000000000..237c8ce181 --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/empty.c @@ -0,0 +1 @@ +int main() {} diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file0 b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file0 new file mode 100644 index 0000000000..117889361f --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file0 @@ -0,0 +1 @@ +file0 contents diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file1 b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file1 new file mode 100644 index 0000000000..84d55c5759 --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file1 @@ -0,0 +1 @@ +file1 contents diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file10 b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file10 new file mode 100644 index 0000000000..372e992ef9 --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file10 @@ -0,0 +1 @@ +file10 contents diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file11 b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file11 new file mode 100644 index 0000000000..923e760e1f --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file11 @@ -0,0 +1 @@ +file11 contents diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file2 b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file2 new file mode 100644 index 0000000000..af1b8ae35d --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file2 @@ -0,0 +1 @@ +file2 contents diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file3 b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file3 new file mode 100644 index 0000000000..43f16f3522 --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file3 @@ -0,0 +1 @@ +file3 contents diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file4 b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file4 new file mode 100644 index 0000000000..5f7270a084 --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file4 @@ -0,0 +1 @@ +file4 contents diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file5 b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file5 new file mode 100644 index 0000000000..41f47186bd --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file5 @@ -0,0 +1 @@ +file5 contents diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file6 b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file6 new file mode 100644 index 0000000000..f5d5757348 --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file6 @@ -0,0 +1 @@ +file6 contents diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file7 b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file7 new file mode 100644 index 0000000000..90dbe6e9e1 --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file7 @@ -0,0 +1 @@ +file7 contents diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file8 b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file8 new file mode 100644 index 0000000000..9eb613fabb --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file8 @@ -0,0 +1 @@ +file8 contents diff --git a/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file9 b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file9 new file mode 100644 index 0000000000..e37ac72ada --- /dev/null +++ b/third_party/python/gyp/test/mac/copies-with-xcode-envvars/file9 @@ -0,0 +1 @@ +file9 contents diff --git a/third_party/python/gyp/test/mac/copy-dylib/empty.c b/third_party/python/gyp/test/mac/copy-dylib/empty.c new file mode 100644 index 0000000000..237c8ce181 --- /dev/null +++ b/third_party/python/gyp/test/mac/copy-dylib/empty.c @@ -0,0 +1 @@ +int main() {} diff --git a/third_party/python/gyp/test/mac/copy-dylib/test.gyp b/third_party/python/gyp/test/mac/copy-dylib/test.gyp new file mode 100644 index 0000000000..4210c51463 --- /dev/null +++ b/third_party/python/gyp/test/mac/copy-dylib/test.gyp @@ -0,0 +1,31 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'my_dylib', + 'type': 'shared_library', + 'sources': [ 'empty.c', ], + }, + { + 'target_name': 'test_app', + 'product_name': 'Test App', + 'type': 'executable', + 'mac_bundle': 1, + 'dependencies': [ 'my_dylib', ], + 'sources': [ + 'empty.c', + ], + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/Test App.app/Contents/Resources', + 'files': [ + '<(PRODUCT_DIR)/libmy_dylib.dylib', + ], + }, + ], + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/debuginfo/file.c b/third_party/python/gyp/test/mac/debuginfo/file.c new file mode 100644 index 0000000000..9cddaf1b0b --- /dev/null +++ b/third_party/python/gyp/test/mac/debuginfo/file.c @@ -0,0 +1,6 @@ +// Copyright (c) 2011 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. + +void f() {} +int main() {} diff --git a/third_party/python/gyp/test/mac/debuginfo/test.gyp b/third_party/python/gyp/test/mac/debuginfo/test.gyp new file mode 100644 index 0000000000..3faf6b5c76 --- /dev/null +++ b/third_party/python/gyp/test/mac/debuginfo/test.gyp @@ -0,0 +1,82 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'nonbundle_static_library', + 'type': 'static_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + }, + }, + { + 'target_name': 'nonbundle_shared_library', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + }, + }, + { + 'target_name': 'nonbundle_loadable_module', + 'type': 'loadable_module', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + }, + }, + { + 'target_name': 'nonbundle_executable', + 'type': 'executable', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + }, + }, + + { + 'target_name': 'bundle_shared_library', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + }, + }, + { + 'target_name': 'bundle_loadable_module', + 'type': 'loadable_module', + 'mac_bundle': 1, + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + }, + }, + { + 'target_name': 'my_app', + 'product_name': 'My App', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/depend-on-bundle/English.lproj/InfoPlist.strings b/third_party/python/gyp/test/mac/depend-on-bundle/English.lproj/InfoPlist.strings new file mode 100644 index 0000000000..b92732c79e --- /dev/null +++ b/third_party/python/gyp/test/mac/depend-on-bundle/English.lproj/InfoPlist.strings @@ -0,0 +1 @@ +/* Localized versions of Info.plist keys */ diff --git a/third_party/python/gyp/test/mac/depend-on-bundle/Info.plist b/third_party/python/gyp/test/mac/depend-on-bundle/Info.plist new file mode 100644 index 0000000000..5e05a5190c --- /dev/null +++ b/third_party/python/gyp/test/mac/depend-on-bundle/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/third_party/python/gyp/test/mac/depend-on-bundle/bundle.c b/third_party/python/gyp/test/mac/depend-on-bundle/bundle.c new file mode 100644 index 0000000000..d64ff8ca23 --- /dev/null +++ b/third_party/python/gyp/test/mac/depend-on-bundle/bundle.c @@ -0,0 +1 @@ +int f() { return 42; } diff --git a/third_party/python/gyp/test/mac/depend-on-bundle/executable.c b/third_party/python/gyp/test/mac/depend-on-bundle/executable.c new file mode 100644 index 0000000000..931bce637e --- /dev/null +++ b/third_party/python/gyp/test/mac/depend-on-bundle/executable.c @@ -0,0 +1,4 @@ +int f(); +int main() { + return f(); +} diff --git a/third_party/python/gyp/test/mac/depend-on-bundle/test.gyp b/third_party/python/gyp/test/mac/depend-on-bundle/test.gyp new file mode 100644 index 0000000000..e00b105415 --- /dev/null +++ b/third_party/python/gyp/test/mac/depend-on-bundle/test.gyp @@ -0,0 +1,28 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'my_bundle', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'bundle.c' ], + 'mac_bundle_resources': [ + 'English.lproj/InfoPlist.strings', + ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'Info.plist', + } + }, + { + 'target_name': 'dependent_on_bundle', + 'type': 'executable', + 'sources': [ 'executable.c' ], + 'dependencies': [ + 'my_bundle', + ], + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/deployment-target/check-version-min.c b/third_party/python/gyp/test/mac/deployment-target/check-version-min.c new file mode 100644 index 0000000000..761c529085 --- /dev/null +++ b/third_party/python/gyp/test/mac/deployment-target/check-version-min.c @@ -0,0 +1,33 @@ +/* Copyright (c) 2013 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. */ + +#include + +/* GYPTEST_MAC_VERSION_MIN: should be set to the corresponding value of + * xcode setting 'MACOSX_DEPLOYMENT_TARGET', otherwise both should be + * left undefined. + * + * GYPTEST_IOS_VERSION_MIN: should be set to the corresponding value of + * xcode setting 'IPHONEOS_DEPLOYMENT_TARGET', otherwise both should be + * left undefined. + */ + +#if defined(GYPTEST_MAC_VERSION_MIN) +# if GYPTEST_MAC_VERSION_MIN != __MAC_OS_X_VERSION_MIN_REQUIRED +# error __MAC_OS_X_VERSION_MIN_REQUIRED has wrong value +# endif +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) +# error __MAC_OS_X_VERSION_MIN_REQUIRED should be undefined +#endif + +#if defined(GYPTEST_IOS_VERSION_MIN) +# if GYPTEST_IOS_VERSION_MIN != __IPHONE_OS_VERSION_MIN_REQUIRED +# error __IPHONE_OS_VERSION_MIN_REQUIRED has wrong value +# endif +#elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +# error __IPHONE_OS_VERSION_MIN_REQUIRED should be undefined +#endif + +int main() { return 0; } + diff --git a/third_party/python/gyp/test/mac/deployment-target/deployment-target.gyp b/third_party/python/gyp/test/mac/deployment-target/deployment-target.gyp new file mode 100644 index 0000000000..47e0565c0c --- /dev/null +++ b/third_party/python/gyp/test/mac/deployment-target/deployment-target.gyp @@ -0,0 +1,28 @@ +# Copyright (c) 2013 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. +{ + 'targets': [ + { + 'target_name': 'macosx-version-min-10.5', + 'type': 'executable', + 'sources': [ 'check-version-min.c', ], + 'defines': [ 'GYPTEST_MAC_VERSION_MIN=1050', ], + 'xcode_settings': { + 'SDKROOT': 'macosx', + 'MACOSX_DEPLOYMENT_TARGET': '10.5', + }, + }, + { + 'target_name': 'macosx-version-min-10.6', + 'type': 'executable', + 'sources': [ 'check-version-min.c', ], + 'defines': [ 'GYPTEST_MAC_VERSION_MIN=1060', ], + 'xcode_settings': { + 'SDKROOT': 'macosx', + 'MACOSX_DEPLOYMENT_TARGET': '10.6', + }, + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/framework-dirs/calculate.c b/third_party/python/gyp/test/mac/framework-dirs/calculate.c new file mode 100644 index 0000000000..7dc9d2d8b4 --- /dev/null +++ b/third_party/python/gyp/test/mac/framework-dirs/calculate.c @@ -0,0 +1,15 @@ +/* Copyright (c) 2012 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. + */ + +int CalculatePerformExpression(char* expr, + int significantDigits, + int flags, + char* answer); + +int main() { + char buffer[1024]; + return CalculatePerformExpression("42", 1, 0, buffer); +} + diff --git a/third_party/python/gyp/test/mac/framework-dirs/framework-dirs.gyp b/third_party/python/gyp/test/mac/framework-dirs/framework-dirs.gyp new file mode 100644 index 0000000000..bf1cbde4de --- /dev/null +++ b/third_party/python/gyp/test/mac/framework-dirs/framework-dirs.gyp @@ -0,0 +1,21 @@ +# Copyright (c) 2012 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. + +{ + 'targets': [ + { + 'target_name': 'calculate', + 'type': 'executable', + 'sources': [ + 'calculate.c', + ], + 'libraries': [ + '/System/Library/PrivateFrameworks/Calculate.framework', + ], + 'mac_framework_dirs': [ + '/System/Library/PrivateFrameworks', + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/framework-headers/myframework.h b/third_party/python/gyp/test/mac/framework-headers/myframework.h new file mode 100644 index 0000000000..961fc701bc --- /dev/null +++ b/third_party/python/gyp/test/mac/framework-headers/myframework.h @@ -0,0 +1,8 @@ +// Copyright (c) 2012 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. + +#import + +@interface TestObject : NSObject +@end diff --git a/third_party/python/gyp/test/mac/framework-headers/myframework.m b/third_party/python/gyp/test/mac/framework-headers/myframework.m new file mode 100644 index 0000000000..13d53a37ab --- /dev/null +++ b/third_party/python/gyp/test/mac/framework-headers/myframework.m @@ -0,0 +1,8 @@ +// Copyright (c) 2012 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. + +#import "myframework.h" + +@implementation TestObject +@end diff --git a/third_party/python/gyp/test/mac/framework-headers/test.gyp b/third_party/python/gyp/test/mac/framework-headers/test.gyp new file mode 100644 index 0000000000..70ed00715c --- /dev/null +++ b/third_party/python/gyp/test/mac/framework-headers/test.gyp @@ -0,0 +1,44 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'test_framework_headers_framework', + 'product_name': 'TestFramework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ + 'myframework.h', + 'myframework.m', + ], + 'mac_framework_headers': [ + 'myframework.h', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + ], + }, + },{ + 'target_name': 'test_framework_headers_static', + 'product_name': 'TestLibrary', + 'type': 'static_library', + 'xcode_settings': { + 'PUBLIC_HEADERS_FOLDER_PATH': 'include', + }, + 'sources': [ + 'myframework.h', + 'myframework.m', + ], + 'mac_framework_headers': [ + 'myframework.h', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + ], + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings b/third_party/python/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings new file mode 100644 index 0000000000..88f65cf6ea --- /dev/null +++ b/third_party/python/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/third_party/python/gyp/test/mac/framework/TestFramework/Info.plist b/third_party/python/gyp/test/mac/framework/TestFramework/Info.plist new file mode 100644 index 0000000000..a791b3ee48 --- /dev/null +++ b/third_party/python/gyp/test/mac/framework/TestFramework/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.h b/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.h new file mode 100644 index 0000000000..c2450960cd --- /dev/null +++ b/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.h @@ -0,0 +1,28 @@ +// Copyright (c) 2011 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. + +#import + +#ifdef __cplusplus +struct ObjCVectorImp; +#else +typedef struct _ObjCVectorImpT ObjCVectorImp; +#endif + +@interface ObjCVector : NSObject { + @private + ObjCVectorImp* imp_; +} + +- (id)init; + +- (void)addObject:(id)obj; +- (void)addObject:(id)obj atIndex:(NSUInteger)index; + +- (void)removeObject:(id)obj; +- (void)removeObjectAtIndex:(NSUInteger)index; + +- (id)objectAtIndex:(NSUInteger)index; + +@end diff --git a/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.mm b/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.mm new file mode 100644 index 0000000000..cbf431f28d --- /dev/null +++ b/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.mm @@ -0,0 +1,63 @@ +// Copyright (c) 2011 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. + +#import "ObjCVectorInternal.h" +#import "ObjCVector.h" + +#include + +@interface ObjCVector (Private) +- (std::vector::iterator)makeIterator:(NSUInteger)index; +@end + +@implementation ObjCVector + +- (id)init { + if ((self = [super init])) { + imp_ = new ObjCVectorImp(); + } + return self; +} + +- (void)dealloc { + delete imp_; + [super dealloc]; +} + +- (void)addObject:(id)obj { + imp_->v.push_back([obj retain]); +} + +- (void)addObject:(id)obj atIndex:(NSUInteger)index { + imp_->v.insert([self makeIterator:index], [obj retain]); +} + +- (void)removeObject:(id)obj { + for (std::vector::iterator it = imp_->v.begin(); + it != imp_->v.end(); + ++it) { + if ([*it isEqual:obj]) { + [*it autorelease]; + imp_->v.erase(it); + return; + } + } +} + +- (void)removeObjectAtIndex:(NSUInteger)index { + [imp_->v[index] autorelease]; + imp_->v.erase([self makeIterator:index]); +} + +- (id)objectAtIndex:(NSUInteger)index { + return imp_->v[index]; +} + +- (std::vector::iterator)makeIterator:(NSUInteger)index { + std::vector::iterator it = imp_->v.begin(); + it += index; + return it; +} + +@end diff --git a/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h b/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h new file mode 100644 index 0000000000..fb6c98258b --- /dev/null +++ b/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h @@ -0,0 +1,9 @@ +// Copyright (c) 2011 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. + +#include + +struct ObjCVectorImp { + std::vector v; +}; diff --git a/third_party/python/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch b/third_party/python/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch new file mode 100644 index 0000000000..394f41d957 --- /dev/null +++ b/third_party/python/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'TestFramework' target in the 'TestFramework' project. +// + +#ifdef __OBJC__ + #import +#endif diff --git a/third_party/python/gyp/test/mac/framework/empty.c b/third_party/python/gyp/test/mac/framework/empty.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/third_party/python/gyp/test/mac/framework/framework.gyp b/third_party/python/gyp/test/mac/framework/framework.gyp new file mode 100644 index 0000000000..52b4f37be9 --- /dev/null +++ b/third_party/python/gyp/test/mac/framework/framework.gyp @@ -0,0 +1,108 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'dep_framework', + 'product_name': 'Dependency Bundle', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'empty.c', ], + }, + { + 'target_name': 'test_framework', + 'product_name': 'Test Framework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'dependencies': [ 'dep_framework', ], + 'sources': [ + 'TestFramework/ObjCVector.h', + 'TestFramework/ObjCVectorInternal.h', + 'TestFramework/ObjCVector.mm', + ], + 'mac_bundle_resources': [ + 'TestFramework/English.lproj/InfoPlist.strings', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework', + ], + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'TestFramework/Info.plist', + 'GCC_DYNAMIC_NO_PIC': 'NO', + }, + 'copies': [ + # Test copying to a file that has envvars in its dest path. + # Needs to be in a mac_bundle target, else CONTENTS_FOLDER_PATH isn't + # set. + { + 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries', + 'files': [ + 'empty.c', + ], + }, + ], + }, + { + 'target_name': 'copy_target', + 'type': 'none', + 'dependencies': [ 'test_framework', 'dep_framework', ], + 'copies': [ + # Test copying directories with spaces in src and dest paths. + { + 'destination': '<(PRODUCT_DIR)/Test Framework.framework/foo', + 'files': [ + '<(PRODUCT_DIR)/Dependency Bundle.framework', + ], + }, + ], + 'actions': [ + { + 'action_name': 'aektschn', + 'inputs': [], + 'outputs': ['<(PRODUCT_DIR)/touched_file'], + 'action': ['touch', '${BUILT_PRODUCTS_DIR}/action_file'], + }, + ], + }, + { + 'target_name': 'copy_embedded', + 'type': 'none', + 'dependencies': [ 'test_framework' ], + 'copies': [ + # Test copying framework to FRAMEWORK directory. + { + 'destination': '$(BUILT_FRAMEWORKS_DIR)/Embedded', + 'files': [ + '<(PRODUCT_DIR)/Test Framework.framework', + ], + }, + ], + }, + { + 'target_name': 'copy_target_code_sign', + 'type': 'none', + 'dependencies': [ 'test_framework', 'dep_framework', ], + 'copies': [ + # Test copying directories with spaces in src and dest paths. + { + 'destination': '<(PRODUCT_DIR)/Test Framework.framework/foo', + 'files': [ + '<(PRODUCT_DIR)/Dependency Bundle.framework', + ], + 'xcode_code_sign': 1, + }, + ], + 'actions': [ + { + 'action_name': 'aektschn', + 'inputs': [], + 'outputs': ['<(PRODUCT_DIR)/touched_file'], + 'action': ['touch', '${BUILT_PRODUCTS_DIR}/action_file'], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/global-settings/src/dir1/dir1.gyp b/third_party/python/gyp/test/mac/global-settings/src/dir1/dir1.gyp new file mode 100644 index 0000000000..153e34ddd6 --- /dev/null +++ b/third_party/python/gyp/test/mac/global-settings/src/dir1/dir1.gyp @@ -0,0 +1,11 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'dir1_target', + 'type': 'none', + }, + ], +} diff --git a/third_party/python/gyp/test/mac/global-settings/src/dir2/dir2.gyp b/third_party/python/gyp/test/mac/global-settings/src/dir2/dir2.gyp new file mode 100644 index 0000000000..cda46c839b --- /dev/null +++ b/third_party/python/gyp/test/mac/global-settings/src/dir2/dir2.gyp @@ -0,0 +1,22 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'dir2_target', + 'type': 'none', + 'dependencies': [ + '../dir1/dir1.gyp:dir1_target', + ], + 'actions': [ + { + 'inputs': [ ], + 'outputs': [ '<(PRODUCT_DIR)/file.txt' ], + 'action_name': 'Test action', + 'action': ['cp', 'file.txt', '${BUILT_PRODUCTS_DIR}/file.txt' ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/global-settings/src/dir2/file.txt b/third_party/python/gyp/test/mac/global-settings/src/dir2/file.txt new file mode 100644 index 0000000000..58da2d8e9a --- /dev/null +++ b/third_party/python/gyp/test/mac/global-settings/src/dir2/file.txt @@ -0,0 +1 @@ +File. diff --git a/third_party/python/gyp/test/mac/gyptest-action-envvars.py b/third_party/python/gyp/test/mac/gyptest-action-envvars.py new file mode 100644 index 0000000000..c84eeaa465 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-action-envvars.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that env vars work with actions, with relative directory paths. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + # The xcode-ninja generator handles gypfiles which are not at the + # project root incorrectly. + # cf. https://code.google.com/p/gyp/issues/detail?id=460 + if test.format == 'xcode-ninja': + test.skip_test() + + CHDIR = 'action-envvars' + test.run_gyp('action/action.gyp', chdir=CHDIR) + test.build('action/action.gyp', 'action', chdir=CHDIR, SYMROOT='../build') + + result_file = test.built_file_path('result', chdir=CHDIR) + test.must_exist(result_file) + test.must_contain(result_file, 'Test output') + + other_result_file = test.built_file_path('other_result', chdir=CHDIR) + test.must_exist(other_result_file) + test.must_contain(other_result_file, 'Other output') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-app-assets-catalog.py b/third_party/python/gyp/test/mac/gyptest-app-assets-catalog.py new file mode 100755 index 0000000000..7b1c0f67de --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-app-assets-catalog.py @@ -0,0 +1,125 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that app bundles are built correctly. +""" + +from __future__ import print_function + +import TestGyp +import TestMac + +import os +import plistlib +import subprocess +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + +def ExpectEq(expected, actual): + if expected != actual: + print('Expected "%s", got "%s"' % (expected, actual), file=sys.stderr) + test.fail_test() + +def ls(path): + '''Returns a list of all files in a directory, relative to the directory.''' + result = [] + for dirpath, _, files in os.walk(path): + for f in files: + result.append(os.path.join(dirpath, f)[len(path) + 1:]) + return result + +# Xcode supports for assets catalog was introduced in Xcode 6.0 +if sys.platform == 'darwin' and TestMac.Xcode.Version() >= '0600': + test_gyp_path = 'test-assets-catalog.gyp' + test_app_path = 'Test App Assets Catalog Gyp.app' + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + test.run_gyp(test_gyp_path, chdir='app-bundle') + test.build(test_gyp_path, test.ALL, chdir='app-bundle') + + # Binary + test.built_file_must_exist( + os.path.join(test_app_path, 'Contents/MacOS/Test App Assets Catalog Gyp'), + chdir='app-bundle') + + # Info.plist + info_plist = test.built_file_path( + os.path.join(test_app_path, 'Contents/Info.plist'), + chdir='app-bundle') + test.must_exist(info_plist) + test.must_contain( + info_plist, + 'com.google.Test-App-Assets-Catalog-Gyp') # Variable expansion + test.must_not_contain(info_plist, '${MACOSX_DEPLOYMENT_TARGET}'); + + if test.format != 'make': + # TODO: Synthesized plist entries aren't hooked up in the make generator. + machine = subprocess.check_output(['sw_vers', '-buildVersion']).rstrip('\n') + plist = plistlib.readPlist(info_plist) + ExpectEq(machine, plist['BuildMachineOSBuild']) + + expected = '' + version = TestMac.Xcode.SDKVersion() + expected = 'macosx' + version + ExpectEq(expected, plist['DTSDKName']) + sdkbuild = TestMac.Xcode.SDKBuild() + if not sdkbuild: + # Above command doesn't work in Xcode 4.2. + sdkbuild = plist['BuildMachineOSBuild'] + ExpectEq(sdkbuild, plist['DTSDKBuild']) + ExpectEq(TestMac.Xcode.Version(), plist['DTXcode']) + ExpectEq(TestMac.Xcode.Build(), plist['DTXcodeBuild']) + + # Resources + strings_files = ['InfoPlist.strings', 'utf-16be.strings', 'utf-16le.strings'] + for f in strings_files: + strings = test.built_file_path( + os.path.join(test_app_path, 'Contents/Resources/English.lproj', f), + chdir='app-bundle') + test.must_exist(strings) + # Xcodes writes UTF-16LE with BOM. + contents = open(strings, 'rb').read() + if not contents.startswith('\xff\xfe' + '/* Localized'.encode('utf-16le')): + test.fail_test() + + test.built_file_must_exist( + os.path.join( + test_app_path, 'Contents/Resources/English.lproj/MainMenu.nib'), + chdir='app-bundle') + + # make does not supports .xcassets files + extra_content_files = [] + if test.format != 'make': + extra_content_files = ['Contents/Resources/Assets.car'] + for f in extra_content_files: + test.built_file_must_exist( + os.path.join(test_app_path, f), + chdir='app-bundle') + + # Packaging + test.built_file_must_exist( + os.path.join(test_app_path, 'Contents/PkgInfo'), + chdir='app-bundle') + test.built_file_must_match( + os.path.join(test_app_path, 'Contents/PkgInfo'), 'APPLause', + chdir='app-bundle') + + # Check that no other files get added to the bundle. + if set(ls(test.built_file_path(test_app_path, chdir='app-bundle'))) != \ + set(['Contents/MacOS/Test App Assets Catalog Gyp', + 'Contents/Info.plist', + 'Contents/Resources/English.lproj/MainMenu.nib', + 'Contents/PkgInfo', + ] + extra_content_files + + [os.path.join('Contents/Resources/English.lproj', f) + for f in strings_files]): + test.fail_test() + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-app-error.py b/third_party/python/gyp/test/mac/gyptest-app-error.py new file mode 100755 index 0000000000..df0781d455 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-app-error.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that invalid strings files cause the build to fail. +""" + +from __future__ import print_function + +import TestCmd +import TestGyp + +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + expected_error = 'Old-style plist parser: missing semicolon in dictionary' + saw_expected_error = [False] # Python2 has no "nonlocal" keyword. + def match(a, b): + if a == b: + return True + if not TestCmd.is_List(a): + a = a.split('\n') + if not TestCmd.is_List(b): + b = b.split('\n') + if expected_error in '\n'.join(a) + '\n'.join(b): + saw_expected_error[0] = True + return True + return False + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'], match=match) + + test.run_gyp('test-error.gyp', chdir='app-bundle') + + test.build('test-error.gyp', test.ALL, chdir='app-bundle') + + # Ninja pipes stderr of subprocesses to stdout. + if test.format in ['ninja', 'xcode-ninja'] \ + and expected_error in test.stdout(): + saw_expected_error[0] = True + + if saw_expected_error[0]: + test.pass_test() + else: + test.fail_test() diff --git a/third_party/python/gyp/test/mac/gyptest-app.py b/third_party/python/gyp/test/mac/gyptest-app.py new file mode 100755 index 0000000000..16c9640373 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-app.py @@ -0,0 +1,122 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that app bundles are built correctly. +""" + +from __future__ import print_function + +import TestGyp +import TestMac + +import os +import plistlib +import subprocess +import sys + + +if sys.platform in ('darwin', 'win32'): + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + +def CheckFileXMLPropertyList(file): + output = subprocess.check_output(['file', file]) + # The double space after XML is intentional. + if not 'XML document text' in output: + print('File: Expected XML document text, got %s' % output) + test.fail_test() + +def ExpectEq(expected, actual): + if expected != actual: + print('Expected "%s", got "%s"' % (expected, actual), file=sys.stderr) + test.fail_test() + +def ls(path): + '''Returns a list of all files in a directory, relative to the directory.''' + result = [] + for dirpath, _, files in os.walk(path): + for f in files: + result.append(os.path.join(dirpath, f)[len(path) + 1:]) + return result + + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + test.run_gyp('test.gyp', chdir='app-bundle') + + test.build('test.gyp', test.ALL, chdir='app-bundle') + + # Binary + test.built_file_must_exist('Test App Gyp.app/Contents/MacOS/Test App Gyp', + chdir='app-bundle') + + # Info.plist + info_plist = test.built_file_path('Test App Gyp.app/Contents/Info.plist', + chdir='app-bundle') + test.must_exist(info_plist) + test.must_contain(info_plist, 'com.google.Test-App-Gyp') # Variable expansion + test.must_not_contain(info_plist, '${MACOSX_DEPLOYMENT_TARGET}'); + CheckFileXMLPropertyList(info_plist) + + if test.format != 'make': + # TODO: Synthesized plist entries aren't hooked up in the make generator. + machine = subprocess.check_output(['sw_vers', '-buildVersion']).rstrip('\n') + plist = plistlib.readPlist(info_plist) + ExpectEq(machine, plist['BuildMachineOSBuild']) + + # Prior to Xcode 5.0.0, SDKROOT (and thus DTSDKName) was only defined if + # set in the Xcode project file. Starting with that version, it is always + # defined. + expected = '' + if TestMac.Xcode.Version() >= '0500': + version = TestMac.Xcode.SDKVersion() + expected = 'macosx' + version + ExpectEq(expected, plist['DTSDKName']) + sdkbuild = TestMac.Xcode.SDKBuild() + if not sdkbuild: + # Above command doesn't work in Xcode 4.2. + sdkbuild = plist['BuildMachineOSBuild'] + ExpectEq(sdkbuild, plist['DTSDKBuild']) + ExpectEq(TestMac.Xcode.Version(), plist['DTXcode']) + ExpectEq(TestMac.Xcode.Build(), plist['DTXcodeBuild']) + + # Resources + strings_files = ['InfoPlist.strings', 'utf-16be.strings', 'utf-16le.strings'] + for f in strings_files: + strings = test.built_file_path( + os.path.join('Test App Gyp.app/Contents/Resources/English.lproj', f), + chdir='app-bundle') + test.must_exist(strings) + # Xcodes writes UTF-16LE with BOM. + contents = open(strings, 'rb').read() + if not contents.startswith('\xff\xfe' + '/* Localized'.encode('utf-16le')): + test.fail_test() + + test.built_file_must_exist( + 'Test App Gyp.app/Contents/Resources/English.lproj/MainMenu.nib', + chdir='app-bundle') + + # Packaging + test.built_file_must_exist('Test App Gyp.app/Contents/PkgInfo', + chdir='app-bundle') + test.built_file_must_match('Test App Gyp.app/Contents/PkgInfo', 'APPLause', + chdir='app-bundle') + + # Check that no other files get added to the bundle. + if set(ls(test.built_file_path('Test App Gyp.app', chdir='app-bundle'))) != \ + set(['Contents/MacOS/Test App Gyp', + 'Contents/Info.plist', + 'Contents/Resources/English.lproj/MainMenu.nib', + 'Contents/PkgInfo', + ] + + [os.path.join('Contents/Resources/English.lproj', f) + for f in strings_files]): + test.fail_test() + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-archs.py b/third_party/python/gyp/test/mac/gyptest-archs.py new file mode 100644 index 0000000000..c56f20c4d6 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-archs.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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. + +""" +Tests things related to ARCHS. +""" + +import TestGyp +import TestMac + +import re +import subprocess +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + test.run_gyp('test-no-archs.gyp', chdir='archs') + test.build('test-no-archs.gyp', test.ALL, chdir='archs') + result_file = test.built_file_path('Test', chdir='archs') + test.must_exist(result_file) + + if TestMac.Xcode.Version() >= '0500': + expected_type = ['x86_64'] + else: + expected_type = ['i386'] + TestMac.CheckFileType(test, result_file, expected_type) + + test.run_gyp('test-valid-archs.gyp', chdir='archs') + test.build('test-valid-archs.gyp', test.ALL, chdir='archs') + result_file = test.built_file_path('Test', chdir='archs') + test.must_exist(result_file) + TestMac.CheckFileType(test, result_file, ['x86_64']) + + test.run_gyp('test-archs-x86_64.gyp', chdir='archs') + test.build('test-archs-x86_64.gyp', test.ALL, chdir='archs') + result_file = test.built_file_path('Test64', chdir='archs') + test.must_exist(result_file) + TestMac.CheckFileType(test, result_file, ['x86_64']) + + test.run_gyp('test-dependencies.gyp', chdir='archs') + test.build('test-dependencies.gyp', target=test.ALL, chdir='archs') + products = ['c_standalone', 'd_standalone'] + for product in products: + result_file = test.built_file_path( + product, chdir='archs', type=test.STATIC_LIB) + test.must_exist(result_file) + + if test.format != 'make': + # Build all targets except 'exe_32_64_no_sources' that does build + # but should not cause error when generating ninja files + targets = [ + 'static_32_64', 'shared_32_64', 'shared_32_64_bundle', + 'module_32_64', 'module_32_64_bundle', + 'exe_32_64', 'exe_32_64_bundle', 'precompiled_prefix_header_mm_32_64', + ] + + test.run_gyp('test-archs-multiarch.gyp', chdir='archs') + + for target in targets: + test.build('test-archs-multiarch.gyp', target=target, chdir='archs') + + result_file = test.built_file_path( + 'static_32_64', chdir='archs', type=test.STATIC_LIB) + test.must_exist(result_file) + TestMac.CheckFileType(test, result_file, ['i386', 'x86_64']) + + result_file = test.built_file_path( + 'shared_32_64', chdir='archs', type=test.SHARED_LIB) + test.must_exist(result_file) + TestMac.CheckFileType(test, result_file, ['i386', 'x86_64']) + + result_file = test.built_file_path('My Framework.framework/My Framework', + chdir='archs') + test.must_exist(result_file) + TestMac.CheckFileType(test, result_file, ['i386', 'x86_64']) + # Check that symbol "_x" made it into both versions of the binary: + if not all(['D _x' in subprocess.check_output( + ['nm', '-arch', arch, result_file]).decode('utf-8') + for arch in ['i386', 'x86_64']]): + # This can only flakily fail, due to process ordering issues. If this + # does fail flakily, then something's broken, it's not the test at fault. + test.fail_test() + + result_file = test.built_file_path( + 'exe_32_64', chdir='archs', type=test.EXECUTABLE) + test.must_exist(result_file) + TestMac.CheckFileType(test, result_file, ['i386', 'x86_64']) + + result_file = test.built_file_path('Test App.app/Contents/MacOS/Test App', + chdir='archs') + test.must_exist(result_file) + TestMac.CheckFileType(test, result_file, ['i386', 'x86_64']) diff --git a/third_party/python/gyp/test/mac/gyptest-bundle-resources.py b/third_party/python/gyp/test/mac/gyptest-bundle-resources.py new file mode 100644 index 0000000000..275cdbaa54 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-bundle-resources.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 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 things related to bundle resources. +""" + +from __future__ import print_function + +import TestGyp + +import os +import stat +import sys + +if sys.platform in ('darwin'): + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + +def check_attribs(path, expected_exec_bit): + out_path = test.built_file_path( + os.path.join('resource.app/Contents/Resources', path), chdir=CHDIR) + + in_stat = os.stat(os.path.join(CHDIR, path)) + out_stat = os.stat(out_path) + if in_stat.st_mtime == out_stat.st_mtime: + test.fail_test() + if out_stat.st_mode & stat.S_IXUSR != expected_exec_bit: + test.fail_test() + + +if sys.platform == 'darwin': + # set |match| to ignore build stderr output. + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'bundle-resources' + test.run_gyp('test.gyp', chdir=CHDIR) + + test.build('test.gyp', test.ALL, chdir=CHDIR) + + test.built_file_must_match('resource.app/Contents/Resources/secret.txt', + 'abc\n', chdir=CHDIR) + test.built_file_must_match('source_rule.app/Contents/Resources/secret.txt', + 'ABC\n', chdir=CHDIR) + + test.built_file_must_match( + 'resource.app/Contents/Resources/executable-file.sh', + '#!/bin/bash\n' + '\n' + 'echo echo echo echo cho ho o o\n', chdir=CHDIR) + + check_attribs('executable-file.sh', expected_exec_bit=stat.S_IXUSR) + check_attribs('secret.txt', expected_exec_bit=0) + + # TODO(thakis): This currently fails with make. + if test.format != 'make': + test.built_file_must_match( + 'resource_rule.app/Contents/Resources/secret.txt', 'ABC\n', chdir=CHDIR) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-cflags.py b/third_party/python/gyp/test/mac/gyptest-cflags.py new file mode 100644 index 0000000000..17afd15665 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-cflags.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that compile-time flags work. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + CHDIR = 'cflags' + test.run_gyp('test.gyp', chdir=CHDIR) + + test.build('test.gyp', test.ALL, chdir=CHDIR) + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-clang-cxx-language-standard.py b/third_party/python/gyp/test/mac/gyptest-clang-cxx-language-standard.py new file mode 100644 index 0000000000..75c6c74c97 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-clang-cxx-language-standard.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 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 that CLANG_CXX_LANGUAGE_STANDARD works. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode']) + + test.run_gyp('clang-cxx-language-standard.gyp', + chdir='clang-cxx-language-standard') + + test.build('clang-cxx-language-standard.gyp', test.ALL, + chdir='clang-cxx-language-standard') + + test.pass_test() + diff --git a/third_party/python/gyp/test/mac/gyptest-clang-cxx-library.py b/third_party/python/gyp/test/mac/gyptest-clang-cxx-library.py new file mode 100644 index 0000000000..177d6376ff --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-clang-cxx-library.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 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 that CLANG_CXX_LIBRARY works. +""" + +import TestGyp +import TestMac + +import sys + +if sys.platform == 'darwin': + # Xcode 4.2 on OS X 10.6 doesn't install the libc++ headers, don't run this + # test there. + if TestMac.Xcode.Version() <= '0420': + sys.exit(0) + + test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode']) + + if test.format == 'make': + # This is failing because of a deprecation warning for libstdc++. + test.skip_test() # bug=533 + + test.run_gyp('clang-cxx-library.gyp', chdir='clang-cxx-library') + test.build('clang-cxx-library.gyp', test.ALL, chdir='clang-cxx-library') + + test.pass_test() + diff --git a/third_party/python/gyp/test/mac/gyptest-copies-with-xcode-envvars.py b/third_party/python/gyp/test/mac/gyptest-copies-with-xcode-envvars.py new file mode 100644 index 0000000000..80b0ecfa28 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-copies-with-xcode-envvars.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python + +# Copyright (c) 2016 Mark Callow. All rights reserved. +# 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() diff --git a/third_party/python/gyp/test/mac/gyptest-copies.py b/third_party/python/gyp/test/mac/gyptest-copies.py new file mode 100755 index 0000000000..838c62dc37 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-copies.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that 'copies' with app bundles are handled correctly. +""" + +from __future__ import print_function + +import TestGyp + +import os +import sys +import time + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + test.run_gyp('framework.gyp', chdir='framework') + + test.build('framework.gyp', 'copy_target', chdir='framework') + + # Check that the copy succeeded. + test.built_file_must_exist( + 'Test Framework.framework/foo/Dependency Bundle.framework', + chdir='framework') + test.built_file_must_exist( + 'Test Framework.framework/foo/Dependency Bundle.framework/Versions/A', + chdir='framework') + test.built_file_must_exist( + 'Test Framework.framework/Versions/A/Libraries/empty.c', + chdir='framework') + + # Verify BUILT_FRAMEWORKS_DIR is set and working. + test.build('framework.gyp', 'copy_embedded', chdir='framework') + + test.built_file_must_exist( + 'Embedded/Test Framework.framework', chdir='framework') + + # Check that rebuilding the target a few times works. + dep_bundle = test.built_file_path('Dependency Bundle.framework', + chdir='framework') + mtime = os.path.getmtime(dep_bundle) + atime = os.path.getatime(dep_bundle) + for i in range(3): + os.utime(dep_bundle, (atime + i * 1000, mtime + i * 1000)) + test.build('framework.gyp', 'copy_target', chdir='framework') + + + # Check that actions ran. + test.built_file_must_exist('action_file', chdir='framework') + + # Test that a copy with the "Code Sign on Copy" flag on succeeds. + test.build('framework.gyp', 'copy_target_code_sign', chdir='framework') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-copy-dylib.py b/third_party/python/gyp/test/mac/gyptest-copy-dylib.py new file mode 100644 index 0000000000..253623d1c6 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-copy-dylib.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that dylibs can be copied into app bundles. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + test.run_gyp('test.gyp', chdir='copy-dylib') + + test.build('test.gyp', 'test_app', chdir='copy-dylib') + + test.built_file_must_exist( + 'Test App.app/Contents/Resources/libmy_dylib.dylib', chdir='copy-dylib') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-debuginfo.py b/third_party/python/gyp/test/mac/gyptest-debuginfo.py new file mode 100755 index 0000000000..a0e9438e2a --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-debuginfo.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +# Copyright (c) 2011 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. + +""" +Tests things related to debug information generation. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + test.run_gyp('test.gyp', chdir='debuginfo') + + test.build('test.gyp', test.ALL, chdir='debuginfo') + + test.built_file_must_exist('libnonbundle_shared_library.dylib.dSYM', + chdir='debuginfo') + test.built_file_must_exist('nonbundle_loadable_module.so.dSYM', + chdir='debuginfo') + test.built_file_must_exist('nonbundle_executable.dSYM', + chdir='debuginfo') + + test.built_file_must_exist('bundle_shared_library.framework.dSYM', + chdir='debuginfo') + test.built_file_must_exist('bundle_loadable_module.bundle.dSYM', + chdir='debuginfo') + test.built_file_must_exist('My App.app.dSYM', + chdir='debuginfo') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-depend-on-bundle.py b/third_party/python/gyp/test/mac/gyptest-depend-on-bundle.py new file mode 100644 index 0000000000..b8b06d4cc0 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-depend-on-bundle.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that a dependency on a bundle causes the whole bundle to be built. +""" + +from __future__ import print_function + +import TestGyp + +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + test.run_gyp('test.gyp', chdir='depend-on-bundle') + + test.build('test.gyp', 'dependent_on_bundle', chdir='depend-on-bundle') + + # Binary itself. + test.built_file_must_exist('dependent_on_bundle', chdir='depend-on-bundle') + + # Bundle dependency. + test.built_file_must_exist( + 'my_bundle.framework/Versions/A/my_bundle', + chdir='depend-on-bundle') + test.built_file_must_exist( # package_framework + 'my_bundle.framework/my_bundle', + chdir='depend-on-bundle') + test.built_file_must_exist( # plist + 'my_bundle.framework/Versions/A/Resources/Info.plist', + chdir='depend-on-bundle') + test.built_file_must_exist( + 'my_bundle.framework/Versions/A/Resources/English.lproj/' # Resources + 'InfoPlist.strings', + chdir='depend-on-bundle') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-deployment-target.py b/third_party/python/gyp/test/mac/gyptest-deployment-target.py new file mode 100644 index 0000000000..c7eabde6fe --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-deployment-target.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 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 that MACOSX_DEPLOYMENT_TARGET works. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode']) + + if test.format == 'make': + # This is failing because of a deprecation warning for libstdc++. + test.skip_test() # bug=533 + + test.run_gyp('deployment-target.gyp', chdir='deployment-target') + + test.build('deployment-target.gyp', test.ALL, chdir='deployment-target') + + test.pass_test() + diff --git a/third_party/python/gyp/test/mac/gyptest-framework-dirs.py b/third_party/python/gyp/test/mac/gyptest-framework-dirs.py new file mode 100644 index 0000000000..a1ae54c57f --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-framework-dirs.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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. + +""" +Verify that it is possible to build an object that depends on a +PrivateFramework. +""" + +import os +import sys +import TestGyp + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'framework-dirs' + test.run_gyp('framework-dirs.gyp', chdir=CHDIR) + test.build('framework-dirs.gyp', 'calculate', chdir=CHDIR) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-framework-headers.py b/third_party/python/gyp/test/mac/gyptest-framework-headers.py new file mode 100644 index 0000000000..aa13a742cd --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-framework-headers.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that mac_framework_headers works properly. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + # TODO(thakis): Make this work with ninja, make. http://crbug.com/129013 + test = TestGyp.TestGyp(formats=['xcode']) + + CHDIR = 'framework-headers' + test.run_gyp('test.gyp', chdir=CHDIR) + + # Test that headers are installed for frameworks + test.build('test.gyp', 'test_framework_headers_framework', chdir=CHDIR) + + test.built_file_must_exist( + 'TestFramework.framework/Versions/A/TestFramework', chdir=CHDIR) + + test.built_file_must_exist( + 'TestFramework.framework/Versions/A/Headers/myframework.h', chdir=CHDIR) + + # Test that headers are installed for static libraries. + test.build('test.gyp', 'test_framework_headers_static', chdir=CHDIR) + + test.built_file_must_exist('libTestLibrary.a', chdir=CHDIR) + + test.built_file_must_exist('include/myframework.h', chdir=CHDIR) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-framework.py b/third_party/python/gyp/test/mac/gyptest-framework.py new file mode 100755 index 0000000000..faf05cf313 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-framework.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that app bundles are built correctly. +""" + +from __future__ import print_function + +import TestGyp + +import os +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + +def ls(path): + '''Returns a list of all files in a directory, relative to the directory.''' + result = [] + for dirpath, _, files in os.walk(path): + for f in files: + result.append(os.path.join(dirpath, f)[len(path) + 1:]) + return result + + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + test.run_gyp('framework.gyp', chdir='framework') + + test.build('framework.gyp', 'test_framework', chdir='framework') + + # Binary + test.built_file_must_exist( + 'Test Framework.framework/Versions/A/Test Framework', + chdir='framework') + + # Info.plist + info_plist = test.built_file_path( + 'Test Framework.framework/Versions/A/Resources/Info.plist', + chdir='framework') + test.must_exist(info_plist) + test.must_contain(info_plist, 'com.yourcompany.Test_Framework') + + # Resources + test.built_file_must_exist( + 'Test Framework.framework/Versions/A/Resources/English.lproj/' + 'InfoPlist.strings', + chdir='framework') + + # Symlinks created by packaging process + test.built_file_must_exist('Test Framework.framework/Versions/Current', + chdir='framework') + test.built_file_must_exist('Test Framework.framework/Resources', + chdir='framework') + test.built_file_must_exist('Test Framework.framework/Test Framework', + chdir='framework') + # PkgInfo. + test.built_file_must_not_exist( + 'Test Framework.framework/Versions/A/Resources/PkgInfo', + chdir='framework') + + # Check that no other files get added to the bundle. + if set(ls(test.built_file_path('Test Framework.framework', + chdir='framework'))) != \ + set(['Versions/A/Test Framework', + 'Versions/A/Resources/Info.plist', + 'Versions/A/Resources/English.lproj/InfoPlist.strings', + 'Test Framework', + 'Versions/A/Libraries/empty.c', # Written by a gyp action. + ]): + test.fail_test() + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-global-settings.py b/third_party/python/gyp/test/mac/gyptest-global-settings.py new file mode 100644 index 0000000000..f4ed16630e --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-global-settings.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that the global xcode_settings processing doesn't throw. +Regression test for http://crbug.com/109163 +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + # The xcode-ninja generator handles gypfiles which are not at the + # project root incorrectly. + # cf. https://code.google.com/p/gyp/issues/detail?id=460 + if test.format == 'xcode-ninja': + test.skip_test() + + test.run_gyp('src/dir2/dir2.gyp', chdir='global-settings', depth='src') + # run_gyp shouldn't throw. + + # Check that BUILT_PRODUCTS_DIR was set correctly, too. + test.build('dir2/dir2.gyp', 'dir2_target', chdir='global-settings/src', + SYMROOT='../build') + test.built_file_must_exist('file.txt', chdir='global-settings/src') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-identical-name.py b/third_party/python/gyp/test/mac/gyptest-identical-name.py new file mode 100644 index 0000000000..0d358df921 --- /dev/null +++ b/third_party/python/gyp/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() + diff --git a/third_party/python/gyp/test/mac/gyptest-infoplist-process.py b/third_party/python/gyp/test/mac/gyptest-infoplist-process.py new file mode 100755 index 0000000000..24260e1c34 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-infoplist-process.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 the Info.plist preprocessor functionality. +""" + +from __future__ import print_function + +import TestGyp + +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'infoplist-process' + INFO_PLIST_PATH = 'Test.app/Contents/Info.plist' + + # First process both keys. + test.set_configuration('One') + test.run_gyp('test1.gyp', chdir=CHDIR) + test.build('test1.gyp', test.ALL, chdir=CHDIR) + info_plist = test.built_file_path(INFO_PLIST_PATH, chdir=CHDIR) + test.must_exist(info_plist) + test.must_contain(info_plist, 'Foo') + test.must_contain(info_plist, 'Bar') + + # Then process a single key. + test.set_configuration('Two') + test.run_gyp('test2.gyp', chdir=CHDIR) + test.build('test2.gyp', chdir=CHDIR) + info_plist = test.built_file_path(INFO_PLIST_PATH, chdir=CHDIR) + test.must_exist(info_plist) + test.must_contain(info_plist, 'com.google.Test') # Normal expansion works. + test.must_contain(info_plist, 'Foo (Bar)') + test.must_contain(info_plist, 'PROCESSED_KEY2') + + # Then turn off the processor. + test.set_configuration('Three') + test.run_gyp('test3.gyp', chdir=CHDIR) + test.build('test3.gyp', chdir=CHDIR) + info_plist = test.built_file_path('Test App.app/Contents/Info.plist', + chdir=CHDIR) + test.must_exist(info_plist) + test.must_contain(info_plist, 'com.google.Test') # Normal expansion works. + test.must_contain(info_plist, 'PROCESSED_KEY1') + test.must_contain(info_plist, 'PROCESSED_KEY2') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-installname.py b/third_party/python/gyp/test/mac/gyptest-installname.py new file mode 100644 index 0000000000..17831aeaf4 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-installname.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that LD_DYLIB_INSTALL_NAME and DYLIB_INSTALL_NAME_BASE are handled +correctly. +""" + +from __future__ import print_function + +import TestGyp + +import re +import subprocess +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'installname' + test.run_gyp('test.gyp', chdir=CHDIR) + + test.build('test.gyp', test.ALL, chdir=CHDIR) + + def GetInstallname(p): + p = test.built_file_path(p, chdir=CHDIR) + r = re.compile(r'cmd LC_ID_DYLIB.*?name (.*?) \(offset \d+\)', re.DOTALL) + proc = subprocess.Popen(['otool', '-l', p], stdout=subprocess.PIPE) + o = proc.communicate()[0] + assert not proc.returncode + m = r.search(o) + assert m + return m.group(1) + + if (GetInstallname('libdefault_installname.dylib') != + '/usr/local/lib/libdefault_installname.dylib'): + test.fail_test() + + if (GetInstallname('My Framework.framework/My Framework') != + '/Library/Frameworks/My Framework.framework/' + 'Versions/A/My Framework'): + test.fail_test() + + if (GetInstallname('libexplicit_installname.dylib') != + 'Trapped in a dynamiclib factory'): + test.fail_test() + + if (GetInstallname('libexplicit_installname_base.dylib') != + '@executable_path/../../../libexplicit_installname_base.dylib'): + test.fail_test() + + if (GetInstallname('My Other Framework.framework/My Other Framework') != + '@executable_path/../../../My Other Framework.framework/' + 'Versions/A/My Other Framework'): + test.fail_test() + + if (GetInstallname('libexplicit_installname_with_base.dylib') != + '/usr/local/lib/libexplicit_installname_with_base.dylib'): + test.fail_test() + + if (GetInstallname('libexplicit_installname_with_explicit_base.dylib') != + '@executable_path/../libexplicit_installname_with_explicit_base.dylib'): + test.fail_test() + + if (GetInstallname('libboth_base_and_installname.dylib') != + 'Still trapped in a dynamiclib factory'): + test.fail_test() + + if (GetInstallname('install_name_with_info_plist.framework/' + 'install_name_with_info_plist') != + '/Library/Frameworks/install_name_with_info_plist.framework/' + 'Versions/A/install_name_with_info_plist'): + test.fail_test() + + if ('DYLIB_INSTALL_NAME_BASE:standardizepath: command not found' in + test.stdout()): + test.fail_test() + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-kext.py b/third_party/python/gyp/test/mac/gyptest-kext.py new file mode 100755 index 0000000000..56790bdb65 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-kext.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +# Copyright (c) 2015 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 that kext bundles are built correctly. +""" + +import TestGyp +import TestMac + +import os +import plistlib +import subprocess +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['xcode']) + test.run_gyp('kext.gyp', chdir='kext') + test.build('kext.gyp', test.ALL, chdir='kext') + test.built_file_must_exist('GypKext.kext/Contents/MacOS/GypKext', + chdir='kext') + test.built_file_must_exist('GypKext.kext/Contents/Info.plist', + chdir='kext') + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-ldflags-passed-to-libtool.py b/third_party/python/gyp/test/mac/gyptest-ldflags-passed-to-libtool.py new file mode 100644 index 0000000000..e24e305d9f --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-ldflags-passed-to-libtool.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that OTHER_LDFLAGS is passed to libtool. +""" + +from __future__ import print_function + +import TestGyp + +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'], + match = lambda a, b: True) + + build_error_code = { + 'xcode': [1, 65], # 1 for xcode 3, 65 for xcode 4 (see `man sysexits`) + 'make': 2, + 'ninja': 1, + 'xcode-ninja': [1, 65], + }[test.format] + + CHDIR = 'ldflags-libtool' + test.run_gyp('test.gyp', chdir=CHDIR) + + test.build('test.gyp', 'ldflags_passed_to_libtool', chdir=CHDIR, + status=build_error_code) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-ldflags.py b/third_party/python/gyp/test/mac/gyptest-ldflags.py new file mode 100644 index 0000000000..af44b8c5a0 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-ldflags.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that filenames passed to various linker flags are converted into +build-directory relative paths correctly. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + # The xcode-ninja generator handles gypfiles which are not at the + # project root incorrectly. + # cf. https://code.google.com/p/gyp/issues/detail?id=460 + if test.format == 'xcode-ninja': + test.skip_test() + + CHDIR = 'ldflags' + test.run_gyp('subdirectory/test.gyp', chdir=CHDIR) + + test.build('subdirectory/test.gyp', test.ALL, chdir=CHDIR) + + test.pass_test() + + +# These flags from `man ld` couldl show up in OTHER_LDFLAGS and need path +# translation. +# +# Done: +# -exported_symbols_list filename +# -unexported_symbols_list file +# -reexported_symbols_list file +# -sectcreate segname sectname file +# +# Will be done on demand: +# -weak_library path_to_library +# -reexport_library path_to_library +# -lazy_library path_to_library +# -upward_library path_to_library +# -syslibroot rootdir +# -framework name[,suffix] +# -weak_framework name[,suffix] +# -reexport_framework name[,suffix] +# -lazy_framework name[,suffix] +# -upward_framework name[,suffix] +# -force_load path_to_archive +# -filelist file[,dirname] +# -dtrace file +# -order_file file # should use ORDER_FILE +# -exported_symbols_order file +# -bundle_loader executable # should use BUNDLE_LOADER +# -alias_list filename +# -seg_addr_table filename +# -dylib_file install_name:file_name +# -interposable_list filename +# -object_path_lto filename +# +# +# obsolete: +# -sectorder segname sectname orderfile +# -seg_addr_table_filename path +# +# +# ??: +# -map map_file_path +# -sub_library library_name +# -sub_umbrella framework_name diff --git a/third_party/python/gyp/test/mac/gyptest-libraries.py b/third_party/python/gyp/test/mac/gyptest-libraries.py new file mode 100755 index 0000000000..5ea4faf6ea --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-libraries.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 link_settings) are properly found. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + # The xcode-ninja generator handles gypfiles which are not at the + # project root incorrectly. + # cf. https://code.google.com/p/gyp/issues/detail?id=460 + if test.format == 'xcode-ninja': + test.skip_test() + + test.skip_test() # bug=535 + + test.run_gyp('subdir/test.gyp', chdir='libraries') + + test.build('subdir/test.gyp', test.ALL, chdir='libraries') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-libtool-zero.py b/third_party/python/gyp/test/mac/gyptest-libtool-zero.py new file mode 100644 index 0000000000..ae5b7e635b --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-libtool-zero.py @@ -0,0 +1,26 @@ +#!/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 have proper mtime. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'libtool-zero' + + test.run_gyp('test.gyp', chdir=CHDIR) + + test.build('test.gyp', 'mylib', chdir=CHDIR) + + test.up_to_date('test.gyp', 'mylib', chdir=CHDIR) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-loadable-module-bundle-product-extension.py b/third_party/python/gyp/test/mac/gyptest-loadable-module-bundle-product-extension.py new file mode 100644 index 0000000000..7a60ca2d17 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-loadable-module-bundle-product-extension.py @@ -0,0 +1,31 @@ +#!/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. + +""" +Tests that loadable_modules don't collide when using the same name with +different file extensions. +""" + +import TestGyp + +import os +import struct +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'loadable-module-bundle-product-extension' + test.run_gyp('test.gyp', + '-G', 'xcode_ninja_target_pattern=^.*$', + chdir=CHDIR) + + test.build('test.gyp', test.ALL, chdir=CHDIR) + + test.must_exist(test.built_file_path('Collide.foo', chdir=CHDIR)) + test.must_exist(test.built_file_path('Collide.bar', chdir=CHDIR)) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-loadable-module.py b/third_party/python/gyp/test/mac/gyptest-loadable-module.py new file mode 100755 index 0000000000..77dde1d6cd --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-loadable-module.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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. + +""" +Tests that a loadable_module target is built correctly. +""" + +from __future__ import print_function + +import TestGyp + +import os +import struct +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'loadable-module' + test.run_gyp('test.gyp', chdir=CHDIR) + + test.build('test.gyp', test.ALL, chdir=CHDIR) + + # Binary. + binary = test.built_file_path( + 'test_loadable_module.plugin/Contents/MacOS/test_loadable_module', + chdir=CHDIR) + test.must_exist(binary) + MH_BUNDLE = 8 + if struct.unpack('4I', open(binary, 'rb').read(16))[3] != MH_BUNDLE: + test.fail_test() + + # Info.plist. + info_plist = test.built_file_path( + 'test_loadable_module.plugin/Contents/Info.plist', chdir=CHDIR) + test.must_exist(info_plist) + test.must_contain(info_plist, """ + CFBundleExecutable + test_loadable_module +""") + + # PkgInfo. + test.built_file_must_not_exist( + 'test_loadable_module.plugin/Contents/PkgInfo', chdir=CHDIR) + test.built_file_must_not_exist( + 'test_loadable_module.plugin/Contents/Resources', chdir=CHDIR) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-lto.py b/third_party/python/gyp/test/mac/gyptest-lto.py new file mode 100644 index 0000000000..d37068f336 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-lto.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python + +# Copyright (c) 2015 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 that LTO flags work. +""" + +import TestGyp + +import os +import re +import subprocess +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'lto' + test.run_gyp('test.gyp', chdir=CHDIR) + + test.build('test.gyp', test.ALL, chdir=CHDIR) + + def ObjPath(srcpath, target): + # TODO: Move this into TestGyp if it's needed elsewhere. + if test.format == 'xcode': + return os.path.join(CHDIR, 'build', 'test.build', 'Default', + target + '.build', 'Objects-normal', 'x86_64', + srcpath + '.o') + elif 'ninja' in test.format: # ninja, xcode-ninja + return os.path.join(CHDIR, 'out', 'Default', 'obj', + target + '.' + srcpath + '.o') + elif test.format == 'make': + return os.path.join(CHDIR, 'out', 'Default', 'obj.target', + target, srcpath + '.o') + + def ObjType(p, t_expected): + r = re.compile(r'nsyms\s+(\d+)') + o = subprocess.check_output(['file', p]).decode('utf-8') + objtype = 'unknown' + if ': Mach-O ' in o: + objtype = 'mach-o' + elif ': LLVM bitcode' in o: + objtype = 'llvm' + if objtype != t_expected: + print('Expected %s, got %s' % (t_expected, objtype)) + test.fail_test() + + ObjType(ObjPath('cfile', 'lto'), 'llvm') + ObjType(ObjPath('ccfile', 'lto'), 'llvm') + ObjType(ObjPath('mfile', 'lto'), 'llvm') + ObjType(ObjPath('mmfile', 'lto'), 'llvm') + ObjType(ObjPath('asmfile', 'lto'), 'mach-o') + + ObjType(ObjPath('cfile', 'lto_static'), 'llvm') + ObjType(ObjPath('ccfile', 'lto_static'), 'llvm') + ObjType(ObjPath('mfile', 'lto_static'), 'llvm') + ObjType(ObjPath('mmfile', 'lto_static'), 'llvm') + ObjType(ObjPath('asmfile', 'lto_static'), 'mach-o') + + test.pass_test() + + # TODO: Probably test for -object_path_lto too, else dsymutil won't be + # useful maybe? diff --git a/third_party/python/gyp/test/mac/gyptest-missing-cfbundlesignature.py b/third_party/python/gyp/test/mac/gyptest-missing-cfbundlesignature.py new file mode 100644 index 0000000000..be66492467 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-missing-cfbundlesignature.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that an Info.plist with CFBundleSignature works. +""" + +from __future__ import print_function + +import TestGyp + +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + test.run_gyp('test.gyp', chdir='missing-cfbundlesignature') + test.build('test.gyp', test.ALL, chdir='missing-cfbundlesignature') + + test.built_file_must_match('mytarget.app/Contents/PkgInfo', 'APPL????', + chdir='missing-cfbundlesignature') + + test.built_file_must_match('myothertarget.app/Contents/PkgInfo', 'APPL????', + chdir='missing-cfbundlesignature') + + test.built_file_must_match('thirdtarget.app/Contents/PkgInfo', 'APPL????', + chdir='missing-cfbundlesignature') + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-non-strs-flattened-to-env.py b/third_party/python/gyp/test/mac/gyptest-non-strs-flattened-to-env.py new file mode 100644 index 0000000000..cb42a939d4 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-non-strs-flattened-to-env.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that list xcode_settings are flattened before being exported to the +environment. +""" + +from __future__ import print_function + +import TestGyp + +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'non-strs-flattened-to-env' + INFO_PLIST_PATH = 'Test.app/Contents/Info.plist' + + test.run_gyp('test.gyp', chdir=CHDIR) + test.build('test.gyp', test.ALL, chdir=CHDIR) + info_plist = test.built_file_path(INFO_PLIST_PATH, chdir=CHDIR) + test.must_exist(info_plist) + test.must_contain(info_plist, '''\ +\tMy Variable +\tsome expansion''') + test.must_contain(info_plist, '''\ +\tCFlags +\t-fstack-protector-all -fno-strict-aliasing -DS="A Space"''') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-objc-arc.py b/third_party/python/gyp/test/mac/gyptest-objc-arc.py new file mode 100755 index 0000000000..dc15a0e821 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-objc-arc.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 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 that ARC objc settings are handled correctly. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + # set |match| to ignore build stderr output. + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'], + match = lambda a, b: True) + + CHDIR = 'objc-arc' + test.run_gyp('test.gyp', chdir=CHDIR) + + test.build('test.gyp', 'arc_enabled', chdir=CHDIR) + test.build('test.gyp', 'weak_enabled', chdir=CHDIR) + test.build('test.gyp', 'arc_disabled', chdir=CHDIR) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-objc-gc.py b/third_party/python/gyp/test/mac/gyptest-objc-gc.py new file mode 100644 index 0000000000..0cec458983 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-objc-gc.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that GC objc settings are handled correctly. +""" + +import TestGyp +import TestMac + +import sys + +if sys.platform == 'darwin': + # set |match| to ignore build stderr output. + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'], + match = lambda a, b: True) + + # Xcode 5.1 removed support for garbage-collection: + # error: garbage collection is no longer supported + if TestMac.Xcode.Version() < '0510': + + CHDIR = 'objc-gc' + test.run_gyp('test.gyp', chdir=CHDIR) + + build_error_code = { + 'xcode': [1, 65], # 1 for xcode 3, 65 for xcode 4 (see `man sysexits`) + 'make': 2, + 'ninja': 1, + }[test.format] + + test.build('test.gyp', 'gc_exe_fails', chdir=CHDIR, status=build_error_code) + test.build( + 'test.gyp', 'gc_off_exe_req_lib', chdir=CHDIR, status=build_error_code) + + test.build('test.gyp', 'gc_req_exe', chdir=CHDIR) + test.run_built_executable('gc_req_exe', chdir=CHDIR, stdout="gc on: 1\n") + + test.build('test.gyp', 'gc_exe_req_lib', chdir=CHDIR) + test.run_built_executable( + 'gc_exe_req_lib', chdir=CHDIR, stdout="gc on: 1\n") + + test.build('test.gyp', 'gc_exe', chdir=CHDIR) + test.run_built_executable('gc_exe', chdir=CHDIR, stdout="gc on: 1\n") + + test.build('test.gyp', 'gc_off_exe', chdir=CHDIR) + test.run_built_executable('gc_off_exe', chdir=CHDIR, stdout="gc on: 0\n") + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-postbuild-copy-bundle.py b/third_party/python/gyp/test/mac/gyptest-postbuild-copy-bundle.py new file mode 100644 index 0000000000..1f04d1cb36 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-postbuild-copy-bundle.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that a postbuild copying a dependend framework into an app bundle is +rerun if the resources in the framework change. +""" + +import TestGyp + +import os.path +import sys + +if sys.platform == 'darwin': + # TODO(thakis): Make this pass with the make generator, http://crbug.com/95529 + test = TestGyp.TestGyp(formats=['ninja', 'xcode']) + + CHDIR = 'postbuild-copy-bundle' + test.run_gyp('test.gyp', chdir=CHDIR) + + app_bundle_dir = test.built_file_path('Test App.app', chdir=CHDIR) + bundled_framework_dir = os.path.join( + app_bundle_dir, 'Contents', 'My Framework.framework', 'Resources') + final_plist_path = os.path.join(bundled_framework_dir, 'Info.plist') + final_resource_path = os.path.join(bundled_framework_dir, 'resource_file.sb') + final_copies_path = os.path.join( + app_bundle_dir, 'Contents', 'My Framework.framework', 'Versions', 'A', + 'Libraries', 'copied.txt') + + # Check that the dependency was built and copied into the app bundle: + test.build('test.gyp', 'test_app', chdir=CHDIR) + test.must_exist(final_resource_path) + test.must_match(final_resource_path, + 'This is included in the framework bundle.\n') + + test.must_exist(final_plist_path) + test.must_contain(final_plist_path, '''\ +\tRandomKey +\tRandomValue''') + + # Touch the dependency's bundle resource, and check that the modification + # makes it all the way into the app bundle: + test.sleep() + test.write('postbuild-copy-bundle/resource_file.sb', 'New text\n') + test.build('test.gyp', 'test_app', chdir=CHDIR) + + test.must_exist(final_resource_path) + test.must_match(final_resource_path, 'New text\n') + + # Check the same for the plist file. + test.sleep() + contents = test.read('postbuild-copy-bundle/Framework-Info.plist') + contents = contents.replace('RandomValue', 'NewRandomValue') + test.write('postbuild-copy-bundle/Framework-Info.plist', contents) + test.build('test.gyp', 'test_app', chdir=CHDIR) + + test.must_exist(final_plist_path) + test.must_contain(final_plist_path, '''\ +\tRandomKey +\tNewRandomValue''') + + # Check the same for the copies section, test for http://crbug.com/157077 + test.sleep() + contents = test.read('postbuild-copy-bundle/copied.txt') + contents = contents.replace('old', 'new') + test.write('postbuild-copy-bundle/copied.txt', contents) + test.build('test.gyp', 'test_app', chdir=CHDIR) + + test.must_exist(final_copies_path) + test.must_contain(final_copies_path, 'new copied file') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-postbuild-defaults.py b/third_party/python/gyp/test/mac/gyptest-postbuild-defaults.py new file mode 100644 index 0000000000..0f7d25bd89 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-postbuild-defaults.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that a postbuild invoking |defaults| works. +""" + +from __future__ import print_function + +import TestGyp + +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'postbuild-defaults' + test.run_gyp('test.gyp', chdir=CHDIR) + test.build('test.gyp', test.ALL, chdir=CHDIR) + + result_file = test.built_file_path('result', chdir=CHDIR) + test.must_exist(result_file) + test.must_contain(result_file, '''\ +Test +${PRODUCT_NAME} +''') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-postbuild-fail.py b/third_party/python/gyp/test/mac/gyptest-postbuild-fail.py new file mode 100755 index 0000000000..1a229df695 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-postbuild-fail.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python + +# Copyright (c) 2011 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 that a failing postbuild step lets the build fail. +""" + +from __future__ import print_function + +import TestGyp + +import sys + +if sys.platform == 'darwin': + # set |match| to ignore build stderr output. + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'], + match = lambda a, b: True) + + test.run_gyp('test.gyp', chdir='postbuild-fail') + + build_error_code = { + 'xcode': [1, 65], # 1 for xcode 3, 65 for xcode 4 (see `man sysexits`) + 'make': 2, + 'ninja': 1, + 'xcode-ninja': [1, 65], + }[test.format] + + + # If a postbuild fails, all postbuilds should be re-run on the next build. + # In Xcode 3, even if the first postbuild fails the other postbuilds were + # still executed. In Xcode 4, postbuilds are stopped after the first + # failing postbuild. This test checks for the Xcode 4 behavior. + + # Ignore this test on Xcode 3. + import subprocess + job = subprocess.Popen(['xcodebuild', '-version'], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) + out, _ = job.communicate() + out = out.decode('utf-8') + if job.returncode != 0: + print(out) + raise Exception('Error %d running xcodebuild' % job.returncode) + if out.startswith('Xcode 3.'): + test.pass_test() + + # Non-bundles + test.build('test.gyp', 'nonbundle', chdir='postbuild-fail', + status=build_error_code) + test.built_file_must_not_exist('static_touch', + chdir='postbuild-fail') + # Check for non-up-to-date-ness by checking if building again produces an + # error. + test.build('test.gyp', 'nonbundle', chdir='postbuild-fail', + status=build_error_code) + + + # Bundles + test.build('test.gyp', 'bundle', chdir='postbuild-fail', + status=build_error_code) + test.built_file_must_not_exist('dynamic_touch', + chdir='postbuild-fail') + # Check for non-up-to-date-ness by checking if building again produces an + # error. + test.build('test.gyp', 'bundle', chdir='postbuild-fail', + status=build_error_code) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-postbuild-multiple-configurations.py b/third_party/python/gyp/test/mac/gyptest-postbuild-multiple-configurations.py new file mode 100644 index 0000000000..84694f36cc --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-postbuild-multiple-configurations.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that a postbuild work in projects with multiple configurations. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'postbuild-multiple-configurations' + test.run_gyp('test.gyp', chdir=CHDIR) + + for configuration in ['Debug', 'Release']: + test.set_configuration(configuration) + test.build('test.gyp', test.ALL, chdir=CHDIR) + test.built_file_must_exist('postbuild-file', chdir=CHDIR) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-postbuild-static-library.py b/third_party/python/gyp/test/mac/gyptest-postbuild-static-library.py new file mode 100644 index 0000000000..8f9a6ebcb0 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-postbuild-static-library.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that a postbuilds on static libraries work, and that sourceless +libraries don't cause failures at gyp time. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['make', 'xcode']) + + CHDIR = 'postbuild-static-library' + test.run_gyp('test.gyp', chdir=CHDIR) + test.build('test.gyp', 'my_lib', chdir=CHDIR) + # Building my_sourceless_lib doesn't work with make. gyp should probably + # forbid sourceless static libraries, since they're pretty pointless. + # But they shouldn't cause gyp time exceptions. + + test.built_file_must_exist('postbuild-file', chdir=CHDIR) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-postbuild.py b/third_party/python/gyp/test/mac/gyptest-postbuild.py new file mode 100755 index 0000000000..684e7b8426 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-postbuild.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python + +# Copyright (c) 2011 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 that postbuild steps work. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + test.run_gyp('test.gyp', chdir='postbuilds') + + test.build('test.gyp', test.ALL, chdir='postbuilds') + + # See comment in test/subdirectory/gyptest-subdir-default.py + if test.format == 'xcode': + chdir = 'postbuilds/subdirectory' + else: + chdir = 'postbuilds' + + # Created by the postbuild scripts + test.built_file_must_exist('el.a_touch', + type=test.STATIC_LIB, + chdir='postbuilds') + test.built_file_must_exist('el.a_gyp_touch', + type=test.STATIC_LIB, + chdir='postbuilds') + test.built_file_must_exist('nest_el.a_touch', + type=test.STATIC_LIB, + chdir=chdir) + test.built_file_must_exist( + 'dyna.framework/Versions/A/dyna_touch', + chdir='postbuilds') + test.built_file_must_exist( + 'dyna.framework/Versions/A/dyna_gyp_touch', + chdir='postbuilds') + test.built_file_must_exist( + 'nest_dyna.framework/Versions/A/nest_dyna_touch', + chdir=chdir) + test.built_file_must_exist('dyna_standalone.dylib_gyp_touch', + type=test.SHARED_LIB, + chdir='postbuilds') + test.built_file_must_exist('copied_file.txt', chdir='postbuilds') + test.built_file_must_exist('copied_file_2.txt', chdir=chdir) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-prefixheader.py b/third_party/python/gyp/test/mac/gyptest-prefixheader.py new file mode 100755 index 0000000000..0cf85f9422 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-prefixheader.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that GCC_PREFIX_HEADER works. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + test.run_gyp('test.gyp', chdir='prefixheader') + + test.build('test.gyp', test.ALL, chdir='prefixheader') + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-rebuild.py b/third_party/python/gyp/test/mac/gyptest-rebuild.py new file mode 100755 index 0000000000..c7d8cad02d --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-rebuild.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that app bundles are rebuilt correctly. +""" + +from __future__ import print_function + +import TestGyp + +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'rebuild' + test.run_gyp('test.gyp', chdir=CHDIR) + + test.build('test.gyp', 'test_app', chdir=CHDIR) + + # Touch a source file, rebuild, and check that the app target is up-to-date. + test.touch('rebuild/main.c') + test.build('test.gyp', 'test_app', chdir=CHDIR) + + test.up_to_date('test.gyp', 'test_app', chdir=CHDIR) + + # Xcode runs postbuilds on every build, so targets with postbuilds are + # never marked as up_to_date. + if test.format != 'xcode': + # Same for a framework bundle. + test.build('test.gyp', 'test_framework_postbuilds', chdir=CHDIR) + test.up_to_date('test.gyp', 'test_framework_postbuilds', chdir=CHDIR) + + # Test that an app bundle with a postbuild that touches the app binary needs + # to be built only once. + test.build('test.gyp', 'test_app_postbuilds', chdir=CHDIR) + test.up_to_date('test.gyp', 'test_app_postbuilds', chdir=CHDIR) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-rpath.py b/third_party/python/gyp/test/mac/gyptest-rpath.py new file mode 100644 index 0000000000..a82e2fd562 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-rpath.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that LD_DYLIB_INSTALL_NAME and DYLIB_INSTALL_NAME_BASE are handled +correctly. +""" + +import TestGyp + +import re +import subprocess +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'rpath' + test.run_gyp('test.gyp', chdir=CHDIR) + + test.build('test.gyp', test.ALL, chdir=CHDIR) + + def GetRpaths(p): + p = test.built_file_path(p, chdir=CHDIR) + r = re.compile(r'cmd LC_RPATH.*?path (.*?) \(offset \d+\)', re.DOTALL) + proc = subprocess.Popen(['otool', '-l', p], stdout=subprocess.PIPE) + o = proc.communicate()[0].decode('utf-8') + assert not proc.returncode + return r.findall(o) + + if GetRpaths('libdefault_rpath.dylib') != []: + test.fail_test() + + if GetRpaths('libexplicit_rpath.dylib') != ['@executable_path/.']: + test.fail_test() + + if (GetRpaths('libexplicit_rpaths_escaped.dylib') != + ['First rpath', 'Second rpath']): + test.fail_test() + + if GetRpaths('My Framework.framework/My Framework') != ['@loader_path/.']: + test.fail_test() + + if GetRpaths('executable') != ['@executable_path/.']: + test.fail_test() + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-sdkroot.py b/third_party/python/gyp/test/mac/gyptest-sdkroot.py new file mode 100644 index 0000000000..f8edbaa583 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-sdkroot.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that setting SDKROOT works. +""" + +from __future__ import print_function + +import TestGyp + +import os +import subprocess +import sys + + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + def GetSDKPath(sdk): + """Return SDKROOT if the SDK version |sdk| is installed or empty string.""" + DEVNULL = open(os.devnull, 'wb') + try: + proc = subprocess.Popen( + ['xcodebuild', '-version', '-sdk', 'macosx' + sdk, 'Path'], + stdout=subprocess.PIPE, stderr=DEVNULL) + return proc.communicate()[0].rstrip('\n') + finally: + DEVNULL.close() + + def SelectSDK(): + """Select the oldest SDK installed (greater than 10.6).""" + for sdk in ['10.6', '10.7', '10.8', '10.9']: + path = GetSDKPath(sdk) + if path: + return True, sdk, path + return False, '', '' + + # Make sure this works on the bots, which only have the 10.6 sdk, and on + # dev machines which usually don't have the 10.6 sdk. + sdk_found, sdk, sdk_path = SelectSDK() + if not sdk_found: + test.fail_test() + + test.write('sdkroot/test.gyp', test.read('sdkroot/test.gyp') % sdk) + + test.run_gyp('test.gyp', '-D', 'sdk_path=%s' % sdk_path, + chdir='sdkroot') + test.build('test.gyp', test.ALL, chdir='sdkroot') + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-sourceless-module.py b/third_party/python/gyp/test/mac/gyptest-sourceless-module.py new file mode 100644 index 0000000000..f2801c20aa --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-sourceless-module.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that bundles that have no 'sources' (pure resource containers) work. +""" + +from __future__ import print_function + +import TestGyp + +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + test.run_gyp('test.gyp', chdir='sourceless-module') + + # Just needs to build without errors. + test.build('test.gyp', 'empty_bundle', chdir='sourceless-module') + test.built_file_must_not_exist( + 'empty_bundle.bundle', chdir='sourceless-module') + + # Needs to build, and contain a resource. + test.build('test.gyp', 'resource_bundle', chdir='sourceless-module') + + test.built_file_must_exist( + 'resource_bundle.bundle/Contents/Resources/foo.manifest', + chdir='sourceless-module') + test.built_file_must_not_exist( + 'resource_bundle.bundle/Contents/MacOS/resource_bundle', + chdir='sourceless-module') + + # Build an app containing an actionless bundle. + test.build( + 'test.gyp', + 'bundle_dependent_on_resource_bundle_no_actions', + chdir='sourceless-module') + + test.built_file_must_exist( + 'bundle_dependent_on_resource_bundle_no_actions.app/Contents/Resources/' + 'mac_resource_bundle_no_actions.bundle/Contents/Resources/empty.txt', + chdir='sourceless-module') + + # Needs to build and cause the bundle to be built. + test.build( + 'test.gyp', 'dependent_on_resource_bundle', chdir='sourceless-module') + + test.built_file_must_exist( + 'resource_bundle.bundle/Contents/Resources/foo.manifest', + chdir='sourceless-module') + test.built_file_must_not_exist( + 'resource_bundle.bundle/Contents/MacOS/resource_bundle', + chdir='sourceless-module') + + # TODO(thakis): shared_libraries that have no sources but depend on static + # libraries currently only work with the ninja generator. This is used by + # chrome/mac's components build. + if test.format == 'ninja': + # Check that an executable depending on a resource framework links fine too. + test.build( + 'test.gyp', 'dependent_on_resource_framework', chdir='sourceless-module') + + test.built_file_must_exist( + 'resource_framework.framework/Resources/foo.manifest', + chdir='sourceless-module') + test.built_file_must_exist( + 'resource_framework.framework/resource_framework', + chdir='sourceless-module') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-strip-default.py b/third_party/python/gyp/test/mac/gyptest-strip-default.py new file mode 100644 index 0000000000..b851782fd5 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-strip-default.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 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 that the default STRIP_STYLEs match between different generators. +""" + +from __future__ import print_function + +import TestGyp + +import re +import subprocess +import sys +import time + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR='strip' + test.run_gyp('test-defaults.gyp', chdir=CHDIR) + + test.build('test-defaults.gyp', test.ALL, chdir=CHDIR) + + # Lightweight check if stripping was done. + def OutPath(s): + return test.built_file_path(s, chdir=CHDIR) + + def CheckNsyms(p, o_expected): + proc = subprocess.Popen(['nm', '-aU', p], stdout=subprocess.PIPE) + o = proc.communicate()[0].decode('utf-8') + + # Filter out mysterious "00 0000 OPT radr://5614542" symbol which + # is apparently only printed on the bots (older toolchain?). + # Yes, "radr", not "rdar". + o = ''.join(filter(lambda s: 'radr://5614542' not in s, o.splitlines(True))) + + o = o.replace('A', 'T') + o = re.sub(r'^[a-fA-F0-9]+', 'XXXXXXXX', o, flags=re.MULTILINE) + assert not proc.returncode + if o != o_expected: + print('Stripping: Expected symbols """\n%s""", got """\n%s"""' % ( + o_expected, o)) + test.fail_test() + + CheckNsyms(OutPath('libsingle_dylib.dylib'), +"""\ +XXXXXXXX S _ci +XXXXXXXX S _i +XXXXXXXX T _the_function +XXXXXXXX t _the_hidden_function +XXXXXXXX T _the_used_function +XXXXXXXX T _the_visible_function +""") + CheckNsyms(OutPath('single_so.so'), +"""\ +XXXXXXXX S _ci +XXXXXXXX S _i +XXXXXXXX T _the_function +XXXXXXXX t _the_hidden_function +XXXXXXXX T _the_used_function +XXXXXXXX T _the_visible_function +""") + CheckNsyms(OutPath('single_exe'), +"""\ +XXXXXXXX T __mh_execute_header +""") + + CheckNsyms(test.built_file_path( + 'bundle_dylib.framework/Versions/A/bundle_dylib', chdir=CHDIR), +"""\ +XXXXXXXX S _ci +XXXXXXXX S _i +XXXXXXXX T _the_function +XXXXXXXX t _the_hidden_function +XXXXXXXX T _the_used_function +XXXXXXXX T _the_visible_function +""") + CheckNsyms(test.built_file_path( + 'bundle_so.bundle/Contents/MacOS/bundle_so', chdir=CHDIR), +"""\ +XXXXXXXX S _ci +XXXXXXXX S _i +XXXXXXXX T _the_function +XXXXXXXX T _the_used_function +XXXXXXXX T _the_visible_function +""") + CheckNsyms(test.built_file_path( + 'bundle_exe.app/Contents/MacOS/bundle_exe', chdir=CHDIR), +"""\ +XXXXXXXX T __mh_execute_header +""") + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-strip.py b/third_party/python/gyp/test/mac/gyptest-strip.py new file mode 100755 index 0000000000..d4694834ac --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-strip.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that stripping works. +""" + +from __future__ import print_function + +import TestGyp +import TestMac + +import re +import subprocess +import sys +import time + +print("This test is currently disabled: https://crbug.com/483696.") +sys.exit(0) + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + test.run_gyp('test.gyp', chdir='strip') + + test.build('test.gyp', test.ALL, chdir='strip') + + # Lightweight check if stripping was done. + def OutPath(s): + return test.built_file_path(s, type=test.SHARED_LIB, chdir='strip') + + def CheckNsyms(p, n_expected): + r = re.compile(r'nsyms\s+(\d+)') + o = subprocess.check_output(['otool', '-l', p]) + m = r.search(o) + n = int(m.group(1)) + if n != n_expected: + print('Stripping: Expected %d symbols, got %d' % (n_expected, n)) + test.fail_test() + + # Starting with Xcode 5.0, clang adds an additional symbols to the compiled + # file when using a relative path to the input file. So when using ninja + # with Xcode 5.0 or higher, take this additional symbol into consideration + # for unstripped builds (it is stripped by all strip commands). + expected_extra_symbol_count = 0 + if test.format in ['ninja', 'xcode-ninja'] \ + and TestMac.Xcode.Version() >= '0500': + expected_extra_symbol_count = 1 + + # The actual numbers here are not interesting, they just need to be the same + # in both the xcode and the make build. + CheckNsyms(OutPath('no_postprocess'), 29 + expected_extra_symbol_count) + CheckNsyms(OutPath('no_strip'), 29 + expected_extra_symbol_count) + CheckNsyms(OutPath('strip_all'), 0) + CheckNsyms(OutPath('strip_nonglobal'), 6) + CheckNsyms(OutPath('strip_debugging'), 7) + CheckNsyms(OutPath('strip_all_custom_flags'), 0) + CheckNsyms(test.built_file_path( + 'strip_all_bundle.framework/Versions/A/strip_all_bundle', chdir='strip'), + 0) + CheckNsyms(OutPath('strip_save'), 7) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-swift-library.py b/third_party/python/gyp/test/mac/gyptest-swift-library.py new file mode 100644 index 0000000000..d3433753fd --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-swift-library.py @@ -0,0 +1,67 @@ +#!/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 that a swift framework builds correctly. +""" + +from __future__ import print_function + +import TestGyp +import TestMac + +import collections +import sys +import subprocess + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['xcode']) + + # Ensures that the given symbol is present in the given file, by running nm. + def CheckHasSymbolName(path, symbol): + output = subprocess.check_output(['nm', '-j', path]) + idx = output.find(symbol) + if idx == -1: + print('Swift: Could not find symobl: %s' % symbol) + test.fail_test() + + test_cases = [] + + # Run this for iOS on XCode 6.0 or greater + if TestMac.Xcode.Version() >= '0600': + test_cases.append(('Default', 'iphoneos')) + test_cases.append(('Default', 'iphonesimulator')) + + # Run it for Mac on XCode 6.1 or greater + if TestMac.Xcode.Version() >= '0610': + test_cases.append(('Default', None)) + + # Generate the project. + test.run_gyp('test.gyp', chdir='swift-library') + + # Build and verify for each configuration. + for configuration, sdk in test_cases: + kwds = collections.defaultdict(list) + if test.format == 'xcode': + if sdk is not None: + kwds['arguments'].extend(['-sdk', sdk]) + + test.set_configuration(configuration) + test.build('test.gyp', 'SwiftFramework', chdir='swift-library', **kwds) + + filename = 'SwiftFramework.framework/SwiftFramework' + result_file = test.built_file_path(filename, chdir='swift-library') + + test.must_exist(result_file) + + # Check to make sure that our swift class (GypSwiftTest) is present in the + # built binary + CheckHasSymbolName(result_file, "C14SwiftFramework12GypSwiftTest") + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-type-envvars.py b/third_party/python/gyp/test/mac/gyptest-type-envvars.py new file mode 100755 index 0000000000..a5203c5f1e --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-type-envvars.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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. + +""" +Test that MACH_O_TYPE etc are set correctly. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + test.run_gyp('test.gyp', + '-G', 'xcode_ninja_target_pattern=^(?!nonbundle_none).*$', + chdir='type_envvars') + + test.build('test.gyp', test.ALL, chdir='type_envvars') + + # The actual test is done by postbuild scripts during |test.build()|. + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-unicode-settings.py b/third_party/python/gyp/test/mac/gyptest-unicode-settings.py new file mode 100644 index 0000000000..a71b3bd9a3 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-unicode-settings.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python + +# Copyright 2013 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 that unicode strings in 'xcode_settings' work. +Also checks that ASCII control characters are escaped properly. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['xcode']) + test.run_gyp('test.gyp', chdir='unicode-settings') + test.build('test.gyp', test.ALL, chdir='unicode-settings') + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-xcode-env-order.py b/third_party/python/gyp/test/mac/gyptest-xcode-env-order.py new file mode 100755 index 0000000000..bda19988b2 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-xcode-env-order.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that dependent Xcode settings are processed correctly. +""" + +from __future__ import print_function + +import TestGyp +import TestMac + +import subprocess +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'xcode-env-order' + INFO_PLIST_PATH = 'Test.app/Contents/Info.plist' + + test.run_gyp('test.gyp', chdir=CHDIR) + test.build('test.gyp', test.ALL, chdir=CHDIR) + + # Env vars in 'copies' filenames. + test.built_file_must_exist('Test-copy-brace/main.c', chdir=CHDIR) + test.built_file_must_exist('Test-copy-paren/main.c', chdir=CHDIR) + test.built_file_must_exist('Test-copy-bare/main.c', chdir=CHDIR) + + # Env vars in 'actions' filenames and inline actions + test.built_file_must_exist('action-copy-brace.txt', chdir=CHDIR) + test.built_file_must_exist('action-copy-paren.txt', chdir=CHDIR) + test.built_file_must_exist('action-copy-bare.txt', chdir=CHDIR) + + # Env vars in 'rules' filenames and inline actions + test.built_file_must_exist('rule-copy-brace.txt', chdir=CHDIR) + test.built_file_must_exist('rule-copy-paren.txt', chdir=CHDIR) + # TODO: see comment in test.gyp for this file. + #test.built_file_must_exist('rule-copy-bare.txt', chdir=CHDIR) + + # Env vars in Info.plist. + info_plist = test.built_file_path(INFO_PLIST_PATH, chdir=CHDIR) + test.must_exist(info_plist) + + test.must_contain(info_plist, '''\ +\tBraceProcessedKey1 +\tD:/Source/Project/Test''') + test.must_contain(info_plist, '''\ +\tBraceProcessedKey2 +\t/Source/Project/Test''') + test.must_contain(info_plist, '''\ +\tBraceProcessedKey3 +\tcom.apple.product-type.application:D:/Source/Project/Test''') + + test.must_contain(info_plist, '''\ +\tParenProcessedKey1 +\tD:/Source/Project/Test''') + test.must_contain(info_plist, '''\ +\tParenProcessedKey2 +\t/Source/Project/Test''') + test.must_contain(info_plist, '''\ +\tParenProcessedKey3 +\tcom.apple.product-type.application:D:/Source/Project/Test''') + + test.must_contain(info_plist, '''\ +\tBareProcessedKey1 +\tD:/Source/Project/Test''') + test.must_contain(info_plist, '''\ +\tBareProcessedKey2 +\t/Source/Project/Test''') + # NOTE: For bare variables, $PRODUCT_TYPE is not replaced! It _is_ replaced + # if it's not right at the start of the string (e.g. ':$PRODUCT_TYPE'), so + # this looks like an Xcode bug. This bug isn't emulated (yet?), so check this + # only for Xcode. + if test.format == 'xcode' and TestMac.Xcode.Version() < '0500': + test.must_contain(info_plist, '''\ +\tBareProcessedKey3 +\t$PRODUCT_TYPE:D:/Source/Project/Test''') + else: + # The bug has been fixed by Xcode version 5.0.0. + test.must_contain(info_plist, '''\ +\tBareProcessedKey3 +\tcom.apple.product-type.application:D:/Source/Project/Test''') + + test.must_contain(info_plist, '''\ +\tMixedProcessedKey +\t/Source/Project:Test:mh_execute''') + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-xcode-gcc-clang.py b/third_party/python/gyp/test/mac/gyptest-xcode-gcc-clang.py new file mode 100644 index 0000000000..981c3fc564 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-xcode-gcc-clang.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that xcode-style GCC_... settings that require clang are handled +properly. +""" + +import TestGyp + +import os +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'xcode-gcc' + test.run_gyp('test-clang.gyp', chdir=CHDIR) + + test.build('test-clang.gyp', 'aliasing_yes', chdir=CHDIR) + test.run_built_executable('aliasing_yes', chdir=CHDIR, stdout="1\n") + test.build('test-clang.gyp', 'aliasing_no', chdir=CHDIR) + test.run_built_executable('aliasing_no', chdir=CHDIR, stdout="0\n") + + # The default behavior changed: strict aliasing used to be off, now it's on + # by default. The important part is that this is identical for all generators + # (which it is). TODO(thakis): Enable this once the bots have a newer Xcode. + #test.build('test-clang.gyp', 'aliasing_default', chdir=CHDIR) + #test.run_built_executable('aliasing_default', chdir=CHDIR, stdout="1\n") + # For now, just check the generated ninja file: + if test.format == 'ninja': + contents = open(test.built_file_path('obj/aliasing_default.ninja', + chdir=CHDIR)).read() + if 'strict-aliasing' in contents: + test.fail_test() + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-xcode-gcc.py b/third_party/python/gyp/test/mac/gyptest-xcode-gcc.py new file mode 100644 index 0000000000..a1d201ae03 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-xcode-gcc.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 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 that xcode-style GCC_... settings are handled properly. +""" + +import TestGyp + +import os +import subprocess +import sys + +def IgnoreOutput(string, expected_string): + return True + +def CompilerVersion(compiler): + stdout = subprocess.check_output([compiler, '-v'], stderr=subprocess.STDOUT) + stdout = stdout.decode('utf-8') + return stdout.rstrip('\n') + +def CompilerSupportsWarnAboutInvalidOffsetOfMacro(test): + # "clang" does not support the "-Winvalid-offsetof" flag, and silently + # ignore it. Starting with Xcode 5.0.0, "gcc" is just a "clang" binary with + # some hard-coded include path hack, so use the output of "-v" to detect if + # the compiler supports the flag or not. + return 'clang' not in CompilerVersion('/usr/bin/cc') + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + if test.format == 'xcode-ninja': + test.skip_test() + + CHDIR = 'xcode-gcc' + test.run_gyp('test.gyp', chdir=CHDIR) + + # List of targets that'll pass. It expects targets of the same name with + # '-fail' appended that'll fail to build. + targets = [ + 'warn_about_missing_newline', + ] + + # clang doesn't warn on invalid offsetofs, it silently ignores + # -Wno-invalid-offsetof. + if CompilerSupportsWarnAboutInvalidOffsetOfMacro(test): + targets.append('warn_about_invalid_offsetof_macro') + + for target in targets: + test.build('test.gyp', target, chdir=CHDIR) + test.built_file_must_exist(target, chdir=CHDIR) + fail_target = target + '-fail' + test.build('test.gyp', fail_target, chdir=CHDIR, status=None, + stderr=None, match=IgnoreOutput) + test.built_file_must_not_exist(fail_target, chdir=CHDIR) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-xcode-support-actions.py b/third_party/python/gyp/test/mac/gyptest-xcode-support-actions.py new file mode 100755 index 0000000000..ecc1402972 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-xcode-support-actions.py @@ -0,0 +1,25 @@ +#!/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 that support actions are properly created. +""" + +import TestGyp + +import os +import subprocess +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['xcode']) + + CHDIR = 'xcode-support-actions' + + test.run_gyp('test.gyp', '-Gsupport_target_suffix=_customsuffix', chdir=CHDIR) + test.build('test.gyp', target='target_customsuffix', chdir=CHDIR) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-xctest.py b/third_party/python/gyp/test/mac/gyptest-xctest.py new file mode 100644 index 0000000000..fb478bb31c --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-xctest.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 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 that xctest targets are correctly configured. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['xcode']) + + # This test appears to be flaky. + test.skip_test() # bug=531 + + # Ignore this test if Xcode 5 is not installed + import subprocess + job = subprocess.Popen(['xcodebuild', '-version'], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) + out, err = job.communicate() + if job.returncode != 0: + raise Exception('Error %d running xcodebuild' % job.returncode) + xcode_version, build_number = out.splitlines() + # Convert the version string from 'Xcode 5.0' to ['5','0']. + xcode_version = xcode_version.split()[-1].split('.') + if xcode_version < ['5']: + test.pass_test() + + CHDIR = 'xctest' + test.run_gyp('test.gyp', chdir=CHDIR) + test.build('test.gyp', chdir=CHDIR, arguments=['-scheme', 'classes', 'test']) + + test.built_file_must_match('tests.xctest/Contents/Resources/resource.txt', + 'foo\n', chdir=CHDIR) + test.pass_test() diff --git a/third_party/python/gyp/test/mac/gyptest-xcuitest.py b/third_party/python/gyp/test/mac/gyptest-xcuitest.py new file mode 100755 index 0000000000..410de297d0 --- /dev/null +++ b/third_party/python/gyp/test/mac/gyptest-xcuitest.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 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 that xcuitest targets are correctly configured. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['xcode']) + + # Ignore this test if Xcode 5 is not installed + import subprocess + job = subprocess.Popen(['xcodebuild', '-version'], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) + out, err = job.communicate() + if job.returncode != 0: + raise Exception('Error %d running xcodebuild' % job.returncode) + xcode_version, build_number = out.decode('utf-8').splitlines() + # Convert the version string from 'Xcode 5.0' to ['5','0']. + xcode_version = xcode_version.split()[-1].split('.') + if xcode_version < ['7']: + test.pass_test() + + CHDIR = 'xcuitest' + test.run_gyp('test.gyp', chdir=CHDIR) + test.build('test.gyp', chdir=CHDIR, arguments=[ + '-target', 'tests', + '-sdk', 'iphonesimulator', + ]) + + test.pass_test() diff --git a/third_party/python/gyp/test/mac/identical-name/proxy/proxy.cc b/third_party/python/gyp/test/mac/identical-name/proxy/proxy.cc new file mode 100644 index 0000000000..8e1782da63 --- /dev/null +++ b/third_party/python/gyp/test/mac/identical-name/proxy/proxy.cc @@ -0,0 +1,2 @@ +// Empty file + diff --git a/third_party/python/gyp/test/mac/identical-name/proxy/proxy.gyp b/third_party/python/gyp/test/mac/identical-name/proxy/proxy.gyp new file mode 100644 index 0000000000..38f44af1b5 --- /dev/null +++ b/third_party/python/gyp/test/mac/identical-name/proxy/proxy.gyp @@ -0,0 +1,9 @@ +{ + 'includes': ['../test.gypi'], + 'targets': [{ + 'target_name': 'testlib', + 'type': 'none', + 'dependencies': ['testlib/testlib.gyp:testlib'], + 'sources': ['proxy.cc'], + }], +} diff --git a/third_party/python/gyp/test/mac/identical-name/proxy/testlib/testlib.cc b/third_party/python/gyp/test/mac/identical-name/proxy/testlib/testlib.cc new file mode 100644 index 0000000000..8e1782da63 --- /dev/null +++ b/third_party/python/gyp/test/mac/identical-name/proxy/testlib/testlib.cc @@ -0,0 +1,2 @@ +// Empty file + diff --git a/third_party/python/gyp/test/mac/identical-name/proxy/testlib/testlib.gyp b/third_party/python/gyp/test/mac/identical-name/proxy/testlib/testlib.gyp new file mode 100644 index 0000000000..ed1c62e982 --- /dev/null +++ b/third_party/python/gyp/test/mac/identical-name/proxy/testlib/testlib.gyp @@ -0,0 +1,8 @@ +{ + 'includes': ['../../test.gypi'], + 'targets': [{ + 'target_name': 'testlib', + 'type': 'static_library', + 'sources': ['testlib.cc'], + }], +} diff --git a/third_party/python/gyp/test/mac/identical-name/test-should-fail.gyp b/third_party/python/gyp/test/mac/identical-name/test-should-fail.gyp new file mode 100644 index 0000000000..72bfc7af0f --- /dev/null +++ b/third_party/python/gyp/test/mac/identical-name/test-should-fail.gyp @@ -0,0 +1,10 @@ +{ + 'targets': [{ + 'target_name': 'test', + 'type': 'executable', + 'dependencies': [ + 'testlib/testlib.gyp:proxy', + 'proxy/proxy.gyp:testlib', + ], + }], +} diff --git a/third_party/python/gyp/test/mac/identical-name/test.gyp b/third_party/python/gyp/test/mac/identical-name/test.gyp new file mode 100644 index 0000000000..717220e866 --- /dev/null +++ b/third_party/python/gyp/test/mac/identical-name/test.gyp @@ -0,0 +1,11 @@ +{ + 'includes': ['test.gypi'], + 'targets': [{ + 'target_name': 'test', + 'type': 'executable', + 'dependencies': [ + 'testlib/testlib.gyp:proxy', + 'proxy/proxy.gyp:testlib', + ], + }], +} \ No newline at end of file diff --git a/third_party/python/gyp/test/mac/identical-name/test.gypi b/third_party/python/gyp/test/mac/identical-name/test.gypi new file mode 100644 index 0000000000..61b7c2badf --- /dev/null +++ b/third_party/python/gyp/test/mac/identical-name/test.gypi @@ -0,0 +1,7 @@ +{ + 'target_defaults': { + 'xcode_settings': { + 'SYMROOT': '<(DEPTH)/$SRCROOT/', + }, + }, +} diff --git a/third_party/python/gyp/test/mac/identical-name/testlib/main.cc b/third_party/python/gyp/test/mac/identical-name/testlib/main.cc new file mode 100644 index 0000000000..5c2fa9bb6a --- /dev/null +++ b/third_party/python/gyp/test/mac/identical-name/testlib/main.cc @@ -0,0 +1,3 @@ +int main(int argc, char **argv) { + return 0; +} diff --git a/third_party/python/gyp/test/mac/identical-name/testlib/testlib.gyp b/third_party/python/gyp/test/mac/identical-name/testlib/testlib.gyp new file mode 100644 index 0000000000..aa8b851004 --- /dev/null +++ b/third_party/python/gyp/test/mac/identical-name/testlib/testlib.gyp @@ -0,0 +1,14 @@ +{ + 'includes': ['../test.gypi'], + 'targets': [{ + 'target_name': 'proxy', + 'type': 'static_library', + 'sources': ['void.cc'], + 'dependencies': ['testlib'], + 'export_dependent_settings': ['testlib'], + }, { + 'target_name': 'testlib', + 'type': 'static_library', + 'sources': ['main.cc'], + }], +} diff --git a/third_party/python/gyp/test/mac/identical-name/testlib/void.cc b/third_party/python/gyp/test/mac/identical-name/testlib/void.cc new file mode 100644 index 0000000000..8e1782da63 --- /dev/null +++ b/third_party/python/gyp/test/mac/identical-name/testlib/void.cc @@ -0,0 +1,2 @@ +// Empty file + diff --git a/third_party/python/gyp/test/mac/infoplist-process/Info.plist b/third_party/python/gyp/test/mac/infoplist-process/Info.plist new file mode 100644 index 0000000000..cb65721f43 --- /dev/null +++ b/third_party/python/gyp/test/mac/infoplist-process/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.google.${PRODUCT_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + ProcessedKey1 + PROCESSED_KEY1 + ProcessedKey2 + PROCESSED_KEY2 + + diff --git a/third_party/python/gyp/test/mac/infoplist-process/main.c b/third_party/python/gyp/test/mac/infoplist-process/main.c new file mode 100644 index 0000000000..1bf4b2a11a --- /dev/null +++ b/third_party/python/gyp/test/mac/infoplist-process/main.c @@ -0,0 +1,7 @@ +// Copyright (c) 2011 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. + +int main() { + return 0; +} diff --git a/third_party/python/gyp/test/mac/infoplist-process/test1.gyp b/third_party/python/gyp/test/mac/infoplist-process/test1.gyp new file mode 100644 index 0000000000..bc625a968b --- /dev/null +++ b/third_party/python/gyp/test/mac/infoplist-process/test1.gyp @@ -0,0 +1,25 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'main.c', + ], + 'configurations': { + 'One': { + }, + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'Info.plist', + 'INFOPLIST_PREPROCESS': 'YES', + 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'PROCESSED_KEY1=Foo PROCESSED_KEY2=Bar', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/infoplist-process/test2.gyp b/third_party/python/gyp/test/mac/infoplist-process/test2.gyp new file mode 100644 index 0000000000..ecfbc9f64c --- /dev/null +++ b/third_party/python/gyp/test/mac/infoplist-process/test2.gyp @@ -0,0 +1,25 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'main.c', + ], + 'configurations': { + 'Two': { + }, + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'Info.plist', + 'INFOPLIST_PREPROCESS': 'YES', + 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'PROCESSED_KEY1="Foo (Bar)"', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/infoplist-process/test3.gyp b/third_party/python/gyp/test/mac/infoplist-process/test3.gyp new file mode 100644 index 0000000000..be8fe75a53 --- /dev/null +++ b/third_party/python/gyp/test/mac/infoplist-process/test3.gyp @@ -0,0 +1,25 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test App', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'main.c', + ], + 'configurations': { + 'Three': { + }, + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'Info.plist', + 'INFOPLIST_PREPROCESS': 'NO', + 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'PROCESSED_KEY1=Foo', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/installname/Info.plist b/third_party/python/gyp/test/mac/installname/Info.plist new file mode 100644 index 0000000000..5e05a5190c --- /dev/null +++ b/third_party/python/gyp/test/mac/installname/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/third_party/python/gyp/test/mac/installname/file.c b/third_party/python/gyp/test/mac/installname/file.c new file mode 100644 index 0000000000..a39fce095f --- /dev/null +++ b/third_party/python/gyp/test/mac/installname/file.c @@ -0,0 +1 @@ +int f() { return 0; } diff --git a/third_party/python/gyp/test/mac/installname/main.c b/third_party/python/gyp/test/mac/installname/main.c new file mode 100644 index 0000000000..237c8ce181 --- /dev/null +++ b/third_party/python/gyp/test/mac/installname/main.c @@ -0,0 +1 @@ +int main() {} diff --git a/third_party/python/gyp/test/mac/installname/test.gyp b/third_party/python/gyp/test/mac/installname/test.gyp new file mode 100644 index 0000000000..60c867ff12 --- /dev/null +++ b/third_party/python/gyp/test/mac/installname/test.gyp @@ -0,0 +1,93 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'default_installname', + 'type': 'shared_library', + 'sources': [ 'file.c' ], + }, + { + 'target_name': 'default_bundle_installname', + 'product_name': 'My Framework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'file.c' ], + }, + { + 'target_name': 'explicit_installname', + 'type': 'shared_library', + 'sources': [ 'file.c' ], + 'xcode_settings': { + 'LD_DYLIB_INSTALL_NAME': 'Trapped in a dynamiclib factory', + }, + }, + { + 'target_name': 'explicit_installname_base', + 'type': 'shared_library', + 'sources': [ 'file.c' ], + 'xcode_settings': { + 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..', + + }, + }, + { + 'target_name': 'explicit_installname_base_bundle', + 'product_name': 'My Other Framework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'file.c' ], + 'xcode_settings': { + 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..', + + }, + }, + { + 'target_name': 'both_base_and_installname', + 'type': 'shared_library', + 'sources': [ 'file.c' ], + 'xcode_settings': { + # LD_DYLIB_INSTALL_NAME wins. + 'LD_DYLIB_INSTALL_NAME': 'Still trapped in a dynamiclib factory', + 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..', + }, + }, + { + 'target_name': 'explicit_installname_with_base', + 'type': 'shared_library', + 'sources': [ 'file.c' ], + 'xcode_settings': { + 'LD_DYLIB_INSTALL_NAME': '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)', + }, + }, + { + 'target_name': 'explicit_installname_with_explicit_base', + 'type': 'shared_library', + 'sources': [ 'file.c' ], + 'xcode_settings': { + 'DYLIB_INSTALL_NAME_BASE': '@executable_path/..', + 'LD_DYLIB_INSTALL_NAME': '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)', + }, + }, + { + 'target_name': 'executable', + 'type': 'executable', + 'sources': [ 'main.c' ], + 'xcode_settings': { + 'LD_DYLIB_INSTALL_NAME': 'Should be ignored for not shared_lib', + }, + }, + # Regression test for http://crbug.com/113918 + { + 'target_name': 'install_name_with_info_plist', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'file.c' ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'Info.plist', + 'LD_DYLIB_INSTALL_NAME': '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/kext/GypKext/GypKext-Info.plist b/third_party/python/gyp/test/mac/kext/GypKext/GypKext-Info.plist new file mode 100644 index 0000000000..84226099c1 --- /dev/null +++ b/third_party/python/gyp/test/mac/kext/GypKext/GypKext-Info.plist @@ -0,0 +1,35 @@ + + + + + BuildMachineOSBuild + Doesn't matter, will be overwritten + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.google.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + KEXT + CFBundleShortVersionString + 1.0 + CFBundleSignature + ause + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + OSBundleLibraries + + com.apple.kpi.libkern + 10.0 + + + diff --git a/third_party/python/gyp/test/mac/kext/GypKext/GypKext.c b/third_party/python/gyp/test/mac/kext/GypKext/GypKext.c new file mode 100644 index 0000000000..9b611b0dc5 --- /dev/null +++ b/third_party/python/gyp/test/mac/kext/GypKext/GypKext.c @@ -0,0 +1,16 @@ +// Copyright (c) 2015 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. + +#include +#include + +kern_return_t GypKext_start(kmod_info_t* ki, void* d) { + printf("GypKext has started.\n"); + return KERN_SUCCESS; +} + +kern_return_t GypKext_stop(kmod_info_t* ki, void* d) { + printf("GypKext has stopped.\n"); + return KERN_SUCCESS; +} diff --git a/third_party/python/gyp/test/mac/kext/kext.gyp b/third_party/python/gyp/test/mac/kext/kext.gyp new file mode 100644 index 0000000000..5b93087543 --- /dev/null +++ b/third_party/python/gyp/test/mac/kext/kext.gyp @@ -0,0 +1,18 @@ +# Copyright (c) 2015 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. +{ + 'targets': [ + { + 'target_name': 'gypkext', + 'product_name': 'GypKext', + 'type': 'mac_kernel_extension', + 'sources': [ + 'GypKext/GypKext.c', + ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'GypKext/GypKext-Info.plist', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/ldflags-libtool/file.c b/third_party/python/gyp/test/mac/ldflags-libtool/file.c new file mode 100644 index 0000000000..56757a701b --- /dev/null +++ b/third_party/python/gyp/test/mac/ldflags-libtool/file.c @@ -0,0 +1 @@ +void f() {} diff --git a/third_party/python/gyp/test/mac/ldflags-libtool/test.gyp b/third_party/python/gyp/test/mac/ldflags-libtool/test.gyp new file mode 100644 index 0000000000..4e7aa07106 --- /dev/null +++ b/third_party/python/gyp/test/mac/ldflags-libtool/test.gyp @@ -0,0 +1,17 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'ldflags_passed_to_libtool', + 'type': 'static_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-fblorfen-horf-does-not-exist', + ], + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/ldflags/subdirectory/Info.plist b/third_party/python/gyp/test/mac/ldflags/subdirectory/Info.plist new file mode 100644 index 0000000000..5f5e9abfbb --- /dev/null +++ b/third_party/python/gyp/test/mac/ldflags/subdirectory/Info.plist @@ -0,0 +1,8 @@ + + + + + CFBundleSignature + ???? + + diff --git a/third_party/python/gyp/test/mac/ldflags/subdirectory/file.c b/third_party/python/gyp/test/mac/ldflags/subdirectory/file.c new file mode 100644 index 0000000000..90c45543bf --- /dev/null +++ b/third_party/python/gyp/test/mac/ldflags/subdirectory/file.c @@ -0,0 +1,2 @@ +void f() {} +void g() {} diff --git a/third_party/python/gyp/test/mac/ldflags/subdirectory/symbol_list.def b/third_party/python/gyp/test/mac/ldflags/subdirectory/symbol_list.def new file mode 100644 index 0000000000..0ab7543b1f --- /dev/null +++ b/third_party/python/gyp/test/mac/ldflags/subdirectory/symbol_list.def @@ -0,0 +1 @@ +_f diff --git a/third_party/python/gyp/test/mac/ldflags/subdirectory/test.gyp b/third_party/python/gyp/test/mac/ldflags/subdirectory/test.gyp new file mode 100644 index 0000000000..db00c7465c --- /dev/null +++ b/third_party/python/gyp/test/mac/ldflags/subdirectory/test.gyp @@ -0,0 +1,66 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'raw', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-exported_symbols_list symbol_list.def', + '-sectcreate __TEXT __info_plist Info.plist', + ], + }, + }, + # TODO(thakis): This form should ideally be supported, too. (But + # -Wlfoo,bar,baz is cleaner so people should use that anyway.) + #{ + # 'target_name': 'raw_sep', + # 'type': 'shared_library', + # 'sources': [ 'file.c', ], + # 'xcode_settings': { + # 'OTHER_LDFLAGS': [ + # '-exported_symbols_list', 'symbol_list.def', + # '-sectcreate', '__TEXT', '__info_plist', 'Info.plist', + # ], + # }, + #}, + { + 'target_name': 'wl_space', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + # Works because clang passes unknown files on to the linker. + '-Wl,-exported_symbols_list symbol_list.def', + ], + }, + }, + # TODO(thakis): This form should ideally be supported, too. (But + # -Wlfoo,bar,baz is cleaner so people should use that anyway.) + #{ + # 'target_name': 'wl_space_sep', + # 'type': 'shared_library', + # 'sources': [ 'file.c', ], + # 'xcode_settings': { + # 'OTHER_LDFLAGS': [ + # # Works because clang passes unknown files on to the linker. + # '-Wl,-exported_symbols_list', 'symbol_list.def', + # ], + # }, + #}, + { + 'target_name': 'wl_comma', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-exported_symbols_list,symbol_list.def', + '-Wl,-sectcreate,__TEXT,__info_plist,Info.plist', + ], + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/libraries/subdir/README.txt b/third_party/python/gyp/test/mac/libraries/subdir/README.txt new file mode 100644 index 0000000000..4031ded85f --- /dev/null +++ b/third_party/python/gyp/test/mac/libraries/subdir/README.txt @@ -0,0 +1 @@ +Make things live in a subdirectory, to make sure that DEPTH works correctly. diff --git a/third_party/python/gyp/test/mac/libraries/subdir/hello.cc b/third_party/python/gyp/test/mac/libraries/subdir/hello.cc new file mode 100644 index 0000000000..a43554c8ca --- /dev/null +++ b/third_party/python/gyp/test/mac/libraries/subdir/hello.cc @@ -0,0 +1,10 @@ +// Copyright (c) 2012 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. + +#include + +int main() { + std::cout << "Hello, world!" << std::endl; + return 0; +} diff --git a/third_party/python/gyp/test/mac/libraries/subdir/mylib.c b/third_party/python/gyp/test/mac/libraries/subdir/mylib.c new file mode 100644 index 0000000000..e771991e83 --- /dev/null +++ b/third_party/python/gyp/test/mac/libraries/subdir/mylib.c @@ -0,0 +1,7 @@ +// Copyright (c) 2012 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. + +int my_foo(int x) { + return x + 1; +} diff --git a/third_party/python/gyp/test/mac/libraries/subdir/test.gyp b/third_party/python/gyp/test/mac/libraries/subdir/test.gyp new file mode 100644 index 0000000000..59fef51017 --- /dev/null +++ b/third_party/python/gyp/test/mac/libraries/subdir/test.gyp @@ -0,0 +1,65 @@ +# Copyright (c) 2012 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. + +{ + 'targets': [ + { + 'target_name': 'libraries-test', + 'type': 'executable', + 'sources': [ + 'hello.cc', + ], + 'link_settings': { + 'libraries': [ + 'libcrypto.dylib', + ], + }, + }, + { + # This creates a static library and puts it in a nonstandard location for + # libraries-search-path-test. + 'target_name': 'mylib', + 'type': 'static_library', + 'sources': [ + 'mylib.c', + ], + 'postbuilds': [ + { + 'postbuild_name': 'Make a secret location', + 'action': [ + 'mkdir', + '-p', + '${SRCROOT}/../secret_location', + ], + }, + { + 'postbuild_name': 'Copy to secret location, with secret name', + 'action': [ + 'cp', + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}', + '${SRCROOT}/../secret_location/libmysecretlib.a', + ], + }, + ], + }, + { + 'target_name': 'libraries-search-path-test', + 'type': 'executable', + 'dependencies': [ 'mylib' ], + 'sources': [ + 'hello.cc', + ], + 'xcode_settings': { + 'LIBRARY_SEARCH_PATHS': [ + '<(DEPTH)/secret_location', + ], + }, + 'link_settings': { + 'libraries': [ + 'libmysecretlib.a', + ], + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/libtool-zero/mylib.c b/third_party/python/gyp/test/mac/libtool-zero/mylib.c new file mode 100644 index 0000000000..b26d61bd6b --- /dev/null +++ b/third_party/python/gyp/test/mac/libtool-zero/mylib.c @@ -0,0 +1,7 @@ +// 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. + +int my_foo(int x) { + return x + 1; +} diff --git a/third_party/python/gyp/test/mac/libtool-zero/test.gyp b/third_party/python/gyp/test/mac/libtool-zero/test.gyp new file mode 100644 index 0000000000..0d6ee5535e --- /dev/null +++ b/third_party/python/gyp/test/mac/libtool-zero/test.gyp @@ -0,0 +1,18 @@ +# 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. + +{ + 'targets': [ + { + 'target_name': 'mylib', + 'type': 'static_library', + 'sources': [ + 'mylib.c', + ], + 'xcode_settings': { + 'ARCHS': [ 'i386', 'x86_64' ], + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/loadable-module-bundle-product-extension/src.cc b/third_party/python/gyp/test/mac/loadable-module-bundle-product-extension/src.cc new file mode 100644 index 0000000000..3d878e9697 --- /dev/null +++ b/third_party/python/gyp/test/mac/loadable-module-bundle-product-extension/src.cc @@ -0,0 +1,7 @@ +// 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. + +int test() { + return 1337; +} diff --git a/third_party/python/gyp/test/mac/loadable-module-bundle-product-extension/test.gyp b/third_party/python/gyp/test/mac/loadable-module-bundle-product-extension/test.gyp new file mode 100644 index 0000000000..684a2c02aa --- /dev/null +++ b/third_party/python/gyp/test/mac/loadable-module-bundle-product-extension/test.gyp @@ -0,0 +1,24 @@ +# 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. +{ + 'targets': [{ + 'target_name': 'test', + 'type': 'none', + 'dependencies': ['child_one', 'child_two'], + }, { + 'target_name': 'child_one', + 'product_name': 'Collide', + 'product_extension': 'bar', + 'sources': ['src.cc'], + 'type': 'loadable_module', + 'mac_bundle': 1, + }, { + 'target_name': 'child_two', + 'product_name': 'Collide', + 'product_extension': 'foo', + 'sources': ['src.cc'], + 'type': 'loadable_module', + 'mac_bundle': 1, + }], +} diff --git a/third_party/python/gyp/test/mac/loadable-module/Info.plist b/third_party/python/gyp/test/mac/loadable-module/Info.plist new file mode 100644 index 0000000000..f6607aebd9 --- /dev/null +++ b/third_party/python/gyp/test/mac/loadable-module/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.google.test_loadable_module + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BRPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + CFPlugInDynamicRegisterFunction + + CFPlugInDynamicRegistration + NO + + diff --git a/third_party/python/gyp/test/mac/loadable-module/module.c b/third_party/python/gyp/test/mac/loadable-module/module.c new file mode 100644 index 0000000000..9584538347 --- /dev/null +++ b/third_party/python/gyp/test/mac/loadable-module/module.c @@ -0,0 +1,11 @@ +// Copyright (c) 2011 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. + +int SuperFly() { + return 42; +} + +const char* SuperFoo() { + return "Hello World"; +} diff --git a/third_party/python/gyp/test/mac/loadable-module/test.gyp b/third_party/python/gyp/test/mac/loadable-module/test.gyp new file mode 100644 index 0000000000..3c8a5309d2 --- /dev/null +++ b/third_party/python/gyp/test/mac/loadable-module/test.gyp @@ -0,0 +1,18 @@ +# Copyright (c) 2011 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. + +{ + 'targets': [ + { + 'target_name': 'test_loadable_module', + 'type': 'loadable_module', + 'mac_bundle': 1, + 'sources': [ 'module.c' ], + 'product_extension': 'plugin', + 'xcode_settings': { + 'INFOPLIST_FILE': 'Info.plist', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/lto/asmfile.S b/third_party/python/gyp/test/mac/lto/asmfile.S new file mode 100644 index 0000000000..ea23759a39 --- /dev/null +++ b/third_party/python/gyp/test/mac/lto/asmfile.S @@ -0,0 +1,2 @@ +.globl _asfun +ret diff --git a/third_party/python/gyp/test/mac/lto/ccfile.cc b/third_party/python/gyp/test/mac/lto/ccfile.cc new file mode 100644 index 0000000000..2503afd7b1 --- /dev/null +++ b/third_party/python/gyp/test/mac/lto/ccfile.cc @@ -0,0 +1 @@ +void ccfun() {} diff --git a/third_party/python/gyp/test/mac/lto/cfile.c b/third_party/python/gyp/test/mac/lto/cfile.c new file mode 100644 index 0000000000..d02ef4b8d6 --- /dev/null +++ b/third_party/python/gyp/test/mac/lto/cfile.c @@ -0,0 +1 @@ +void cfun() {} diff --git a/third_party/python/gyp/test/mac/lto/mfile.m b/third_party/python/gyp/test/mac/lto/mfile.m new file mode 100644 index 0000000000..85b7d93afe --- /dev/null +++ b/third_party/python/gyp/test/mac/lto/mfile.m @@ -0,0 +1 @@ +void mfun() {} diff --git a/third_party/python/gyp/test/mac/lto/mmfile.mm b/third_party/python/gyp/test/mac/lto/mmfile.mm new file mode 100644 index 0000000000..beaa3595f8 --- /dev/null +++ b/third_party/python/gyp/test/mac/lto/mmfile.mm @@ -0,0 +1 @@ +void mmfun() {} diff --git a/third_party/python/gyp/test/mac/lto/test.gyp b/third_party/python/gyp/test/mac/lto/test.gyp new file mode 100644 index 0000000000..0a8e85183d --- /dev/null +++ b/third_party/python/gyp/test/mac/lto/test.gyp @@ -0,0 +1,35 @@ +# Copyright (c) 2015 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. +{ + 'targets': [ + { + 'target_name': 'lto', + 'type': 'shared_library', + 'sources': [ + 'cfile.c', + 'mfile.m', + 'ccfile.cc', + 'mmfile.mm', + 'asmfile.S', + ], + 'xcode_settings': { + 'LLVM_LTO': 'YES', + }, + }, + { + 'target_name': 'lto_static', + 'type': 'static_library', + 'sources': [ + 'cfile.c', + 'mfile.m', + 'ccfile.cc', + 'mmfile.mm', + 'asmfile.S', + ], + 'xcode_settings': { + 'LLVM_LTO': 'YES', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/missing-cfbundlesignature/Info.plist b/third_party/python/gyp/test/mac/missing-cfbundlesignature/Info.plist new file mode 100644 index 0000000000..0c31674884 --- /dev/null +++ b/third_party/python/gyp/test/mac/missing-cfbundlesignature/Info.plist @@ -0,0 +1,10 @@ + + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundlePackageType + APPL + + diff --git a/third_party/python/gyp/test/mac/missing-cfbundlesignature/Other-Info.plist b/third_party/python/gyp/test/mac/missing-cfbundlesignature/Other-Info.plist new file mode 100644 index 0000000000..47095281c8 --- /dev/null +++ b/third_party/python/gyp/test/mac/missing-cfbundlesignature/Other-Info.plist @@ -0,0 +1,12 @@ + + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundlePackageType + APPL + CFBundleSignature + F + + diff --git a/third_party/python/gyp/test/mac/missing-cfbundlesignature/Third-Info.plist b/third_party/python/gyp/test/mac/missing-cfbundlesignature/Third-Info.plist new file mode 100644 index 0000000000..5b61fe2664 --- /dev/null +++ b/third_party/python/gyp/test/mac/missing-cfbundlesignature/Third-Info.plist @@ -0,0 +1,12 @@ + + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundlePackageType + APPL + CFBundleSignature + some really long string + + diff --git a/third_party/python/gyp/test/mac/missing-cfbundlesignature/file.c b/third_party/python/gyp/test/mac/missing-cfbundlesignature/file.c new file mode 100644 index 0000000000..237c8ce181 --- /dev/null +++ b/third_party/python/gyp/test/mac/missing-cfbundlesignature/file.c @@ -0,0 +1 @@ +int main() {} diff --git a/third_party/python/gyp/test/mac/missing-cfbundlesignature/test.gyp b/third_party/python/gyp/test/mac/missing-cfbundlesignature/test.gyp new file mode 100644 index 0000000000..b50cc2791a --- /dev/null +++ b/third_party/python/gyp/test/mac/missing-cfbundlesignature/test.gyp @@ -0,0 +1,34 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'mytarget', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'Info.plist', + }, + }, + { + 'target_name': 'myothertarget', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'Other-Info.plist', + }, + }, + { + 'target_name': 'thirdtarget', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'Third-Info.plist', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/non-strs-flattened-to-env/Info.plist b/third_party/python/gyp/test/mac/non-strs-flattened-to-env/Info.plist new file mode 100644 index 0000000000..11fc4b660d --- /dev/null +++ b/third_party/python/gyp/test/mac/non-strs-flattened-to-env/Info.plist @@ -0,0 +1,15 @@ + + + + + + CFBundlePackageType + APPL + CFBundleSignature + ???? + My Variable + ${MY_VAR} + CFlags + ${OTHER_CFLAGS} + + diff --git a/third_party/python/gyp/test/mac/non-strs-flattened-to-env/main.c b/third_party/python/gyp/test/mac/non-strs-flattened-to-env/main.c new file mode 100644 index 0000000000..1711567ef5 --- /dev/null +++ b/third_party/python/gyp/test/mac/non-strs-flattened-to-env/main.c @@ -0,0 +1,7 @@ +// Copyright (c) 2012 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. + +int main() { + return 0; +} diff --git a/third_party/python/gyp/test/mac/non-strs-flattened-to-env/test.gyp b/third_party/python/gyp/test/mac/non-strs-flattened-to-env/test.gyp new file mode 100644 index 0000000000..aaf821c925 --- /dev/null +++ b/third_party/python/gyp/test/mac/non-strs-flattened-to-env/test.gyp @@ -0,0 +1,27 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'main.c', ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'Info.plist', + 'MY_VAR': 'some expansion', + 'OTHER_CFLAGS': [ + # Just some (more than one) random flags. + '-fstack-protector-all', + '-fno-strict-aliasing', + '-DS="A Space"', # Would normally be in 'defines' + ], + }, + 'include_dirs': [ + '$(SDKROOT)/usr/include/libxml2', + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/objc-arc/c-file.c b/third_party/python/gyp/test/mac/objc-arc/c-file.c new file mode 100644 index 0000000000..208935946f --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-arc/c-file.c @@ -0,0 +1,5 @@ +#if __has_feature(objc_arc) || __has_feature(objc_arc_weak) +#error "C files shouldn't be ARC'd!" +#endif + +void c_fun() {} diff --git a/third_party/python/gyp/test/mac/objc-arc/cc-file.cc b/third_party/python/gyp/test/mac/objc-arc/cc-file.cc new file mode 100644 index 0000000000..70deb60b9a --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-arc/cc-file.cc @@ -0,0 +1,5 @@ +#if __has_feature(objc_arc) || __has_feature(objc_arc_weak) +#error "C++ files shouldn't be ARC'd!" +#endif + +void cc_fun() {} diff --git a/third_party/python/gyp/test/mac/objc-arc/m-file-arc-weak.m b/third_party/python/gyp/test/mac/objc-arc/m-file-arc-weak.m new file mode 100644 index 0000000000..4ab7c51a82 --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-arc/m-file-arc-weak.m @@ -0,0 +1,9 @@ +#if __has_feature(objc_arc) +#error "ObjC files without CLANG_ENABLE_OBJC_ARC should not be ARC'd!" +#endif + +#if !__has_feature(objc_arc_weak) +#error "With CLANG_ENABLE_OBJC_WEAK, weak references should be enabled." +#endif + +void m_fun() {} diff --git a/third_party/python/gyp/test/mac/objc-arc/m-file-no-arc.m b/third_party/python/gyp/test/mac/objc-arc/m-file-no-arc.m new file mode 100644 index 0000000000..4f067abb67 --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-arc/m-file-no-arc.m @@ -0,0 +1,9 @@ +#if __has_feature(objc_arc) +#error "ObjC files without CLANG_ENABLE_OBJC_ARC should not be ARC'd!" +#endif + +#if __has_feature(objc_arc_weak) +#error "Without CLANG_ENABLE_OBJC_WEAK, weak references should be disabled." +#endif + +void m_fun() {} diff --git a/third_party/python/gyp/test/mac/objc-arc/m-file.m b/third_party/python/gyp/test/mac/objc-arc/m-file.m new file mode 100644 index 0000000000..8234ba582d --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-arc/m-file.m @@ -0,0 +1,9 @@ +#if !__has_feature(objc_arc) +#error "ObjC files with CLANG_ENABLE_OBJC_ARC should be ARC'd!" +#endif + +#if !__has_feature(objc_arc_weak) +#error "Weak references should always be enabled for ARC." +#endif + +void m_fun() {} diff --git a/third_party/python/gyp/test/mac/objc-arc/mm-file-arc-weak.mm b/third_party/python/gyp/test/mac/objc-arc/mm-file-arc-weak.mm new file mode 100644 index 0000000000..f9d4b6759a --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-arc/mm-file-arc-weak.mm @@ -0,0 +1,9 @@ +#if __has_feature(objc_arc) +#error "ObjC++ files without CLANG_ENABLE_OBJC_ARC should not be ARC'd!" +#endif + +#if !__has_feature(objc_arc_weak) +#error "With CLANG_ENABLE_OBJC_WEAK, weak references should be enabled." +#endif + +void mm_fun() {} diff --git a/third_party/python/gyp/test/mac/objc-arc/mm-file-no-arc.mm b/third_party/python/gyp/test/mac/objc-arc/mm-file-no-arc.mm new file mode 100644 index 0000000000..823f52feba --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-arc/mm-file-no-arc.mm @@ -0,0 +1,9 @@ +#if __has_feature(objc_arc) +#error "ObjC++ files without CLANG_ENABLE_OBJC_ARC should not be ARC'd!" +#endif + +#if __has_feature(objc_arc_weak) +#error "Without CLANG_ENABLE_OBJC_WEAK, weak references should be disabled." +#endif + +void mm_fun() {} diff --git a/third_party/python/gyp/test/mac/objc-arc/mm-file.mm b/third_party/python/gyp/test/mac/objc-arc/mm-file.mm new file mode 100644 index 0000000000..90150ef0b6 --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-arc/mm-file.mm @@ -0,0 +1,9 @@ +#if !__has_feature(objc_arc) +#error "ObjC++ files with CLANG_ENABLE_OBJC_ARC should be ARC'd!" +#endif + +#if !__has_feature(objc_arc_weak) +#error "Weak references should always be enabled for ARC." +#endif + +void mm_fun() {} diff --git a/third_party/python/gyp/test/mac/objc-arc/test.gyp b/third_party/python/gyp/test/mac/objc-arc/test.gyp new file mode 100644 index 0000000000..87ddda962e --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-arc/test.gyp @@ -0,0 +1,53 @@ +# Copyright (c) 2013 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. +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + + 'targets': [ + { + 'target_name': 'arc_enabled', + 'type': 'static_library', + 'sources': [ + 'c-file.c', + 'cc-file.cc', + 'm-file.m', + 'mm-file.mm', + ], + 'xcode_settings': { + 'CLANG_ENABLE_OBJC_ARC': 'YES', + }, + }, + + { + 'target_name': 'weak_enabled', + 'type': 'static_library', + 'sources': [ + 'c-file.c', + 'cc-file.cc', + 'm-file-arc-weak.m', + 'mm-file-arc-weak.mm', + ], + 'xcode_settings': { + 'CLANG_ENABLE_OBJC_WEAK': 'YES', + }, + }, + + { + 'target_name': 'arc_disabled', + 'type': 'static_library', + 'sources': [ + 'c-file.c', + 'cc-file.cc', + 'm-file-no-arc.m', + 'mm-file-no-arc.mm', + ], + 'xcode_settings': { + }, + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/objc-gc/c-file.c b/third_party/python/gyp/test/mac/objc-gc/c-file.c new file mode 100644 index 0000000000..2855a00eaa --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-gc/c-file.c @@ -0,0 +1 @@ +void c_fun() {} diff --git a/third_party/python/gyp/test/mac/objc-gc/cc-file.cc b/third_party/python/gyp/test/mac/objc-gc/cc-file.cc new file mode 100644 index 0000000000..71e47a0126 --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-gc/cc-file.cc @@ -0,0 +1 @@ +void cc_fun() {} diff --git a/third_party/python/gyp/test/mac/objc-gc/main.m b/third_party/python/gyp/test/mac/objc-gc/main.m new file mode 100644 index 0000000000..1a87f8e70f --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-gc/main.m @@ -0,0 +1,6 @@ +#import + +int main() { + printf("gc on: %d\n", [NSGarbageCollector defaultCollector] != NULL); + return 0; +} diff --git a/third_party/python/gyp/test/mac/objc-gc/needs-gc-mm.mm b/third_party/python/gyp/test/mac/objc-gc/needs-gc-mm.mm new file mode 100644 index 0000000000..fc3fee9f34 --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-gc/needs-gc-mm.mm @@ -0,0 +1 @@ +void objcpp_fun() { } diff --git a/third_party/python/gyp/test/mac/objc-gc/needs-gc.m b/third_party/python/gyp/test/mac/objc-gc/needs-gc.m new file mode 100644 index 0000000000..ca77976b1d --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-gc/needs-gc.m @@ -0,0 +1 @@ +void objc_fun() { } diff --git a/third_party/python/gyp/test/mac/objc-gc/test.gyp b/third_party/python/gyp/test/mac/objc-gc/test.gyp new file mode 100644 index 0000000000..4d827c1b39 --- /dev/null +++ b/third_party/python/gyp/test/mac/objc-gc/test.gyp @@ -0,0 +1,102 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + # For some reason, static_library targets that are built with gc=required + # and then linked to executables that don't use gc, the linker doesn't + # complain. For shared_libraries it does, so use that. + { + 'target_name': 'no_gc_lib', + 'type': 'shared_library', + 'sources': [ + 'c-file.c', + 'cc-file.cc', + 'needs-gc-mm.mm', + 'needs-gc.m', + ], + }, + { + 'target_name': 'gc_lib', + 'type': 'shared_library', + 'sources': [ + 'c-file.c', + 'cc-file.cc', + 'needs-gc-mm.mm', + 'needs-gc.m', + ], + 'xcode_settings': { + 'GCC_ENABLE_OBJC_GC': 'supported', + }, + }, + { + 'target_name': 'gc_req_lib', + 'type': 'shared_library', + 'sources': [ + 'c-file.c', + 'cc-file.cc', + 'needs-gc-mm.mm', + 'needs-gc.m', + ], + 'xcode_settings': { + 'GCC_ENABLE_OBJC_GC': 'required', + }, + }, + + { + 'target_name': 'gc_exe_fails', + 'type': 'executable', + 'sources': [ 'main.m' ], + 'dependencies': [ 'no_gc_lib' ], + 'xcode_settings': { + 'GCC_ENABLE_OBJC_GC': 'required', + }, + 'libraries': [ 'Foundation.framework' ], + }, + { + 'target_name': 'gc_req_exe', + 'type': 'executable', + 'sources': [ 'main.m' ], + 'dependencies': [ 'gc_lib' ], + 'xcode_settings': { + 'GCC_ENABLE_OBJC_GC': 'required', + }, + 'libraries': [ 'Foundation.framework' ], + }, + { + 'target_name': 'gc_exe_req_lib', + 'type': 'executable', + 'sources': [ 'main.m' ], + 'dependencies': [ 'gc_req_lib' ], + 'xcode_settings': { + 'GCC_ENABLE_OBJC_GC': 'supported', + }, + 'libraries': [ 'Foundation.framework' ], + }, + { + 'target_name': 'gc_exe', + 'type': 'executable', + 'sources': [ 'main.m' ], + 'dependencies': [ 'gc_lib' ], + 'xcode_settings': { + 'GCC_ENABLE_OBJC_GC': 'supported', + }, + 'libraries': [ 'Foundation.framework' ], + }, + { + 'target_name': 'gc_off_exe_req_lib', + 'type': 'executable', + 'sources': [ 'main.m' ], + 'dependencies': [ 'gc_req_lib' ], + 'libraries': [ 'Foundation.framework' ], + }, + { + 'target_name': 'gc_off_exe', + 'type': 'executable', + 'sources': [ 'main.m' ], + 'dependencies': [ 'gc_lib' ], + 'libraries': [ 'Foundation.framework' ], + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/postbuild-copy-bundle/Framework-Info.plist b/third_party/python/gyp/test/mac/postbuild-copy-bundle/Framework-Info.plist new file mode 100644 index 0000000000..ec36829c08 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-copy-bundle/Framework-Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + RandomKey + RandomValue + + diff --git a/third_party/python/gyp/test/mac/postbuild-copy-bundle/TestApp-Info.plist b/third_party/python/gyp/test/mac/postbuild-copy-bundle/TestApp-Info.plist new file mode 100644 index 0000000000..98fd515200 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-copy-bundle/TestApp-Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.google.${PRODUCT_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/third_party/python/gyp/test/mac/postbuild-copy-bundle/copied.txt b/third_party/python/gyp/test/mac/postbuild-copy-bundle/copied.txt new file mode 100644 index 0000000000..178413886a --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-copy-bundle/copied.txt @@ -0,0 +1 @@ +old copied file diff --git a/third_party/python/gyp/test/mac/postbuild-copy-bundle/empty.c b/third_party/python/gyp/test/mac/postbuild-copy-bundle/empty.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/third_party/python/gyp/test/mac/postbuild-copy-bundle/main.c b/third_party/python/gyp/test/mac/postbuild-copy-bundle/main.c new file mode 100644 index 0000000000..21c1963526 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-copy-bundle/main.c @@ -0,0 +1,4 @@ +// Copyright (c) 2012 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. +int main() {} diff --git a/third_party/python/gyp/test/mac/postbuild-copy-bundle/postbuild-copy-framework.sh b/third_party/python/gyp/test/mac/postbuild-copy-bundle/postbuild-copy-framework.sh new file mode 100755 index 0000000000..930fec6612 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-copy-bundle/postbuild-copy-framework.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Copyright (c) 2012 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. + +set -e + +rsync -acC --delete "$1" "$2" diff --git a/third_party/python/gyp/test/mac/postbuild-copy-bundle/resource_file.sb b/third_party/python/gyp/test/mac/postbuild-copy-bundle/resource_file.sb new file mode 100644 index 0000000000..42057fa235 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-copy-bundle/resource_file.sb @@ -0,0 +1 @@ +This is included in the framework bundle. diff --git a/third_party/python/gyp/test/mac/postbuild-copy-bundle/test.gyp b/third_party/python/gyp/test/mac/postbuild-copy-bundle/test.gyp new file mode 100644 index 0000000000..a03e6432f2 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-copy-bundle/test.gyp @@ -0,0 +1,49 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'test_bundle', + 'product_name': 'My Framework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'empty.c', ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'Framework-Info.plist', + }, + 'mac_bundle_resources': [ + 'resource_file.sb', + ], + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries', + 'files': [ 'copied.txt' ], + }, + ], + }, + { + 'target_name': 'test_app', + 'product_name': 'Test App', + 'type': 'executable', + 'mac_bundle': 1, + 'dependencies': [ + 'test_bundle', + ], + 'sources': [ 'main.c', ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'TestApp-Info.plist', + }, + 'postbuilds': [ + { + 'postbuild_name': 'Copy dependent framework into app', + 'action': [ + './postbuild-copy-framework.sh', + '${BUILT_PRODUCTS_DIR}/My Framework.framework', + '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/', + ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/postbuild-defaults/Info.plist b/third_party/python/gyp/test/mac/postbuild-defaults/Info.plist new file mode 100644 index 0000000000..d3f54d76cd --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-defaults/Info.plist @@ -0,0 +1,13 @@ + + + + + + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleName + ${PRODUCT_NAME} + + diff --git a/third_party/python/gyp/test/mac/postbuild-defaults/main.c b/third_party/python/gyp/test/mac/postbuild-defaults/main.c new file mode 100644 index 0000000000..1711567ef5 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-defaults/main.c @@ -0,0 +1,7 @@ +// Copyright (c) 2012 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. + +int main() { + return 0; +} diff --git a/third_party/python/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh b/third_party/python/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh new file mode 100755 index 0000000000..56af2a8329 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Copyright (c) 2012 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. + +set -e + +# This is the built Info.plist in the output directory. +PLIST="${BUILT_PRODUCTS_DIR}"/Test.app/Contents/Info # No trailing .plist +echo $(defaults read "${PLIST}" "CFBundleName") > "${BUILT_PRODUCTS_DIR}/result" + +# This is the source Info.plist next to this script file. +PLIST="${SRCROOT}"/Info # No trailing .plist +echo $(defaults read "${PLIST}" "CFBundleName") \ + >> "${BUILT_PRODUCTS_DIR}/result" diff --git a/third_party/python/gyp/test/mac/postbuild-defaults/test.gyp b/third_party/python/gyp/test/mac/postbuild-defaults/test.gyp new file mode 100644 index 0000000000..be0a075efc --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-defaults/test.gyp @@ -0,0 +1,26 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'main.c', ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'Info.plist', + }, + 'postbuilds': [ + { + 'postbuild_name': 'Postbuild that calls defaults', + 'action': [ + './postbuild-defaults.sh', + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}', + ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/postbuild-fail/file.c b/third_party/python/gyp/test/mac/postbuild-fail/file.c new file mode 100644 index 0000000000..91695b10c6 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-fail/file.c @@ -0,0 +1,6 @@ +// Copyright (c) 2011 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. + +// That's right, this is copyrighted. +void f() {} diff --git a/third_party/python/gyp/test/mac/postbuild-fail/postbuild-fail.sh b/third_party/python/gyp/test/mac/postbuild-fail/postbuild-fail.sh new file mode 100755 index 0000000000..dc1a60d987 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-fail/postbuild-fail.sh @@ -0,0 +1,6 @@ +#!/usr/bin/bash +# Copyright (c) 2011 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. + +exit 1 diff --git a/third_party/python/gyp/test/mac/postbuild-fail/test.gyp b/third_party/python/gyp/test/mac/postbuild-fail/test.gyp new file mode 100644 index 0000000000..e63283db03 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-fail/test.gyp @@ -0,0 +1,38 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'nonbundle', + 'type': 'static_library', + 'sources': [ 'file.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'Postbuild Fail', + 'action': [ './postbuild-fail.sh', ], + }, + { + 'postbuild_name': 'Runs after failing postbuild', + 'action': [ './touch-static.sh', ], + }, + ], + }, + { + 'target_name': 'bundle', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'file.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'Postbuild Fail', + 'action': [ './postbuild-fail.sh', ], + }, + { + 'postbuild_name': 'Runs after failing postbuild', + 'action': [ './touch-dynamic.sh', ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/postbuild-fail/touch-dynamic.sh b/third_party/python/gyp/test/mac/postbuild-fail/touch-dynamic.sh new file mode 100755 index 0000000000..a388a64102 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-fail/touch-dynamic.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Copyright (c) 2011 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. + +set -e +touch "${BUILT_PRODUCTS_DIR}/dynamic_touch" diff --git a/third_party/python/gyp/test/mac/postbuild-fail/touch-static.sh b/third_party/python/gyp/test/mac/postbuild-fail/touch-static.sh new file mode 100755 index 0000000000..97ecaa6868 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-fail/touch-static.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Copyright (c) 2011 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. + +set -e +touch "${BUILT_PRODUCTS_DIR}/static_touch" diff --git a/third_party/python/gyp/test/mac/postbuild-multiple-configurations/main.c b/third_party/python/gyp/test/mac/postbuild-multiple-configurations/main.c new file mode 100644 index 0000000000..21c1963526 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-multiple-configurations/main.c @@ -0,0 +1,4 @@ +// Copyright (c) 2012 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. +int main() {} diff --git a/third_party/python/gyp/test/mac/postbuild-multiple-configurations/postbuild-touch-file.sh b/third_party/python/gyp/test/mac/postbuild-multiple-configurations/postbuild-touch-file.sh new file mode 100755 index 0000000000..b6170cf7a7 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-multiple-configurations/postbuild-touch-file.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Copyright (c) 2012 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. + +touch "${BUILT_PRODUCTS_DIR}/postbuild-file" diff --git a/third_party/python/gyp/test/mac/postbuild-multiple-configurations/test.gyp b/third_party/python/gyp/test/mac/postbuild-multiple-configurations/test.gyp new file mode 100644 index 0000000000..c350b20d68 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-multiple-configurations/test.gyp @@ -0,0 +1,26 @@ +# Copyright (c) 2012 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. +{ + 'target_defaults': { + 'configurations': { + 'Debug': {}, + 'Release': {}, + }, + }, + 'targets': [ + { + 'target_name': 'random_target', + 'type': 'executable', + 'sources': [ 'main.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'Touch a file.', + 'action': [ + './postbuild-touch-file.sh', + ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/postbuild-static-library/empty.c b/third_party/python/gyp/test/mac/postbuild-static-library/empty.c new file mode 100644 index 0000000000..9554336c0c --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-static-library/empty.c @@ -0,0 +1,4 @@ +// Copyright (c) 2012 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. +void f() {} diff --git a/third_party/python/gyp/test/mac/postbuild-static-library/postbuild-touch-file.sh b/third_party/python/gyp/test/mac/postbuild-static-library/postbuild-touch-file.sh new file mode 100755 index 0000000000..37de4de4f6 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-static-library/postbuild-touch-file.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Copyright (c) 2012 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. + +touch "${BUILT_PRODUCTS_DIR}/$1" diff --git a/third_party/python/gyp/test/mac/postbuild-static-library/test.gyp b/third_party/python/gyp/test/mac/postbuild-static-library/test.gyp new file mode 100644 index 0000000000..9ef55a0afa --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuild-static-library/test.gyp @@ -0,0 +1,34 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'my_lib', + 'type': 'static_library', + 'sources': [ 'empty.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'Postbuild that touches a file', + 'action': [ + './postbuild-touch-file.sh', 'postbuild-file' + ], + }, + ], + }, + + { + 'target_name': 'my_sourceless_lib', + 'type': 'static_library', + 'dependencies': [ 'my_lib' ], + 'postbuilds': [ + { + 'postbuild_name': 'Postbuild that touches a file', + 'action': [ + './postbuild-touch-file.sh', 'postbuild-file-sourceless' + ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/postbuilds/copy.sh b/third_party/python/gyp/test/mac/postbuilds/copy.sh new file mode 100755 index 0000000000..ecad0381db --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuilds/copy.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +cp "$@" diff --git a/third_party/python/gyp/test/mac/postbuilds/file.c b/third_party/python/gyp/test/mac/postbuilds/file.c new file mode 100644 index 0000000000..653e71ff7e --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuilds/file.c @@ -0,0 +1,4 @@ +// Copyright (c) 2011 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. +void f() {} diff --git a/third_party/python/gyp/test/mac/postbuilds/file_g.c b/third_party/python/gyp/test/mac/postbuilds/file_g.c new file mode 100644 index 0000000000..0f7849d208 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuilds/file_g.c @@ -0,0 +1,4 @@ +// Copyright (c) 2012 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. +void g() {} diff --git a/third_party/python/gyp/test/mac/postbuilds/file_h.c b/third_party/python/gyp/test/mac/postbuilds/file_h.c new file mode 100644 index 0000000000..521d1f4d56 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuilds/file_h.c @@ -0,0 +1,4 @@ +// Copyright (c) 2012 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. +void h() {} diff --git a/third_party/python/gyp/test/mac/postbuilds/script/shared_library_postbuild.sh b/third_party/python/gyp/test/mac/postbuilds/script/shared_library_postbuild.sh new file mode 100755 index 0000000000..c623c8bf21 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuilds/script/shared_library_postbuild.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Copyright (c) 2011 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. + +set -e + +lib="${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}" +nm ${lib} > /dev/null # Just make sure this works. + +pattern="${1}" + +if [ $pattern != "a|b" ]; then + echo "Parameter quoting is broken" + exit 1 +fi + +if [ "${2}" != "arg with spaces" ]; then + echo "Parameter space escaping is broken" + exit 1 +fi + +touch "${lib}"_touch diff --git a/third_party/python/gyp/test/mac/postbuilds/script/static_library_postbuild.sh b/third_party/python/gyp/test/mac/postbuilds/script/static_library_postbuild.sh new file mode 100755 index 0000000000..2bf09b34e1 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuilds/script/static_library_postbuild.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Copyright (c) 2011 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. + +set -e + +lib="${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}" +nm ${lib} > /dev/null # Just make sure this works. + +pattern="${1}" + +if [ $pattern != "a|b" ]; then + echo "Parameter quote escaping is broken" + exit 1 +fi + +if [ "${2}" != "arg with spaces" ]; then + echo "Parameter space escaping is broken" + exit 1 +fi + +touch "${lib}"_touch.a diff --git a/third_party/python/gyp/test/mac/postbuilds/subdirectory/copied_file.txt b/third_party/python/gyp/test/mac/postbuilds/subdirectory/copied_file.txt new file mode 100644 index 0000000000..a634f85b6c --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuilds/subdirectory/copied_file.txt @@ -0,0 +1 @@ +This file should be copied to the products dir. diff --git a/third_party/python/gyp/test/mac/postbuilds/subdirectory/nested_target.gyp b/third_party/python/gyp/test/mac/postbuilds/subdirectory/nested_target.gyp new file mode 100644 index 0000000000..6d4f2395e3 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuilds/subdirectory/nested_target.gyp @@ -0,0 +1,53 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'nest_el', + 'type': 'static_library', + 'sources': [ '../file_g.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'Static library postbuild', + 'variables': { + 'some_regex': 'a|b', + }, + 'action': [ + '../script/static_library_postbuild.sh', + '<(some_regex)', + 'arg with spaces', + ], + }, + ], + }, + { + 'target_name': 'nest_dyna', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ '../file_h.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'Dynamic library postbuild', + 'variables': { + 'some_regex': 'a|b', + }, + 'action': [ + '../script/shared_library_postbuild.sh', + '<(some_regex)', + 'arg with spaces', + ], + }, + { + 'postbuild_name': 'Test paths relative to gyp file', + 'action': [ + '../copy.sh', + './copied_file.txt', + '${BUILT_PRODUCTS_DIR}/copied_file_2.txt', + ], + }, + ], + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/postbuilds/test.gyp b/third_party/python/gyp/test/mac/postbuilds/test.gyp new file mode 100644 index 0000000000..7c0b523f86 --- /dev/null +++ b/third_party/python/gyp/test/mac/postbuilds/test.gyp @@ -0,0 +1,93 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'el', + 'type': 'static_library', + 'sources': [ 'file.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'Static library postbuild', + 'variables': { + 'some_regex': 'a|b', + }, + 'action': [ + 'script/static_library_postbuild.sh', + '<(some_regex)', + 'arg with spaces', + ], + }, + { + 'postbuild_name': 'Test variable in gyp file', + 'action': [ + 'cp', + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}', + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}_gyp_touch.a', + ], + }, + ], + }, + { + 'target_name': 'dyna', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'file.c', ], + 'dependencies': [ + 'subdirectory/nested_target.gyp:nest_dyna', + 'subdirectory/nested_target.gyp:nest_el', + ], + 'postbuilds': [ + { + 'postbuild_name': 'Dynamic library postbuild', + 'variables': { + 'some_regex': 'a|b', + }, + 'action': [ + 'script/shared_library_postbuild.sh', + '<(some_regex)', + 'arg with spaces', + ], + }, + { + 'postbuild_name': 'Test variable in gyp file', + 'action': [ + 'cp', + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}', + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}_gyp_touch', + ], + }, + { + 'postbuild_name': 'Test paths relative to gyp file', + 'action': [ + './copy.sh', + 'subdirectory/copied_file.txt', + '${BUILT_PRODUCTS_DIR}', + ], + }, + ], + }, + { + 'target_name': 'dyna_standalone', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'Test variable in gyp file', + 'action': [ + 'cp', + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}', + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}_gyp_touch.dylib', + ], + }, + ], + }, + { + 'target_name': 'EmptyBundle', + 'product_extension': 'bundle', + 'type': 'executable', + 'mac_bundle': 1, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/prefixheader/file.c b/third_party/python/gyp/test/mac/prefixheader/file.c new file mode 100644 index 0000000000..d0b39d1f6d --- /dev/null +++ b/third_party/python/gyp/test/mac/prefixheader/file.c @@ -0,0 +1 @@ +MyInt f() { return 0; } diff --git a/third_party/python/gyp/test/mac/prefixheader/file.cc b/third_party/python/gyp/test/mac/prefixheader/file.cc new file mode 100644 index 0000000000..d0b39d1f6d --- /dev/null +++ b/third_party/python/gyp/test/mac/prefixheader/file.cc @@ -0,0 +1 @@ +MyInt f() { return 0; } diff --git a/third_party/python/gyp/test/mac/prefixheader/file.m b/third_party/python/gyp/test/mac/prefixheader/file.m new file mode 100644 index 0000000000..d0b39d1f6d --- /dev/null +++ b/third_party/python/gyp/test/mac/prefixheader/file.m @@ -0,0 +1 @@ +MyInt f() { return 0; } diff --git a/third_party/python/gyp/test/mac/prefixheader/file.mm b/third_party/python/gyp/test/mac/prefixheader/file.mm new file mode 100644 index 0000000000..d0b39d1f6d --- /dev/null +++ b/third_party/python/gyp/test/mac/prefixheader/file.mm @@ -0,0 +1 @@ +MyInt f() { return 0; } diff --git a/third_party/python/gyp/test/mac/prefixheader/header.h b/third_party/python/gyp/test/mac/prefixheader/header.h new file mode 100644 index 0000000000..0716e500c5 --- /dev/null +++ b/third_party/python/gyp/test/mac/prefixheader/header.h @@ -0,0 +1 @@ +typedef int MyInt; diff --git a/third_party/python/gyp/test/mac/prefixheader/test.gyp b/third_party/python/gyp/test/mac/prefixheader/test.gyp new file mode 100644 index 0000000000..7e6b1af807 --- /dev/null +++ b/third_party/python/gyp/test/mac/prefixheader/test.gyp @@ -0,0 +1,82 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'prefix_header_c', + 'type': 'static_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'GCC_PREFIX_HEADER': 'header.h', + }, + }, + { + 'target_name': 'precompiled_prefix_header_c', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'GCC_PREFIX_HEADER': 'header.h', + 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES', + }, + }, + + { + 'target_name': 'prefix_header_cc', + 'type': 'static_library', + 'sources': [ 'file.cc', ], + 'xcode_settings': { + 'GCC_PREFIX_HEADER': 'header.h', + }, + }, + { + 'target_name': 'precompiled_prefix_header_cc', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'file.cc', ], + 'xcode_settings': { + 'GCC_PREFIX_HEADER': 'header.h', + 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES', + }, + }, + + { + 'target_name': 'prefix_header_m', + 'type': 'static_library', + 'sources': [ 'file.m', ], + 'xcode_settings': { + 'GCC_PREFIX_HEADER': 'header.h', + }, + }, + { + 'target_name': 'precompiled_prefix_header_m', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'file.m', ], + 'xcode_settings': { + 'GCC_PREFIX_HEADER': 'header.h', + 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES', + }, + }, + + { + 'target_name': 'prefix_header_mm', + 'type': 'static_library', + 'sources': [ 'file.mm', ], + 'xcode_settings': { + 'GCC_PREFIX_HEADER': 'header.h', + }, + }, + { + 'target_name': 'precompiled_prefix_header_mm', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'file.mm', ], + 'xcode_settings': { + 'GCC_PREFIX_HEADER': 'header.h', + 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/rebuild/TestApp-Info.plist b/third_party/python/gyp/test/mac/rebuild/TestApp-Info.plist new file mode 100644 index 0000000000..98fd515200 --- /dev/null +++ b/third_party/python/gyp/test/mac/rebuild/TestApp-Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.google.${PRODUCT_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/third_party/python/gyp/test/mac/rebuild/delay-touch.sh b/third_party/python/gyp/test/mac/rebuild/delay-touch.sh new file mode 100755 index 0000000000..7caf105b6e --- /dev/null +++ b/third_party/python/gyp/test/mac/rebuild/delay-touch.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e + +sleep 1 # mtime resolution is 1 sec on unix. +touch "$1" diff --git a/third_party/python/gyp/test/mac/rebuild/empty.c b/third_party/python/gyp/test/mac/rebuild/empty.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/third_party/python/gyp/test/mac/rebuild/main.c b/third_party/python/gyp/test/mac/rebuild/main.c new file mode 100644 index 0000000000..237c8ce181 --- /dev/null +++ b/third_party/python/gyp/test/mac/rebuild/main.c @@ -0,0 +1 @@ +int main() {} diff --git a/third_party/python/gyp/test/mac/rebuild/test.gyp b/third_party/python/gyp/test/mac/rebuild/test.gyp new file mode 100644 index 0000000000..15b4e4ef2f --- /dev/null +++ b/third_party/python/gyp/test/mac/rebuild/test.gyp @@ -0,0 +1,56 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test App', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'main.c', + ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'TestApp-Info.plist', + }, + }, + { + 'target_name': 'test_app_postbuilds', + 'product_name': 'Test App 2', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'main.c', + ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'TestApp-Info.plist', + }, + 'postbuilds': [ + { + 'postbuild_name': 'Postbuild that touches the app binary', + 'action': [ + './delay-touch.sh', '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}', + ], + }, + ], + }, + { + 'target_name': 'test_framework_postbuilds', + 'product_name': 'Test Framework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ + 'empty.c', + ], + 'postbuilds': [ + { + 'postbuild_name': 'Postbuild that touches the framework binary', + 'action': [ + './delay-touch.sh', '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}', + ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/rpath/file.c b/third_party/python/gyp/test/mac/rpath/file.c new file mode 100644 index 0000000000..56757a701b --- /dev/null +++ b/third_party/python/gyp/test/mac/rpath/file.c @@ -0,0 +1 @@ +void f() {} diff --git a/third_party/python/gyp/test/mac/rpath/main.c b/third_party/python/gyp/test/mac/rpath/main.c new file mode 100644 index 0000000000..237c8ce181 --- /dev/null +++ b/third_party/python/gyp/test/mac/rpath/main.c @@ -0,0 +1 @@ +int main() {} diff --git a/third_party/python/gyp/test/mac/rpath/test.gyp b/third_party/python/gyp/test/mac/rpath/test.gyp new file mode 100644 index 0000000000..7255cb7cd2 --- /dev/null +++ b/third_party/python/gyp/test/mac/rpath/test.gyp @@ -0,0 +1,48 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'default_rpath', + 'type': 'shared_library', + 'sources': [ 'file.c' ], + }, + { + 'target_name': 'explicit_rpath', + 'type': 'shared_library', + 'sources': [ 'file.c' ], + 'xcode_settings': { + 'LD_RUNPATH_SEARCH_PATHS': ['@executable_path/.'], + }, + }, + { + 'target_name': 'explicit_rpaths_escaped', + 'type': 'shared_library', + 'sources': [ 'file.c' ], + 'xcode_settings': { + # Xcode requires spaces to be escaped, else it ends up adding two + # independent rpaths. + 'LD_RUNPATH_SEARCH_PATHS': ['First\\ rpath', 'Second\\ rpath'], + }, + }, + { + 'target_name': 'explicit_rpaths_bundle', + 'product_name': 'My Framework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'file.c' ], + 'xcode_settings': { + 'LD_RUNPATH_SEARCH_PATHS': ['@loader_path/.'], + }, + }, + { + 'target_name': 'executable', + 'type': 'executable', + 'sources': [ 'main.c' ], + 'xcode_settings': { + 'LD_RUNPATH_SEARCH_PATHS': ['@executable_path/.'], + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/sdkroot/file.cc b/third_party/python/gyp/test/mac/sdkroot/file.cc new file mode 100644 index 0000000000..13ae971040 --- /dev/null +++ b/third_party/python/gyp/test/mac/sdkroot/file.cc @@ -0,0 +1,5 @@ +#include +using std::map; + +int main() { +} diff --git a/third_party/python/gyp/test/mac/sdkroot/test.gyp b/third_party/python/gyp/test/mac/sdkroot/test.gyp new file mode 100644 index 0000000000..2fc11a0280 --- /dev/null +++ b/third_party/python/gyp/test/mac/sdkroot/test.gyp @@ -0,0 +1,35 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'mytarget', + 'type': 'executable', + 'sources': [ 'file.cc', ], + 'xcode_settings': { + 'SDKROOT': 'macosx%s', + }, + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_shorthand.sh', ], + }, + ], + }, + { + 'target_name': 'absolute', + 'type': 'executable', + 'sources': [ 'file.cc', ], + 'xcode_settings': { + 'SDKROOT': '<(sdk_path)', + }, + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_shorthand.sh', ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/sdkroot/test_shorthand.sh b/third_party/python/gyp/test/mac/sdkroot/test_shorthand.sh new file mode 100755 index 0000000000..ac4ac229ae --- /dev/null +++ b/third_party/python/gyp/test/mac/sdkroot/test_shorthand.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright (c) 2012 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. + +set -e + +found=false +for sdk in 10.6 10.7 10.8 10.9 ; do + if expected=$(xcodebuild -version -sdk macosx$sdk Path 2>/dev/null) ; then + found=true + break + fi +done +if ! $found ; then + echo >&2 "cannot find installed SDK" + exit 1 +fi + +test $SDKROOT = $expected diff --git a/third_party/python/gyp/test/mac/sourceless-module/empty.c b/third_party/python/gyp/test/mac/sourceless-module/empty.c new file mode 100644 index 0000000000..237c8ce181 --- /dev/null +++ b/third_party/python/gyp/test/mac/sourceless-module/empty.c @@ -0,0 +1 @@ +int main() {} diff --git a/third_party/python/gyp/test/mac/sourceless-module/empty.txt b/third_party/python/gyp/test/mac/sourceless-module/empty.txt new file mode 100644 index 0000000000..139597f9cb --- /dev/null +++ b/third_party/python/gyp/test/mac/sourceless-module/empty.txt @@ -0,0 +1,2 @@ + + diff --git a/third_party/python/gyp/test/mac/sourceless-module/fun.c b/third_party/python/gyp/test/mac/sourceless-module/fun.c new file mode 100644 index 0000000000..d64ff8ca23 --- /dev/null +++ b/third_party/python/gyp/test/mac/sourceless-module/fun.c @@ -0,0 +1 @@ +int f() { return 42; } diff --git a/third_party/python/gyp/test/mac/sourceless-module/test.gyp b/third_party/python/gyp/test/mac/sourceless-module/test.gyp new file mode 100644 index 0000000000..cbbe63df02 --- /dev/null +++ b/third_party/python/gyp/test/mac/sourceless-module/test.gyp @@ -0,0 +1,96 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'empty_bundle', + 'type': 'loadable_module', + 'mac_bundle': 1, + }, + { + 'target_name': 'resource_bundle', + 'type': 'loadable_module', + 'mac_bundle': 1, + 'actions': [ + { + 'action_name': 'Add Resource', + 'inputs': [], + 'outputs': [ + '<(INTERMEDIATE_DIR)/app_manifest/foo.manifest', + ], + 'action': [ + 'touch', '<(INTERMEDIATE_DIR)/app_manifest/foo.manifest', + ], + 'process_outputs_as_mac_bundle_resources': 1, + }, + ], + }, + { + 'target_name': 'dependent_on_resource_bundle', + 'type': 'executable', + 'sources': [ 'empty.c' ], + 'dependencies': [ + 'resource_bundle', + ], + }, + + { + 'target_name': 'alib', + 'type': 'static_library', + 'sources': [ 'fun.c' ] + }, + { # No sources, but depends on a static_library so must be linked. + 'target_name': 'resource_framework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'dependencies': [ + 'alib', + ], + 'actions': [ + { + 'action_name': 'Add Resource', + 'inputs': [], + 'outputs': [ + '<(INTERMEDIATE_DIR)/app_manifest/foo.manifest', + ], + 'action': [ + 'touch', '<(INTERMEDIATE_DIR)/app_manifest/foo.manifest', + ], + 'process_outputs_as_mac_bundle_resources': 1, + }, + ], + }, + { + 'target_name': 'dependent_on_resource_framework', + 'type': 'executable', + 'sources': [ 'empty.c' ], + 'dependencies': [ + 'resource_framework', + ], + }, + + { # No actions, but still have resources. + 'target_name': 'mac_resource_bundle_no_actions', + 'product_extension': 'bundle', + 'type': 'executable', + 'mac_bundle': 1, + 'mac_bundle_resources': [ + 'empty.txt', + ], + }, + { + 'target_name': 'bundle_dependent_on_resource_bundle_no_actions', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'empty.c' ], + 'dependencies': [ + 'mac_resource_bundle_no_actions', + ], + 'mac_bundle_resources': [ + '<(PRODUCT_DIR)/mac_resource_bundle_no_actions.bundle', + ], + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/strip/file.c b/third_party/python/gyp/test/mac/strip/file.c new file mode 100644 index 0000000000..a4c504de71 --- /dev/null +++ b/third_party/python/gyp/test/mac/strip/file.c @@ -0,0 +1,22 @@ +// Copyright (c) 2011 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. + +static void the_static_function() {} +__attribute__((used)) void the_used_function() {} + +__attribute__((visibility("hidden"))) __attribute__((used)) + void the_hidden_function() {} +__attribute__((visibility("default"))) __attribute__((used)) + void the_visible_function() {} + +extern const int eci; +__attribute__((used)) int i; +__attribute__((used)) const int ci = 34623; + +void the_function() { + the_static_function(); + the_used_function(); + the_hidden_function(); + the_visible_function(); +} diff --git a/third_party/python/gyp/test/mac/strip/main.c b/third_party/python/gyp/test/mac/strip/main.c new file mode 100644 index 0000000000..b2291a6b09 --- /dev/null +++ b/third_party/python/gyp/test/mac/strip/main.c @@ -0,0 +1,25 @@ +// Copyright (c) 2013 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. + +static void the_static_function() {} +__attribute__((used)) void the_used_function() {} + +__attribute__((visibility("hidden"))) __attribute__((used)) +void the_hidden_function() {} +__attribute__((visibility("default"))) __attribute__((used)) +void the_visible_function() {} + +void the_function() {} + +extern const int eci; +__attribute__((used)) int i; +__attribute__((used)) const int ci = 34623; + +int main() { + the_function(); + the_static_function(); + the_used_function(); + the_hidden_function(); + the_visible_function(); +} diff --git a/third_party/python/gyp/test/mac/strip/strip.saves b/third_party/python/gyp/test/mac/strip/strip.saves new file mode 100644 index 0000000000..b60ca62857 --- /dev/null +++ b/third_party/python/gyp/test/mac/strip/strip.saves @@ -0,0 +1,5 @@ +# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file would list symbols that should not be stripped. diff --git a/third_party/python/gyp/test/mac/strip/subdirectory/nested_file.c b/third_party/python/gyp/test/mac/strip/subdirectory/nested_file.c new file mode 100644 index 0000000000..50daa6c13b --- /dev/null +++ b/third_party/python/gyp/test/mac/strip/subdirectory/nested_file.c @@ -0,0 +1 @@ +void nested_f() {} diff --git a/third_party/python/gyp/test/mac/strip/subdirectory/nested_strip.saves b/third_party/python/gyp/test/mac/strip/subdirectory/nested_strip.saves new file mode 100644 index 0000000000..d434c0ef45 --- /dev/null +++ b/third_party/python/gyp/test/mac/strip/subdirectory/nested_strip.saves @@ -0,0 +1,5 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file would list symbols that should not be stripped. diff --git a/third_party/python/gyp/test/mac/strip/subdirectory/subdirectory.gyp b/third_party/python/gyp/test/mac/strip/subdirectory/subdirectory.gyp new file mode 100644 index 0000000000..5d0d190914 --- /dev/null +++ b/third_party/python/gyp/test/mac/strip/subdirectory/subdirectory.gyp @@ -0,0 +1,38 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'nested_strip_save', + 'type': 'shared_library', + 'sources': [ 'nested_file.c', ], + 'xcode_settings': { + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', + 'CHROMIUM_STRIP_SAVE_FILE': 'nested_strip.saves', + }, + }, + { + 'target_name': 'nested_strip_save_postbuild', + 'type': 'shared_library', + 'sources': [ 'nested_file.c', ], + 'xcode_settings': { + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', + 'CHROMIUM_STRIP_SAVE_FILE': 'nested_strip.saves', + }, + 'postbuilds': [ + { + 'postbuild_name': 'Action that reads CHROMIUM_STRIP_SAVE_FILE', + 'action': [ + './test_reading_save_file_from_postbuild.sh', + ], + }, + ], + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/strip/subdirectory/test_reading_save_file_from_postbuild.sh b/third_party/python/gyp/test/mac/strip/subdirectory/test_reading_save_file_from_postbuild.sh new file mode 100755 index 0000000000..976943680e --- /dev/null +++ b/third_party/python/gyp/test/mac/strip/subdirectory/test_reading_save_file_from_postbuild.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +test -f ${CHROMIUM_STRIP_SAVE_FILE} diff --git a/third_party/python/gyp/test/mac/strip/test-defaults.gyp b/third_party/python/gyp/test/mac/strip/test-defaults.gyp new file mode 100644 index 0000000000..e688b955a7 --- /dev/null +++ b/third_party/python/gyp/test/mac/strip/test-defaults.gyp @@ -0,0 +1,51 @@ +# Copyright (c) 2013 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. +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ], + 'target_defaults': { + 'xcode_settings': { + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + }, + }, + 'targets': [ + { + 'target_name': 'single_dylib', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + }, + { + 'target_name': 'single_so', + 'type': 'loadable_module', + 'sources': [ 'file.c', ], + }, + { + 'target_name': 'single_exe', + 'type': 'executable', + 'sources': [ 'main.c', ], + }, + + { + 'target_name': 'bundle_dylib', + 'type': 'shared_library', + 'mac_bundle': '1', + 'sources': [ 'file.c', ], + }, + { + 'target_name': 'bundle_so', + 'type': 'loadable_module', + 'mac_bundle': '1', + 'sources': [ 'file.c', ], + }, + { + 'target_name': 'bundle_exe', + 'type': 'executable', + 'mac_bundle': '1', + 'sources': [ 'main.c', ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/strip/test.gyp b/third_party/python/gyp/test/mac/strip/test.gyp new file mode 100644 index 0000000000..2558aa91bb --- /dev/null +++ b/third_party/python/gyp/test/mac/strip/test.gyp @@ -0,0 +1,119 @@ +# Copyright (c) 2011 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. + +# These xcode_settings affect stripping: +# "Deployment postprocessing involves stripping the binary, and setting +# its file mode, owner, and group." +#'DEPLOYMENT_POSTPROCESSING': 'YES', + +# "Specifies whether to strip symbol information from the binary. +# Prerequisite: $DEPLOYMENT_POSTPROCESSING = YES" "Default Value: 'NO'" +#'STRIP_INSTALLED_PRODUCT': 'YES', + +# "Values: +# * all: Strips the binary completely, removing the symbol table and +# relocation information +# * non-global: Strips nonglobal symbols but saves external symbols. +# * debugging: Strips debugging symbols but saves local and global +# symbols." +# (maps to no flag, -x, -S in that order) +#'STRIP_STYLE': 'non-global', + +# "Additional strip flags" +#'STRIPFLAGS': '-c', + +# "YES: Copied binaries are stripped of debugging symbols. This does +# not cause the binary produced by the linker to be stripped. Use +# 'STRIP_INSTALLED_PRODUCT (Strip Linked Product)' to have the linker +# strip the binary." +#'COPY_PHASE_STRIP': 'NO', +{ + 'targets': [ + { + 'target_name': 'no_postprocess', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEPLOYMENT_POSTPROCESSING': 'NO', + 'STRIP_INSTALLED_PRODUCT': 'YES', + }, + }, + { + 'target_name': 'no_strip', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'NO', + }, + }, + { + 'target_name': 'strip_all', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + 'STRIP_STYLE': 'all', + }, + }, + { + 'target_name': 'strip_nonglobal', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + 'STRIP_STYLE': 'non-global', + }, + }, + { + 'target_name': 'strip_debugging', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + 'STRIP_STYLE': 'debugging', + }, + }, + { + 'target_name': 'strip_all_custom_flags', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + 'STRIP_STYLE': 'all', + 'STRIPFLAGS': '-c', + }, + }, + { + 'target_name': 'strip_all_bundle', + 'type': 'shared_library', + 'mac_bundle': '1', + 'sources': [ 'file.c', ], + 'xcode_settings': { + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + 'STRIP_STYLE': 'all', + }, + }, + { + 'target_name': 'strip_save', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'dependencies': [ + 'subdirectory/subdirectory.gyp:nested_strip_save', + 'subdirectory/subdirectory.gyp:nested_strip_save_postbuild', + ], + 'xcode_settings': { + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', + 'CHROMIUM_STRIP_SAVE_FILE': 'strip.saves', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/swift-library/Info.plist b/third_party/python/gyp/test/mac/swift-library/Info.plist new file mode 100644 index 0000000000..804990ca5e --- /dev/null +++ b/third_party/python/gyp/test/mac/swift-library/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/third_party/python/gyp/test/mac/swift-library/file.swift b/third_party/python/gyp/test/mac/swift-library/file.swift new file mode 100644 index 0000000000..88db7da5c6 --- /dev/null +++ b/third_party/python/gyp/test/mac/swift-library/file.swift @@ -0,0 +1,9 @@ +import Foundation + +public class GypSwiftTest { + let myProperty = false + + init() { + self.myProperty = true + } +} \ No newline at end of file diff --git a/third_party/python/gyp/test/mac/swift-library/test.gyp b/third_party/python/gyp/test/mac/swift-library/test.gyp new file mode 100644 index 0000000000..373a677cbd --- /dev/null +++ b/third_party/python/gyp/test/mac/swift-library/test.gyp @@ -0,0 +1,21 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'SwiftFramework', + 'product_name': 'SwiftFramework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'xcode_settings': { + 'INFOPLIST_FILE': 'Info.plist', + 'CODE_SIGNING_REQUIRED': 'NO', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + 'sources': [ + 'file.swift', + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/type_envvars/file.c b/third_party/python/gyp/test/mac/type_envvars/file.c new file mode 100644 index 0000000000..9cddaf1b0b --- /dev/null +++ b/third_party/python/gyp/test/mac/type_envvars/file.c @@ -0,0 +1,6 @@ +// Copyright (c) 2011 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. + +void f() {} +int main() {} diff --git a/third_party/python/gyp/test/mac/type_envvars/test.gyp b/third_party/python/gyp/test/mac/type_envvars/test.gyp new file mode 100644 index 0000000000..465670056b --- /dev/null +++ b/third_party/python/gyp/test/mac/type_envvars/test.gyp @@ -0,0 +1,100 @@ +# Copyright (c) 2011 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. +{ + 'targets': [ + { + 'target_name': 'my_app', + 'product_name': 'My App', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'file.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_bundle_executable.sh', ], + }, + ], + }, + { + 'target_name': 'bundle_loadable_module', + 'type': 'loadable_module', + 'mac_bundle': 1, + 'sources': [ 'file.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_bundle_loadable_module.sh', ], + }, + ], + }, + { + 'target_name': 'bundle_shared_library', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ 'file.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_bundle_shared_library.sh', ], + }, + ], + }, + # Types 'static_library' and 'none' can't exist as bundles. + + { + 'target_name': 'nonbundle_executable', + 'type': 'executable', + 'sources': [ 'file.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_nonbundle_executable.sh', ], + }, + ], + }, + { + 'target_name': 'nonbundle_loadable_module', + 'type': 'loadable_module', + 'sources': [ 'file.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_nonbundle_loadable_module.sh', ], + }, + ], + }, + { + 'target_name': 'nonbundle_shared_library', + 'type': 'shared_library', + 'sources': [ 'file.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_nonbundle_shared_library.sh', ], + }, + ], + }, + { + 'target_name': 'nonbundle_static_library', + 'type': 'static_library', + 'sources': [ 'file.c', ], + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_nonbundle_static_library.sh', ], + }, + ], + }, + { + 'target_name': 'nonbundle_none', + 'type': 'none', + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_nonbundle_none.sh', ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/type_envvars/test_bundle_executable.sh b/third_party/python/gyp/test/mac/type_envvars/test_bundle_executable.sh new file mode 100755 index 0000000000..9a08c8f0cc --- /dev/null +++ b/third_party/python/gyp/test/mac/type_envvars/test_bundle_executable.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# Copyright (c) 2012 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. + +set -e + +test $MACH_O_TYPE = mh_execute +test $PRODUCT_TYPE = com.apple.product-type.application +test "${PRODUCT_NAME}" = "My App" +test "${FULL_PRODUCT_NAME}" = "My App.app" + +test "${EXECUTABLE_NAME}" = "My App" +test "${EXECUTABLE_PATH}" = "My App.app/Contents/MacOS/My App" +test "${WRAPPER_NAME}" = "My App.app" + +test "${CONTENTS_FOLDER_PATH}" = "My App.app/Contents" +test "${EXECUTABLE_FOLDER_PATH}" = "My App.app/Contents/MacOS" +test "${UNLOCALIZED_RESOURCES_FOLDER_PATH}" = "My App.app/Contents/Resources" +test "${JAVA_FOLDER_PATH}" = "My App.app/Contents/Resources/Java" +test "${FRAMEWORKS_FOLDER_PATH}" = "My App.app/Contents/Frameworks" +test "${SHARED_FRAMEWORKS_FOLDER_PATH}" = "My App.app/Contents/SharedFrameworks" +test "${SHARED_SUPPORT_FOLDER_PATH}" = "My App.app/Contents/SharedSupport" +test "${PLUGINS_FOLDER_PATH}" = "My App.app/Contents/PlugIns" +test "${XPCSERVICES_FOLDER_PATH}" = "My App.app/Contents/XPCServices" + +[[ ! $DYLIB_INSTALL_NAME_BASE && ${DYLIB_INSTALL_NAME_BASE-_} ]] +[[ ! $LD_DYLIB_INSTALL_NAME && ${LD_DYLIB_INSTALL_NAME-_} ]] + +"$(dirname "$0")/test_check_sdkroot.sh" diff --git a/third_party/python/gyp/test/mac/type_envvars/test_bundle_loadable_module.sh b/third_party/python/gyp/test/mac/type_envvars/test_bundle_loadable_module.sh new file mode 100755 index 0000000000..b5c7638293 --- /dev/null +++ b/third_party/python/gyp/test/mac/type_envvars/test_bundle_loadable_module.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# Copyright (c) 2012 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. + +set -e + +test $MACH_O_TYPE = mh_bundle +test $PRODUCT_TYPE = com.apple.product-type.bundle +test $PRODUCT_NAME = bundle_loadable_module +test $FULL_PRODUCT_NAME = bundle_loadable_module.bundle + +test $EXECUTABLE_NAME = bundle_loadable_module +test $EXECUTABLE_PATH = \ + "bundle_loadable_module.bundle/Contents/MacOS/bundle_loadable_module" +test $WRAPPER_NAME = bundle_loadable_module.bundle + +test $CONTENTS_FOLDER_PATH = bundle_loadable_module.bundle/Contents +test $EXECUTABLE_FOLDER_PATH = bundle_loadable_module.bundle/Contents/MacOS +test $UNLOCALIZED_RESOURCES_FOLDER_PATH = \ + bundle_loadable_module.bundle/Contents/Resources +test $JAVA_FOLDER_PATH = bundle_loadable_module.bundle/Contents/Resources/Java +test $FRAMEWORKS_FOLDER_PATH = bundle_loadable_module.bundle/Contents/Frameworks +test $SHARED_FRAMEWORKS_FOLDER_PATH = \ + bundle_loadable_module.bundle/Contents/SharedFrameworks +test $SHARED_SUPPORT_FOLDER_PATH = \ + bundle_loadable_module.bundle/Contents/SharedSupport +test $PLUGINS_FOLDER_PATH = bundle_loadable_module.bundle/Contents/PlugIns +test $XPCSERVICES_FOLDER_PATH = \ + bundle_loadable_module.bundle/Contents/XPCServices + +[[ ! $DYLIB_INSTALL_NAME_BASE && ${DYLIB_INSTALL_NAME_BASE-_} ]] +[[ ! $LD_DYLIB_INSTALL_NAME && ${LD_DYLIB_INSTALL_NAME-_} ]] + +"$(dirname "$0")/test_check_sdkroot.sh" diff --git a/third_party/python/gyp/test/mac/type_envvars/test_bundle_shared_library.sh b/third_party/python/gyp/test/mac/type_envvars/test_bundle_shared_library.sh new file mode 100755 index 0000000000..9c2dc0626f --- /dev/null +++ b/third_party/python/gyp/test/mac/type_envvars/test_bundle_shared_library.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Copyright (c) 2012 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. + +set -e + +test $MACH_O_TYPE = mh_dylib +test $PRODUCT_TYPE = com.apple.product-type.framework +test $PRODUCT_NAME = bundle_shared_library +test $FULL_PRODUCT_NAME = bundle_shared_library.framework + +test $EXECUTABLE_NAME = bundle_shared_library +test $EXECUTABLE_PATH = \ + "bundle_shared_library.framework/Versions/A/bundle_shared_library" +test $WRAPPER_NAME = bundle_shared_library.framework + +test $CONTENTS_FOLDER_PATH = bundle_shared_library.framework/Versions/A +test $EXECUTABLE_FOLDER_PATH = bundle_shared_library.framework/Versions/A +test $UNLOCALIZED_RESOURCES_FOLDER_PATH = \ + bundle_shared_library.framework/Versions/A/Resources +test $JAVA_FOLDER_PATH = \ + bundle_shared_library.framework/Versions/A/Resources/Java +test $FRAMEWORKS_FOLDER_PATH = \ + bundle_shared_library.framework/Versions/A/Frameworks +test $SHARED_FRAMEWORKS_FOLDER_PATH = \ + bundle_shared_library.framework/Versions/A/SharedFrameworks +test $SHARED_SUPPORT_FOLDER_PATH = \ + bundle_shared_library.framework/Versions/A/Resources +test $PLUGINS_FOLDER_PATH = bundle_shared_library.framework/Versions/A/PlugIns +test $XPCSERVICES_FOLDER_PATH = \ + bundle_shared_library.framework/Versions/A/XPCServices + +test $DYLIB_INSTALL_NAME_BASE = "/Library/Frameworks" +test $LD_DYLIB_INSTALL_NAME = \ + "/Library/Frameworks/bundle_shared_library.framework/Versions/A/bundle_shared_library" + +"$(dirname "$0")/test_check_sdkroot.sh" diff --git a/third_party/python/gyp/test/mac/type_envvars/test_check_sdkroot.sh b/third_party/python/gyp/test/mac/type_envvars/test_check_sdkroot.sh new file mode 100755 index 0000000000..1297dbeff1 --- /dev/null +++ b/third_party/python/gyp/test/mac/type_envvars/test_check_sdkroot.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# 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. + +set -e + +# `xcodebuild -version` output looks like +# Xcode 4.6.3 +# Build version 4H1503 +# or like +# Xcode 4.2 +# Build version 4C199 +# or like +# Xcode 3.2.6 +# Component versions: DevToolsCore-1809.0; DevToolsSupport-1806.0 +# BuildVersion: 10M2518 +# Convert that to '0463', '0420' and '0326' respectively. +function xcodeversion() { + xcodebuild -version | awk '/Xcode ([0-9]+\.[0-9]+(\.[0-9]+)?)/ { + version = $2 + gsub(/\./, "", version) + if (length(version) < 3) { + version = version "0" + } + if (length(version) < 4) { + version = "0" version + } + } + END { print version }' +} + +# Returns true if |string1| is smaller than |string2|. +# This function assumes that both strings represent Xcode version numbers +# as returned by |xcodeversion|. +function smaller() { + local min="$(echo -ne "${1}\n${2}\n" | sort -n | head -n1)" + test "${min}" != "${2}" +} + +if [[ "$(xcodeversion)" < "0500" ]]; then + # Xcode version is older than 5.0, check that SDKROOT is set but empty. + [[ -z "${SDKROOT}" && -z "${SDKROOT-_}" ]] +else + # Xcode version is newer than 5.0, check that SDKROOT is set. + [[ "${SDKROOT}" == "$(xcodebuild -version -sdk '' Path)" ]] +fi diff --git a/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_executable.sh b/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_executable.sh new file mode 100755 index 0000000000..9fbbd95b8d --- /dev/null +++ b/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_executable.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright (c) 2012 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. + +set -e + +# For some reason, Xcode doesn't set MACH_O_TYPE for non-bundle executables. +# Check for "not set", not just "empty": +[[ ! $MACH_O_TYPE && ${MACH_O_TYPE-_} ]] +test $PRODUCT_TYPE = com.apple.product-type.tool +test $PRODUCT_NAME = nonbundle_executable +test $FULL_PRODUCT_NAME = nonbundle_executable + +test $EXECUTABLE_NAME = nonbundle_executable +test $EXECUTABLE_PATH = nonbundle_executable +[[ ! $WRAPPER_NAME && ${WRAPPER_NAME-_} ]] + +[[ ! $CONTENTS_FOLDER_PATH && ${CONTENTS_FOLDER_PATH-_} ]] +[[ ! $EXECUTABLE_FOLDER_PATH && ${EXECUTABLE_FOLDER_PATH-_} ]] +[[ ! $UNLOCALIZED_RESOURCES_FOLDER_PATH \ + && ${UNLOCALIZED_RESOURCES_FOLDER_PATH-_} ]] +[[ ! $JAVA_FOLDER_PATH && ${JAVA_FOLDER_PATH-_} ]] +[[ ! $FRAMEWORKS_FOLDER_PATH && ${FRAMEWORKS_FOLDER_PATH-_} ]] +[[ ! $SHARED_FRAMEWORKS_FOLDER_PATH && ${SHARED_FRAMEWORKS_FOLDER_PATH-_} ]] +[[ ! $SHARED_SUPPORT_FOLDER_PATH && ${SHARED_SUPPORT_FOLDER_PATH-_} ]] +[[ ! $PLUGINS_FOLDER_PATH && ${PLUGINS_FOLDER_PATH-_} ]] +[[ ! $XPCSERVICES_FOLDER_PATH && ${XPCSERVICES_FOLDER_PATH-_} ]] + +[[ ! $DYLIB_INSTALL_NAME_BASE && ${DYLIB_INSTALL_NAME_BASE-_} ]] +[[ ! $LD_DYLIB_INSTALL_NAME && ${LD_DYLIB_INSTALL_NAME-_} ]] + +"$(dirname "$0")/test_check_sdkroot.sh" diff --git a/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_loadable_module.sh b/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_loadable_module.sh new file mode 100755 index 0000000000..b4c3ba976e --- /dev/null +++ b/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_loadable_module.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Copyright (c) 2012 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. + +set -e + +test $MACH_O_TYPE = mh_bundle +test $PRODUCT_TYPE = com.apple.product-type.library.dynamic +test $PRODUCT_NAME = nonbundle_loadable_module +test $FULL_PRODUCT_NAME = nonbundle_loadable_module.so + +test $EXECUTABLE_NAME = nonbundle_loadable_module.so +test $EXECUTABLE_PATH = nonbundle_loadable_module.so +[[ ! $WRAPPER_NAME && ${WRAPPER_NAME-_} ]] + +[[ ! $CONTENTS_FOLDER_PATH && ${CONTENTS_FOLDER_PATH-_} ]] +[[ ! $EXECUTABLE_FOLDER_PATH && ${EXECUTABLE_FOLDER_PATH-_} ]] +[[ ! $UNLOCALIZED_RESOURCES_FOLDER_PATH \ + && ${UNLOCALIZED_RESOURCES_FOLDER_PATH-_} ]] +[[ ! $JAVA_FOLDER_PATH && ${JAVA_FOLDER_PATH-_} ]] +[[ ! $FRAMEWORKS_FOLDER_PATH && ${FRAMEWORKS_FOLDER_PATH-_} ]] +[[ ! $SHARED_FRAMEWORKS_FOLDER_PATH && ${SHARED_FRAMEWORKS_FOLDER_PATH-_} ]] +[[ ! $SHARED_SUPPORT_FOLDER_PATH && ${SHARED_SUPPORT_FOLDER_PATH-_} ]] +[[ ! $PLUGINS_FOLDER_PATH && ${PLUGINS_FOLDER_PATH-_} ]] +[[ ! $XPCSERVICES_FOLDER_PATH && ${XPCSERVICES_FOLDER_PATH-_} ]] + +test $DYLIB_INSTALL_NAME_BASE = "/usr/local/lib" +test $LD_DYLIB_INSTALL_NAME = "/usr/local/lib/nonbundle_loadable_module.so" + +"$(dirname "$0")/test_check_sdkroot.sh" diff --git a/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_none.sh b/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_none.sh new file mode 100755 index 0000000000..e2dc7fd9cd --- /dev/null +++ b/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_none.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright (c) 2012 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. + +set -e + +# Check for "not set", not just "empty": +[[ ! $MACH_O_TYPE && ${MACH_O_TYPE-_} ]] +[[ ! $PRODUCT_TYPE && ${PRODUCT_TYPE-_} ]] +test $PRODUCT_NAME = nonbundle_none +[[ ! $FULL_PRODUCT_NAME && ${FULL_PRODUCT_NAME-_} ]] + +[[ ! $EXECUTABLE_NAME && ${EXECUTABLE_NAME-_} ]] +[[ ! $EXECUTABLE_PATH && ${EXECUTABLE_PATH-_} ]] +[[ ! $WRAPPER_NAME && ${WRAPPER_NAME-_} ]] + +[[ ! $CONTENTS_FOLDER_PATH && ${CONTENTS_FOLDER_PATH-_} ]] +[[ ! $EXECUTABLE_FOLDER_PATH && ${EXECUTABLE_FOLDER_PATH-_} ]] +[[ ! $UNLOCALIZED_RESOURCES_FOLDER_PATH \ + && ${UNLOCALIZED_RESOURCES_FOLDER_PATH-_} ]] +[[ ! $JAVA_FOLDER_PATH && ${JAVA_FOLDER_PATH-_} ]] +[[ ! $FRAMEWORKS_FOLDER_PATH && ${FRAMEWORKS_FOLDER_PATH-_} ]] +[[ ! $SHARED_FRAMEWORKS_FOLDER_PATH && ${SHARED_FRAMEWORKS_FOLDER_PATH-_} ]] +[[ ! $SHARED_SUPPORT_FOLDER_PATH && ${SHARED_SUPPORT_FOLDER_PATH-_} ]] +[[ ! $PLUGINS_FOLDER_PATH && ${PLUGINS_FOLDER_PATH-_} ]] +[[ ! $XPCSERVICES_FOLDER_PATH && ${XPCSERVICES_FOLDER_PATH-_} ]] + +[[ ! $DYLIB_INSTALL_NAME_BASE && ${DYLIB_INSTALL_NAME_BASE-_} ]] +[[ ! $LD_DYLIB_INSTALL_NAME && ${LD_DYLIB_INSTALL_NAME-_} ]] + +"$(dirname "$0")/test_check_sdkroot.sh" diff --git a/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_shared_library.sh b/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_shared_library.sh new file mode 100755 index 0000000000..ba63ec1a48 --- /dev/null +++ b/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_shared_library.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Copyright (c) 2012 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. + +set -e + +test $MACH_O_TYPE = mh_dylib +test $PRODUCT_TYPE = com.apple.product-type.library.dynamic +test $PRODUCT_NAME = nonbundle_shared_library +test $FULL_PRODUCT_NAME = libnonbundle_shared_library.dylib + +test $EXECUTABLE_NAME = libnonbundle_shared_library.dylib +test $EXECUTABLE_PATH = libnonbundle_shared_library.dylib +[[ ! $WRAPPER_NAME && ${WRAPPER_NAME-_} ]] + +[[ ! $CONTENTS_FOLDER_PATH && ${CONTENTS_FOLDER_PATH-_} ]] +[[ ! $EXECUTABLE_FOLDER_PATH && ${EXECUTABLE_FOLDER_PATH-_} ]] +[[ ! $UNLOCALIZED_RESOURCES_FOLDER_PATH && \ + ${UNLOCALIZED_RESOURCES_FOLDER_PATH-_} ]] +[[ ! $JAVA_FOLDER_PATH && ${JAVA_FOLDER_PATH-_} ]] +[[ ! $FRAMEWORKS_FOLDER_PATH && ${FRAMEWORKS_FOLDER_PATH-_} ]] +[[ ! $SHARED_FRAMEWORKS_FOLDER_PATH && ${SHARED_FRAMEWORKS_FOLDER_PATH-_} ]] +[[ ! $SHARED_SUPPORT_FOLDER_PATH && ${SHARED_SUPPORT_FOLDER_PATH-_} ]] +[[ ! $PLUGINS_FOLDER_PATH && ${PLUGINS_FOLDER_PATH-_} ]] +[[ ! $XPCSERVICES_FOLDER_PATH && ${XPCSERVICES_FOLDER_PATH-_} ]] + +test $DYLIB_INSTALL_NAME_BASE = "/usr/local/lib" +test $LD_DYLIB_INSTALL_NAME = "/usr/local/lib/libnonbundle_shared_library.dylib" + +"$(dirname "$0")/test_check_sdkroot.sh" diff --git a/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_static_library.sh b/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_static_library.sh new file mode 100755 index 0000000000..63aac57b0b --- /dev/null +++ b/third_party/python/gyp/test/mac/type_envvars/test_nonbundle_static_library.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Copyright (c) 2012 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. + +set -e + +test $MACH_O_TYPE = staticlib +test $PRODUCT_TYPE = com.apple.product-type.library.static +test $PRODUCT_NAME = nonbundle_static_library +test $FULL_PRODUCT_NAME = libnonbundle_static_library.a + +test $EXECUTABLE_NAME = libnonbundle_static_library.a +test $EXECUTABLE_PATH = libnonbundle_static_library.a +[[ ! $WRAPPER_NAME && ${WRAPPER_NAME-_} ]] + +[[ ! $CONTENTS_FOLDER_PATH && ${CONTENTS_FOLDER_PATH-_} ]] +[[ ! $EXECUTABLE_FOLDER_PATH && ${EXECUTABLE_FOLDER_PATH-_} ]] +[[ ! $UNLOCALIZED_RESOURCES_FOLDER_PATH && \ + ${UNLOCALIZED_RESOURCES_FOLDER_PATH-_} ]] +[[ ! $JAVA_FOLDER_PATH && ${JAVA_FOLDER_PATH-_} ]] +[[ ! $FRAMEWORKS_FOLDER_PATH && ${FRAMEWORKS_FOLDER_PATH-_} ]] +[[ ! $SHARED_FRAMEWORKS_FOLDER_PATH && ${SHARED_FRAMEWORKS_FOLDER_PATH-_} ]] +[[ ! $SHARED_SUPPORT_FOLDER_PATH && ${SHARED_SUPPORT_FOLDER_PATH-_} ]] +[[ ! $PLUGINS_FOLDER_PATH && ${PLUGINS_FOLDER_PATH-_} ]] +[[ ! $XPCSERVICES_FOLDER_PATH && ${XPCSERVICES_FOLDER_PATH-_} ]] + +[[ ! $DYLIB_INSTALL_NAME_BASE && ${DYLIB_INSTALL_NAME_BASE-_} ]] +[[ ! $LD_DYLIB_INSTALL_NAME && ${LD_DYLIB_INSTALL_NAME-_} ]] + +"$(dirname "$0")/test_check_sdkroot.sh" diff --git a/third_party/python/gyp/test/mac/unicode-settings/file.cc b/third_party/python/gyp/test/mac/unicode-settings/file.cc new file mode 100644 index 0000000000..b2f997621b --- /dev/null +++ b/third_party/python/gyp/test/mac/unicode-settings/file.cc @@ -0,0 +1,2 @@ +int main() { +} diff --git a/third_party/python/gyp/test/mac/unicode-settings/test.gyp b/third_party/python/gyp/test/mac/unicode-settings/test.gyp new file mode 100644 index 0000000000..b331ae453f --- /dev/null +++ b/third_party/python/gyp/test/mac/unicode-settings/test.gyp @@ -0,0 +1,23 @@ +# Copyright 2013 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. + +{ + 'targets': [ + { + 'target_name': 'myapp', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ 'file.cc', ], + 'xcode_settings': { + 'BUNDLE_DISPLAY_NAME': 'α\011', + }, + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_bundle_display_name.sh', ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/unicode-settings/test_bundle_display_name.sh b/third_party/python/gyp/test/mac/unicode-settings/test_bundle_display_name.sh new file mode 100755 index 0000000000..95dd6267a3 --- /dev/null +++ b/third_party/python/gyp/test/mac/unicode-settings/test_bundle_display_name.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Copyright 2013 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. + +test "${BUNDLE_DISPLAY_NAME}" = 'α ' diff --git a/third_party/python/gyp/test/mac/xcode-env-order/Info.plist b/third_party/python/gyp/test/mac/xcode-env-order/Info.plist new file mode 100644 index 0000000000..e11f21e52d --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-env-order/Info.plist @@ -0,0 +1,56 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.google.${PRODUCT_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + BraceProcessedKey1 + ${BRACE_DEPENDENT_KEY1} + BraceProcessedKey2 + ${BRACE_DEPENDENT_KEY2} + BraceProcessedKey3 + ${BRACE_DEPENDENT_KEY3} + + ParenProcessedKey1 + ${PAREN_DEPENDENT_KEY1} + ParenProcessedKey2 + ${PAREN_DEPENDENT_KEY2} + ParenProcessedKey3 + ${PAREN_DEPENDENT_KEY3} + + BareProcessedKey1 + ${BARE_DEPENDENT_KEY1} + BareProcessedKey2 + ${BARE_DEPENDENT_KEY2} + BareProcessedKey3 + ${BARE_DEPENDENT_KEY3} + + MixedProcessedKey + ${MIXED_DEPENDENT_KEY} + + diff --git a/third_party/python/gyp/test/mac/xcode-env-order/file.ext1 b/third_party/python/gyp/test/mac/xcode-env-order/file.ext1 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/third_party/python/gyp/test/mac/xcode-env-order/file.ext2 b/third_party/python/gyp/test/mac/xcode-env-order/file.ext2 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/third_party/python/gyp/test/mac/xcode-env-order/file.ext3 b/third_party/python/gyp/test/mac/xcode-env-order/file.ext3 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/third_party/python/gyp/test/mac/xcode-env-order/main.c b/third_party/python/gyp/test/mac/xcode-env-order/main.c new file mode 100644 index 0000000000..1bf4b2a11a --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-env-order/main.c @@ -0,0 +1,7 @@ +// Copyright (c) 2011 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. + +int main() { + return 0; +} diff --git a/third_party/python/gyp/test/mac/xcode-env-order/test.gyp b/third_party/python/gyp/test/mac/xcode-env-order/test.gyp new file mode 100644 index 0000000000..8f975f7d6b --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-env-order/test.gyp @@ -0,0 +1,121 @@ +# Copyright (c) 2012 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. +{ + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'main.c', + 'file.ext1', + 'file.ext2', + 'file.ext3', + ], + # Env vars in copies. + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/${PRODUCT_NAME}-copy-brace', + 'files': [ 'main.c', ], # ${SOURCE_ROOT} doesn't work with xcode + }, + { + 'destination': '<(PRODUCT_DIR)/$(PRODUCT_NAME)-copy-paren', + 'files': [ '$(SOURCE_ROOT)/main.c', ], + }, + { + 'destination': '<(PRODUCT_DIR)/$PRODUCT_NAME-copy-bare', + 'files': [ 'main.c', ], # $SOURCE_ROOT doesn't work with xcode + }, + ], + # Env vars in actions. The $FOO's are here to test that env vars that + # aren't defined are handled in some way that doesn't break the build. + 'actions': [ + { + 'action_name': 'Action copy braces ${PRODUCT_NAME} ${FOO}', + 'description': 'Action copy braces ${PRODUCT_NAME} ${FOO}', + 'inputs': [ '${SOURCE_ROOT}/main.c' ], + # Referencing ${PRODUCT_NAME} in action outputs doesn't work with + # the Xcode generator (PRODUCT_NAME expands to "Test Support"). + 'outputs': [ '<(PRODUCT_DIR)/action-copy-brace.txt' ], + 'action': [ 'cp', '${SOURCE_ROOT}/main.c', + '<(PRODUCT_DIR)/action-copy-brace.txt' ], + }, + { + 'action_name': 'Action copy parens $(PRODUCT_NAME) $(FOO)', + 'description': 'Action copy parens $(PRODUCT_NAME) $(FOO)', + 'inputs': [ '$(SOURCE_ROOT)/main.c' ], + # Referencing $(PRODUCT_NAME) in action outputs doesn't work with + # the Xcode generator (PRODUCT_NAME expands to "Test Support"). + 'outputs': [ '<(PRODUCT_DIR)/action-copy-paren.txt' ], + 'action': [ 'cp', '$(SOURCE_ROOT)/main.c', + '<(PRODUCT_DIR)/action-copy-paren.txt' ], + }, + { + 'action_name': 'Action copy bare $PRODUCT_NAME $FOO', + 'description': 'Action copy bare $PRODUCT_NAME $FOO', + 'inputs': [ '$SOURCE_ROOT/main.c' ], + # Referencing $PRODUCT_NAME in action outputs doesn't work with + # the Xcode generator (PRODUCT_NAME expands to "Test Support"). + 'outputs': [ '<(PRODUCT_DIR)/action-copy-bare.txt' ], + 'action': [ 'cp', '$SOURCE_ROOT/main.c', + '<(PRODUCT_DIR)/action-copy-bare.txt' ], + }, + ], + # Env vars in xcode_settings. + 'xcode_settings': { + 'INFOPLIST_FILE': 'Info.plist', + 'STRING_KEY': '/Source/Project', + + 'BRACE_DEPENDENT_KEY2': '${STRING_KEY}/${PRODUCT_NAME}', + 'BRACE_DEPENDENT_KEY1': 'D:${BRACE_DEPENDENT_KEY2}', + 'BRACE_DEPENDENT_KEY3': '${PRODUCT_TYPE}:${BRACE_DEPENDENT_KEY1}', + + 'PAREN_DEPENDENT_KEY2': '$(STRING_KEY)/$(PRODUCT_NAME)', + 'PAREN_DEPENDENT_KEY1': 'D:$(PAREN_DEPENDENT_KEY2)', + 'PAREN_DEPENDENT_KEY3': '$(PRODUCT_TYPE):$(PAREN_DEPENDENT_KEY1)', + + 'BARE_DEPENDENT_KEY2': '$STRING_KEY/$PRODUCT_NAME', + 'BARE_DEPENDENT_KEY1': 'D:$BARE_DEPENDENT_KEY2', + 'BARE_DEPENDENT_KEY3': '$PRODUCT_TYPE:$BARE_DEPENDENT_KEY1', + + 'MIXED_DEPENDENT_KEY': '${STRING_KEY}:$(PRODUCT_NAME):$MACH_O_TYPE', + }, + # Env vars in rules. The $FOO's are here to test that env vars that + # aren't defined are handled in some way that doesn't break the build. + 'rules': [ + { + 'rule_name': 'brace_rule', + 'message': 'Rule braces ${PRODUCT_NAME} ${FOO} <(RULE_INPUT_NAME)', + 'extension': 'ext1', + 'inputs': [ '${SOURCE_ROOT}/main.c' ], + 'outputs': [ '<(PRODUCT_DIR)/rule-copy-brace.txt' ], + 'action': [ 'cp', '${SOURCE_ROOT}/main.c', + '<(PRODUCT_DIR)/rule-copy-brace.txt' ], + }, + { + 'rule_name': 'paren_rule', + 'message': 'Rule parens $(PRODUCT_NAME) $(FOO) <(RULE_INPUT_NAME)', + 'extension': 'ext2', + 'inputs': [ '$(SOURCE_ROOT)/main.c' ], + 'outputs': [ '<(PRODUCT_DIR)/rule-copy-paren.txt' ], + 'action': [ 'cp', '$(SOURCE_ROOT)/main.c', + '<(PRODUCT_DIR)/rule-copy-paren.txt' ], + }, + # TODO: Fails in xcode. Looks like a bug in the xcode generator though + # (which uses makefiles for rules, and thinks $PRODUCT_NAME is + # $(P)RODUCT_NAME). + #{ + # 'rule_name': 'bare_rule', + # 'message': 'Rule copy bare $PRODUCT_NAME $FOO', + # 'extension': 'ext3', + # 'inputs': [ '$SOURCE_ROOT/main.c' ], + # 'outputs': [ '<(PRODUCT_DIR)/rule-copy-bare.txt' ], + # 'action': [ 'cp', '$SOURCE_ROOT/main.c', + # '<(PRODUCT_DIR)/rule-copy-bare.txt' ], + #}, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/xcode-gcc/aliasing.cc b/third_party/python/gyp/test/mac/xcode-gcc/aliasing.cc new file mode 100644 index 0000000000..16a41efb15 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-gcc/aliasing.cc @@ -0,0 +1,13 @@ +#include + +void check(int* h, long* k) { + *h = 1; + *k = 0; + printf("%d\n", *h); +} + +int main(void) { + long k; + check((int*)&k, &k); + return 0; +} diff --git a/third_party/python/gyp/test/mac/xcode-gcc/test-clang.gyp b/third_party/python/gyp/test/mac/xcode-gcc/test-clang.gyp new file mode 100644 index 0000000000..9f4a98ae73 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-gcc/test-clang.gyp @@ -0,0 +1,42 @@ +# Copyright (c) 2013 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. +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + + 'targets': [ + { + 'target_name': 'aliasing_yes', + 'type': 'executable', + 'sources': [ 'aliasing.cc', ], + 'xcode_settings': { + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'GCC_STRICT_ALIASING': 'YES', + 'GCC_OPTIMIZATION_LEVEL': 2, + }, + }, + { + 'target_name': 'aliasing_no', + 'type': 'executable', + 'sources': [ 'aliasing.cc', ], + 'xcode_settings': { + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'GCC_STRICT_ALIASING': 'NO', + 'GCC_OPTIMIZATION_LEVEL': 2, + }, + }, + { + 'target_name': 'aliasing_default', + 'type': 'executable', + 'sources': [ 'aliasing.cc', ], + 'xcode_settings': { + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'GCC_OPTIMIZATION_LEVEL': 2, + }, + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/xcode-gcc/test.gyp b/third_party/python/gyp/test/mac/xcode-gcc/test.gyp new file mode 100644 index 0000000000..1ca8b215d8 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-gcc/test.gyp @@ -0,0 +1,60 @@ +# Copyright (c) 2012 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. +{ + 'target_defaults': { + 'xcode_settings': { + 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', + }, + }, + + 'variables': { + # Non-failing tests should check that these trivial files in every language + # still compile correctly. + 'valid_sources': [ + 'valid_c.c', + 'valid_cc.cc', + 'valid_m.m', + 'valid_mm.mm', + ], + }, + + # Targets come in pairs: 'foo' and 'foo-fail', with the former building with + # no warnings and the latter not. + 'targets': [ + # GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO (default: YES): + { + 'target_name': 'warn_about_invalid_offsetof_macro', + 'type': 'executable', + 'sources': [ + 'warn_about_invalid_offsetof_macro.cc', + '<@(valid_sources)', + ], + 'xcode_settings': { + 'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'NO', + }, + }, + { + 'target_name': 'warn_about_invalid_offsetof_macro-fail', + 'type': 'executable', + 'sources': [ 'warn_about_invalid_offsetof_macro.cc', ], + }, + # GCC_WARN_ABOUT_MISSING_NEWLINE (default: NO): + { + 'target_name': 'warn_about_missing_newline', + 'type': 'executable', + 'sources': [ + 'warn_about_missing_newline.c', + '<@(valid_sources)', + ], + }, + { + 'target_name': 'warn_about_missing_newline-fail', + 'type': 'executable', + 'sources': [ 'warn_about_missing_newline.c', ], + 'xcode_settings': { + 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/mac/xcode-gcc/valid_c.c b/third_party/python/gyp/test/mac/xcode-gcc/valid_c.c new file mode 100644 index 0000000000..2b10ac3ed7 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-gcc/valid_c.c @@ -0,0 +1,8 @@ +// Copyright (c) 2012 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. + +// This file exists to test that valid C files compile correctly. + +void FunctionInCFile(void) { +} diff --git a/third_party/python/gyp/test/mac/xcode-gcc/valid_cc.cc b/third_party/python/gyp/test/mac/xcode-gcc/valid_cc.cc new file mode 100644 index 0000000000..31cddc3c9c --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-gcc/valid_cc.cc @@ -0,0 +1,8 @@ +// Copyright (c) 2012 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. + +// This file exists to test that valid C++ files compile correctly. + +void FunctionInCCFile() { +} diff --git a/third_party/python/gyp/test/mac/xcode-gcc/valid_m.m b/third_party/python/gyp/test/mac/xcode-gcc/valid_m.m new file mode 100644 index 0000000000..95bddb2723 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-gcc/valid_m.m @@ -0,0 +1,8 @@ +// Copyright (c) 2012 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. + +// This file exists to test that valid Objective-C files compile correctly. + +void FunctionInMFile(void) { +} diff --git a/third_party/python/gyp/test/mac/xcode-gcc/valid_mm.mm b/third_party/python/gyp/test/mac/xcode-gcc/valid_mm.mm new file mode 100644 index 0000000000..a7db7e3ad6 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-gcc/valid_mm.mm @@ -0,0 +1,8 @@ +// Copyright (c) 2012 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. + +// This file exists to test that valid Objective-C++ files compile correctly. + +void FunctionInMMFile() { +} diff --git a/third_party/python/gyp/test/mac/xcode-gcc/warn_about_invalid_offsetof_macro.cc b/third_party/python/gyp/test/mac/xcode-gcc/warn_about_invalid_offsetof_macro.cc new file mode 100644 index 0000000000..4a4612be0d --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-gcc/warn_about_invalid_offsetof_macro.cc @@ -0,0 +1,15 @@ +// Copyright (c) 2012 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. + +#define offsetof(st, m) ((unsigned)((char*)&((st*)0)->m - (char*)0)) + +struct MyStruct { + virtual void MyFunc() = 0; + int my_member; +}; + +int main() { + unsigned x = offsetof(MyStruct, my_member); + return x ? 0 : 1; +} diff --git a/third_party/python/gyp/test/mac/xcode-gcc/warn_about_missing_newline.c b/third_party/python/gyp/test/mac/xcode-gcc/warn_about_missing_newline.c new file mode 100644 index 0000000000..6faf0895db --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-gcc/warn_about_missing_newline.c @@ -0,0 +1,8 @@ +// Copyright (c) 2012 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. + +// Important: Don't terminate this file with a newline. +int main() { + return 0; +} \ No newline at end of file diff --git a/third_party/python/gyp/test/mac/xcode-support-actions/source.c b/third_party/python/gyp/test/mac/xcode-support-actions/source.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/third_party/python/gyp/test/mac/xcode-support-actions/test.gyp b/third_party/python/gyp/test/mac/xcode-support-actions/test.gyp new file mode 100644 index 0000000000..ad81b8c456 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcode-support-actions/test.gyp @@ -0,0 +1,26 @@ +# 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. +{ + 'targets': [ + { + 'target_name': 'target', + 'product_name': 'Product', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ + '<(PRODUCT_DIR)/copy.c', + ], + 'actions': [ + { + 'action_name': 'Helper', + 'description': 'Helps', + 'inputs': [ 'source.c' ], + 'outputs': [ '<(PRODUCT_DIR)/copy.c' ], + 'action': [ 'cp', '${SOURCE_ROOT}/source.c', + '<(PRODUCT_DIR)/copy.c' ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/xctest/MyClass.h b/third_party/python/gyp/test/mac/xctest/MyClass.h new file mode 100644 index 0000000000..dde13aa33d --- /dev/null +++ b/third_party/python/gyp/test/mac/xctest/MyClass.h @@ -0,0 +1,8 @@ +// Copyright (c) 2013 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. + +#import + +@interface MyClass : NSObject +@end diff --git a/third_party/python/gyp/test/mac/xctest/MyClass.m b/third_party/python/gyp/test/mac/xctest/MyClass.m new file mode 100644 index 0000000000..df11471b07 --- /dev/null +++ b/third_party/python/gyp/test/mac/xctest/MyClass.m @@ -0,0 +1,8 @@ +// Copyright (c) 2013 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. + +#import "MyClass.h" + +@implementation MyClass +@end diff --git a/third_party/python/gyp/test/mac/xctest/TestCase.m b/third_party/python/gyp/test/mac/xctest/TestCase.m new file mode 100644 index 0000000000..36846a1fda --- /dev/null +++ b/third_party/python/gyp/test/mac/xctest/TestCase.m @@ -0,0 +1,16 @@ +// Copyright (c) 2013 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. + +#import +#import "MyClass.h" + +@interface TestCase : XCTestCase +@end + +@implementation TestCase +- (void)testFoo { + MyClass *foo = [[MyClass alloc] init]; + XCTAssertNotNil(foo, @"expected non-nil object"); +} +@end diff --git a/third_party/python/gyp/test/mac/xctest/resource.txt b/third_party/python/gyp/test/mac/xctest/resource.txt new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/third_party/python/gyp/test/mac/xctest/resource.txt @@ -0,0 +1 @@ +foo diff --git a/third_party/python/gyp/test/mac/xctest/test.gyp b/third_party/python/gyp/test/mac/xctest/test.gyp new file mode 100644 index 0000000000..ac25656b35 --- /dev/null +++ b/third_party/python/gyp/test/mac/xctest/test.gyp @@ -0,0 +1,47 @@ +# Copyright (c) 2013 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. + +{ + 'targets': [ + { + 'target_name': 'classes', + 'type': 'static_library', + 'sources': [ + 'MyClass.h', + 'MyClass.m', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + ], + }, + }, + { + 'target_name': 'tests', + 'type': 'loadable_module', + 'mac_xctest_bundle': 1, + 'sources': [ + 'TestCase.m', + ], + 'dependencies': [ + 'classes', + ], + 'mac_bundle_resources': [ + 'resource.txt', + ], + 'xcode_settings': { + 'WRAPPER_EXTENSION': 'xctest', + 'FRAMEWORK_SEARCH_PATHS': [ + '$(inherited)', + '$(DEVELOPER_FRAMEWORKS_DIR)', + ], + 'OTHER_LDFLAGS': [ + '$(inherited)', + '-ObjC', + ], + }, + }, + ], +} + diff --git a/third_party/python/gyp/test/mac/xctest/test.xcodeproj/xcshareddata/xcschemes/classes.xcscheme b/third_party/python/gyp/test/mac/xctest/test.xcodeproj/xcshareddata/xcschemes/classes.xcscheme new file mode 100644 index 0000000000..6bd1bb9696 --- /dev/null +++ b/third_party/python/gyp/test/mac/xctest/test.xcodeproj/xcshareddata/xcschemes/classes.xcscheme @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/third_party/python/gyp/test/mac/xcuitest/Info.plist b/third_party/python/gyp/test/mac/xcuitest/Info.plist new file mode 100644 index 0000000000..ae8852b836 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.h b/third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.h new file mode 100644 index 0000000000..445be2cb42 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.h @@ -0,0 +1,8 @@ +// Copyright (c) 2013 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. + +#import + +@interface MyAppDelegate : NSObject +@end diff --git a/third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.m b/third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.m new file mode 100644 index 0000000000..6ad60fa9d4 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/MyAppDelegate.m @@ -0,0 +1,19 @@ +// Copyright (c) 2013 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. + +#import "MyAppDelegate.h" + + +@implementation MyAppDelegate +@synthesize window; + +- (BOOL)application:(UIApplication *)application + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + self.window = [[UIWindow alloc] init]; + self.window.rootViewController = [[UIViewController alloc] init]; + [self.window makeKeyAndVisible]; + return YES; +} + +@end diff --git a/third_party/python/gyp/test/mac/xcuitest/TestCase.m b/third_party/python/gyp/test/mac/xcuitest/TestCase.m new file mode 100644 index 0000000000..1f32b7af74 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/TestCase.m @@ -0,0 +1,15 @@ +// Copyright (c) 2013 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. + +#import + +@interface TestCase : XCTestCase +@end + +@implementation TestCase +- (void)testFoo { + XCUIApplication *foo = [[XCUIApplication alloc] init]; + XCTAssertNotNil(foo, @"expected non-nil object"); +} +@end diff --git a/third_party/python/gyp/test/mac/xcuitest/main.m b/third_party/python/gyp/test/mac/xcuitest/main.m new file mode 100644 index 0000000000..e7cb62e639 --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/main.m @@ -0,0 +1,15 @@ +// Copyright (c) 2013 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. + +#import + +#import "MyAppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + UIApplicationMain(argc, argv, + nil, NSStringFromClass([MyAppDelegate class])); + } + return 1; +} diff --git a/third_party/python/gyp/test/mac/xcuitest/resource.txt b/third_party/python/gyp/test/mac/xcuitest/resource.txt new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/resource.txt @@ -0,0 +1 @@ +foo diff --git a/third_party/python/gyp/test/mac/xcuitest/test.gyp b/third_party/python/gyp/test/mac/xcuitest/test.gyp new file mode 100644 index 0000000000..80cdf9032d --- /dev/null +++ b/third_party/python/gyp/test/mac/xcuitest/test.gyp @@ -0,0 +1,69 @@ +# Copyright (c) 2013 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. + +{ + 'target_defaults': { + 'xcode_settings': { + 'SDKROOT': 'iphoneos', + 'FRAMEWORK_SEARCH_PATHS': [ + '$(inherited)', + '$(DEVELOPER_FRAMEWORKS_DIR)', + ], + 'OTHER_LDFLAGS': [ + '$(inherited)', + '-ObjC', + ], + 'GCC_PREFIX_HEADER': '', + 'CLANG_ENABLE_OBJC_ARC': 'YES', + 'INFOPLIST_FILE': 'Info.plist', + }, + }, + 'targets': [ + { + 'target_name': 'testApp', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'MyAppDelegate.h', + 'MyAppDelegate.m', + 'main.m', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + }, + { + 'target_name': 'tests', + 'type': 'loadable_module', + 'mac_bundle': 1, + 'mac_xcuitest_bundle': 1, + 'sources': [ + 'TestCase.m', + ], + 'dependencies': [ + 'testApp', + ], + 'mac_bundle_resources': [ + 'resource.txt', + ], + 'variables': { + # This must *not* be set for xctest ui tests. + 'xctest_host': '', + }, + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/XCTest.framework', + ] + }, + 'xcode_settings': { + 'WRAPPER_EXTENSION': 'xctest', + 'TEST_TARGET_NAME': 'testApp', + }, + }, + ], +} + -- cgit v1.2.3