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 --- .../TestApp/English.lproj/InfoPlist-error.strings | 3 + .../TestApp/English.lproj/InfoPlist.strings | 3 + .../TestApp/English.lproj/LanguageMap.plist | 8 + .../app-bundle/TestApp/English.lproj/MainMenu.xib | 17 ++ .../TestApp/English.lproj/Main_iPhone.storyboard | 27 +++ .../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/ios/app-bundle/TestApp/TestApp-Info.plist | 28 +++ .../ios/app-bundle/TestApp/check_no_signature.py | 13 ++ .../python/gyp/test/ios/app-bundle/TestApp/main.m | 13 ++ .../app-bundle/TestApp/only-compile-in-32-bits.m | 7 + .../app-bundle/TestApp/only-compile-in-64-bits.m | 7 + .../python/gyp/test/ios/app-bundle/test-archs.gyp | 109 ++++++++++++ .../test/ios/app-bundle/test-assets-catalog.gyp | 45 +++++ .../gyp/test/ios/app-bundle/test-crosscompile.gyp | 47 +++++ .../python/gyp/test/ios/app-bundle/test-device.gyp | 109 ++++++++++++ .../python/gyp/test/ios/app-bundle/test.gyp | 75 ++++++++ .../python/gyp/test/ios/app-bundle/tool_main.cc | 7 + .../test/ios/copies-with-xcode-envvars/Info.plist | 24 +++ .../copies-with-xcode-envvars.gyp | 97 +++++++++++ .../gyp/test/ios/copies-with-xcode-envvars/empty.c | 1 + .../gyp/test/ios/copies-with-xcode-envvars/file0 | 1 + .../gyp/test/ios/copies-with-xcode-envvars/file1 | 1 + .../gyp/test/ios/copies-with-xcode-envvars/file10 | 1 + .../gyp/test/ios/copies-with-xcode-envvars/file11 | 1 + .../gyp/test/ios/copies-with-xcode-envvars/file2 | 1 + .../gyp/test/ios/copies-with-xcode-envvars/file3 | 1 + .../gyp/test/ios/copies-with-xcode-envvars/file4 | 1 + .../gyp/test/ios/copies-with-xcode-envvars/file5 | 1 + .../gyp/test/ios/copies-with-xcode-envvars/file6 | 1 + .../gyp/test/ios/copies-with-xcode-envvars/file7 | 1 + .../gyp/test/ios/copies-with-xcode-envvars/file8 | 1 + .../gyp/test/ios/copies-with-xcode-envvars/file9 | 1 + .../test/ios/deployment-target/check-version-min.c | 33 ++++ .../ios/deployment-target/deployment-target.gyp | 34 ++++ .../ActionExtension/ActionViewController.h | 9 + .../ActionExtension/ActionViewController.m | 31 ++++ .../test/ios/extension/ActionExtension/Info.plist | 42 +++++ .../ActionExtension/MainInterface.storyboard | 63 +++++++ .../ios/extension/ExtensionContainer/AppDelegate.h | 12 ++ .../ios/extension/ExtensionContainer/AppDelegate.m | 19 +++ .../ExtensionContainer/Base.lproj/Main.storyboard | 25 +++ .../AppIcon.appiconset/Contents.json | 53 ++++++ .../LaunchImage.launchimage/Contents.json | 51 ++++++ .../ios/extension/ExtensionContainer/Info.plist | 32 ++++ .../extension/ExtensionContainer/ViewController.h | 11 ++ .../extension/ExtensionContainer/ViewController.m | 24 +++ .../test/ios/extension/ExtensionContainer/main.m | 13 ++ .../python/gyp/test/ios/extension/extension.gyp | 91 ++++++++++ .../python/gyp/test/ios/framework/framework.gyp | 43 +++++ .../gyp/test/ios/framework/iOSFramework/Info.plist | 26 +++ .../gyp/test/ios/framework/iOSFramework/Thing.h | 10 ++ .../gyp/test/ios/framework/iOSFramework/Thing.m | 22 +++ .../test/ios/framework/iOSFramework/iOSFramework.h | 9 + .../gyp/test/ios/gyptest-app-ios-assets-catalog.py | 57 +++++++ third_party/python/gyp/test/ios/gyptest-app-ios.py | 76 +++++++++ third_party/python/gyp/test/ios/gyptest-archs.py | 62 +++++++ .../test/ios/gyptest-copies-with-xcode-envvars.py | 65 +++++++ .../python/gyp/test/ios/gyptest-crosscompile.py | 34 ++++ .../gyp/test/ios/gyptest-deployment-target.py | 23 +++ .../python/gyp/test/ios/gyptest-extension.py | 51 ++++++ .../python/gyp/test/ios/gyptest-framework.py | 37 ++++ .../gyp/test/ios/gyptest-per-config-settings.py | 190 +++++++++++++++++++++ third_party/python/gyp/test/ios/gyptest-watch.py | 44 +++++ .../python/gyp/test/ios/gyptest-xcode-ninja.py | 25 +++ .../AppIcon.appiconset/Contents.json | 62 +++++++ .../LaunchImage.launchimage/Contents.json | 24 +++ .../python/gyp/test/ios/watch/WatchApp/Info.plist | 35 ++++ .../test/ios/watch/WatchApp/Interface.storyboard | 15 ++ .../test/ios/watch/WatchContainer/AppDelegate.h | 12 ++ .../test/ios/watch/WatchContainer/AppDelegate.m | 19 +++ .../WatchContainer/Base.lproj/Main.storyboard | 25 +++ .../AppIcon.appiconset/Contents.json | 53 ++++++ .../LaunchImage.launchimage/Contents.json | 51 ++++++ .../gyp/test/ios/watch/WatchContainer/Info.plist | 32 ++++ .../test/ios/watch/WatchContainer/ViewController.h | 11 ++ .../test/ios/watch/WatchContainer/ViewController.m | 24 +++ .../gyp/test/ios/watch/WatchContainer/main.m | 13 ++ .../Images.xcassets/MyImage.imageset/Contents.json | 20 +++ .../test/ios/watch/WatchKitExtension/Info.plist | 38 +++++ .../watch/WatchKitExtension/InterfaceController.h | 10 ++ .../watch/WatchKitExtension/InterfaceController.m | 25 +++ .../WatchKitExtension/MainInterface.storyboard | 63 +++++++ third_party/python/gyp/test/ios/watch/watch.gyp | 105 ++++++++++++ .../python/gyp/test/ios/xctests/App/AppDelegate.h | 11 ++ .../python/gyp/test/ios/xctests/App/AppDelegate.m | 18 ++ .../ios/xctests/App/Base.lproj/LaunchScreen.xib | 41 +++++ .../ios/xctests/App/Base.lproj/Main.storyboard | 25 +++ .../AppIcon.appiconset/Contents.json | 68 ++++++++ .../python/gyp/test/ios/xctests/App/Info.plist | 47 +++++ .../gyp/test/ios/xctests/App/ViewController.h | 9 + .../gyp/test/ios/xctests/App/ViewController.m | 21 +++ third_party/python/gyp/test/ios/xctests/App/main.m | 13 ++ .../gyp/test/ios/xctests/AppTests/AppTests.m | 31 ++++ .../gyp/test/ios/xctests/AppTests/Info.plist | 24 +++ .../python/gyp/test/ios/xctests/gyptest-xctests.py | 49 ++++++ .../python/gyp/test/ios/xctests/xctests.gyp | 74 ++++++++ 100 files changed, 3118 insertions(+) create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist-error.strings create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist.strings create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/LanguageMap.plist create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/MainMenu.xib create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/TestApp-Info.plist create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/check_no_signature.py create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/main.m create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/only-compile-in-32-bits.m create mode 100644 third_party/python/gyp/test/ios/app-bundle/TestApp/only-compile-in-64-bits.m create mode 100644 third_party/python/gyp/test/ios/app-bundle/test-archs.gyp create mode 100644 third_party/python/gyp/test/ios/app-bundle/test-assets-catalog.gyp create mode 100644 third_party/python/gyp/test/ios/app-bundle/test-crosscompile.gyp create mode 100644 third_party/python/gyp/test/ios/app-bundle/test-device.gyp create mode 100644 third_party/python/gyp/test/ios/app-bundle/test.gyp create mode 100644 third_party/python/gyp/test/ios/app-bundle/tool_main.cc create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/Info.plist create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/empty.c create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/file0 create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/file1 create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/file10 create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/file11 create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/file2 create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/file3 create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/file4 create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/file5 create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/file6 create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/file7 create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/file8 create mode 100644 third_party/python/gyp/test/ios/copies-with-xcode-envvars/file9 create mode 100644 third_party/python/gyp/test/ios/deployment-target/check-version-min.c create mode 100644 third_party/python/gyp/test/ios/deployment-target/deployment-target.gyp create mode 100644 third_party/python/gyp/test/ios/extension/ActionExtension/ActionViewController.h create mode 100644 third_party/python/gyp/test/ios/extension/ActionExtension/ActionViewController.m create mode 100644 third_party/python/gyp/test/ios/extension/ActionExtension/Info.plist create mode 100644 third_party/python/gyp/test/ios/extension/ActionExtension/MainInterface.storyboard create mode 100644 third_party/python/gyp/test/ios/extension/ExtensionContainer/AppDelegate.h create mode 100644 third_party/python/gyp/test/ios/extension/ExtensionContainer/AppDelegate.m create mode 100644 third_party/python/gyp/test/ios/extension/ExtensionContainer/Base.lproj/Main.storyboard create mode 100644 third_party/python/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 third_party/python/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/LaunchImage.launchimage/Contents.json create mode 100644 third_party/python/gyp/test/ios/extension/ExtensionContainer/Info.plist create mode 100644 third_party/python/gyp/test/ios/extension/ExtensionContainer/ViewController.h create mode 100644 third_party/python/gyp/test/ios/extension/ExtensionContainer/ViewController.m create mode 100644 third_party/python/gyp/test/ios/extension/ExtensionContainer/main.m create mode 100644 third_party/python/gyp/test/ios/extension/extension.gyp create mode 100644 third_party/python/gyp/test/ios/framework/framework.gyp create mode 100644 third_party/python/gyp/test/ios/framework/iOSFramework/Info.plist create mode 100644 third_party/python/gyp/test/ios/framework/iOSFramework/Thing.h create mode 100644 third_party/python/gyp/test/ios/framework/iOSFramework/Thing.m create mode 100644 third_party/python/gyp/test/ios/framework/iOSFramework/iOSFramework.h create mode 100755 third_party/python/gyp/test/ios/gyptest-app-ios-assets-catalog.py create mode 100755 third_party/python/gyp/test/ios/gyptest-app-ios.py create mode 100644 third_party/python/gyp/test/ios/gyptest-archs.py create mode 100644 third_party/python/gyp/test/ios/gyptest-copies-with-xcode-envvars.py create mode 100644 third_party/python/gyp/test/ios/gyptest-crosscompile.py create mode 100644 third_party/python/gyp/test/ios/gyptest-deployment-target.py create mode 100755 third_party/python/gyp/test/ios/gyptest-extension.py create mode 100755 third_party/python/gyp/test/ios/gyptest-framework.py create mode 100644 third_party/python/gyp/test/ios/gyptest-per-config-settings.py create mode 100755 third_party/python/gyp/test/ios/gyptest-watch.py create mode 100644 third_party/python/gyp/test/ios/gyptest-xcode-ninja.py create mode 100644 third_party/python/gyp/test/ios/watch/WatchApp/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 third_party/python/gyp/test/ios/watch/WatchApp/Images.xcassets/LaunchImage.launchimage/Contents.json create mode 100644 third_party/python/gyp/test/ios/watch/WatchApp/Info.plist create mode 100644 third_party/python/gyp/test/ios/watch/WatchApp/Interface.storyboard create mode 100644 third_party/python/gyp/test/ios/watch/WatchContainer/AppDelegate.h create mode 100644 third_party/python/gyp/test/ios/watch/WatchContainer/AppDelegate.m create mode 100644 third_party/python/gyp/test/ios/watch/WatchContainer/Base.lproj/Main.storyboard create mode 100644 third_party/python/gyp/test/ios/watch/WatchContainer/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 third_party/python/gyp/test/ios/watch/WatchContainer/Images.xcassets/LaunchImage.launchimage/Contents.json create mode 100644 third_party/python/gyp/test/ios/watch/WatchContainer/Info.plist create mode 100644 third_party/python/gyp/test/ios/watch/WatchContainer/ViewController.h create mode 100644 third_party/python/gyp/test/ios/watch/WatchContainer/ViewController.m create mode 100644 third_party/python/gyp/test/ios/watch/WatchContainer/main.m create mode 100644 third_party/python/gyp/test/ios/watch/WatchKitExtension/Images.xcassets/MyImage.imageset/Contents.json create mode 100644 third_party/python/gyp/test/ios/watch/WatchKitExtension/Info.plist create mode 100644 third_party/python/gyp/test/ios/watch/WatchKitExtension/InterfaceController.h create mode 100644 third_party/python/gyp/test/ios/watch/WatchKitExtension/InterfaceController.m create mode 100644 third_party/python/gyp/test/ios/watch/WatchKitExtension/MainInterface.storyboard create mode 100644 third_party/python/gyp/test/ios/watch/watch.gyp create mode 100644 third_party/python/gyp/test/ios/xctests/App/AppDelegate.h create mode 100644 third_party/python/gyp/test/ios/xctests/App/AppDelegate.m create mode 100644 third_party/python/gyp/test/ios/xctests/App/Base.lproj/LaunchScreen.xib create mode 100644 third_party/python/gyp/test/ios/xctests/App/Base.lproj/Main.storyboard create mode 100644 third_party/python/gyp/test/ios/xctests/App/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 third_party/python/gyp/test/ios/xctests/App/Info.plist create mode 100644 third_party/python/gyp/test/ios/xctests/App/ViewController.h create mode 100644 third_party/python/gyp/test/ios/xctests/App/ViewController.m create mode 100644 third_party/python/gyp/test/ios/xctests/App/main.m create mode 100644 third_party/python/gyp/test/ios/xctests/AppTests/AppTests.m create mode 100644 third_party/python/gyp/test/ios/xctests/AppTests/Info.plist create mode 100644 third_party/python/gyp/test/ios/xctests/gyptest-xctests.py create mode 100644 third_party/python/gyp/test/ios/xctests/xctests.gyp (limited to 'third_party/python/gyp/test/ios') diff --git a/third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist-error.strings b/third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist-error.strings new file mode 100644 index 0000000000..452e7fabf9 --- /dev/null +++ b/third_party/python/gyp/test/ios/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/ios/app-bundle/TestApp/English.lproj/InfoPlist.strings b/third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist.strings new file mode 100644 index 0000000000..35bd33a96e --- /dev/null +++ b/third_party/python/gyp/test/ios/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/ios/app-bundle/TestApp/English.lproj/LanguageMap.plist b/third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/LanguageMap.plist new file mode 100644 index 0000000000..6b94882328 --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/LanguageMap.plist @@ -0,0 +1,8 @@ + + + + + en + en + + diff --git a/third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/MainMenu.xib b/third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/MainMenu.xib new file mode 100644 index 0000000000..21b60448ad --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/MainMenu.xib @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard b/third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard new file mode 100644 index 0000000000..723bc85122 --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/third_party/python/gyp/test/ios/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json b/third_party/python/gyp/test/ios/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..2db2b1c7c6 --- /dev/null +++ b/third_party/python/gyp/test/ios/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/ios/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json b/third_party/python/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json new file mode 100644 index 0000000000..0a87b6edc6 --- /dev/null +++ b/third_party/python/gyp/test/ios/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/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png b/third_party/python/gyp/test/ios/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/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png differ diff --git a/third_party/python/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png b/third_party/python/gyp/test/ios/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/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png differ diff --git a/third_party/python/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png b/third_party/python/gyp/test/ios/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/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png differ diff --git a/third_party/python/gyp/test/ios/app-bundle/TestApp/TestApp-Info.plist b/third_party/python/gyp/test/ios/app-bundle/TestApp/TestApp-Info.plist new file mode 100644 index 0000000000..bb90043682 --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/TestApp/TestApp-Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.google.${PRODUCT_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ause + CFBundleVersion + 1 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/third_party/python/gyp/test/ios/app-bundle/TestApp/check_no_signature.py b/third_party/python/gyp/test/ios/app-bundle/TestApp/check_no_signature.py new file mode 100644 index 0000000000..4f6e340072 --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/TestApp/check_no_signature.py @@ -0,0 +1,13 @@ +#!/usr/bin/python + +import os +import subprocess +import sys + +p = os.path.join(os.environ['BUILT_PRODUCTS_DIR'],os.environ['EXECUTABLE_PATH']) +proc = subprocess.Popen(['codesign', '-v', p], + stderr=subprocess.STDOUT, stdout=subprocess.PIPE) +o = proc.communicate()[0].strip() +if "code object is not signed at all" not in o: + sys.stderr.write('File should not already be signed.') + sys.exit(1) diff --git a/third_party/python/gyp/test/ios/app-bundle/TestApp/main.m b/third_party/python/gyp/test/ios/app-bundle/TestApp/main.m new file mode 100644 index 0000000000..ec93e0e237 --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/TestApp/main.m @@ -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 + +int main(int argc, char *argv[]) +{ + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, nil); + [pool release]; + return retVal; +} diff --git a/third_party/python/gyp/test/ios/app-bundle/TestApp/only-compile-in-32-bits.m b/third_party/python/gyp/test/ios/app-bundle/TestApp/only-compile-in-32-bits.m new file mode 100644 index 0000000000..28bb117788 --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/TestApp/only-compile-in-32-bits.m @@ -0,0 +1,7 @@ +// 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 defined(__LP64__) +# error 64-bit build +#endif diff --git a/third_party/python/gyp/test/ios/app-bundle/TestApp/only-compile-in-64-bits.m b/third_party/python/gyp/test/ios/app-bundle/TestApp/only-compile-in-64-bits.m new file mode 100644 index 0000000000..e6d2558418 --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/TestApp/only-compile-in-64-bits.m @@ -0,0 +1,7 @@ +// 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 !defined(__LP64__) +# error 32-bit build +#endif diff --git a/third_party/python/gyp/test/ios/app-bundle/test-archs.gyp b/third_party/python/gyp/test/ios/app-bundle/test-archs.gyp new file mode 100644 index 0000000000..fa935c4fb4 --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/test-archs.gyp @@ -0,0 +1,109 @@ +# 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': { + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', + 'TestApp/English.lproj/MainMenu.xib', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'CODE_SIGNING_REQUIRED': 'NO', + 'SDKROOT': 'iphoneos', # -isysroot + 'TARGETED_DEVICE_FAMILY': '1,2', + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + }, + 'targets': [ + { + 'target_name': 'TestNoArchs', + 'product_name': 'TestNoArchs', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + 'TestApp/only-compile-in-32-bits.m', + ], + 'xcode_settings': { + 'VALID_ARCHS': [ + 'i386', + 'x86_64', + 'arm64', + 'armv7', + ], + } + }, + { + 'target_name': 'TestArch32Bits', + 'product_name': 'TestArch32Bits', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + 'TestApp/only-compile-in-32-bits.m', + ], + 'xcode_settings': { + 'ARCHS': [ + '$(ARCHS_STANDARD)', + ], + 'VALID_ARCHS': [ + 'i386', + 'armv7', + ], + }, + }, + { + 'target_name': 'TestArch64Bits', + 'product_name': 'TestArch64Bits', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + 'TestApp/only-compile-in-64-bits.m', + ], + 'xcode_settings': { + 'ARCHS': [ + '$(ARCHS_STANDARD_INCLUDING_64_BIT)', + ], + 'VALID_ARCHS': [ + 'x86_64', + 'arm64', + ], + }, + }, + { + 'target_name': 'TestMultiArchs', + 'product_name': 'TestMultiArchs', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + ], + 'xcode_settings': { + 'ARCHS': [ + '$(ARCHS_STANDARD_INCLUDING_64_BIT)', + ], + 'VALID_ARCHS': [ + 'x86_64', + 'i386', + 'arm64', + 'armv7', + ], + } + }, + ], +} diff --git a/third_party/python/gyp/test/ios/app-bundle/test-assets-catalog.gyp b/third_party/python/gyp/test/ios/app-bundle/test-assets-catalog.gyp new file mode 100644 index 0000000000..9a12d07af7 --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/test-assets-catalog.gyp @@ -0,0 +1,45 @@ +# 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. +{ + 'conditions': [ + ['"<(GENERATOR)"=="ninja"', { + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + }], + ], + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test App Assets Catalog Gyp', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', + 'TestApp/English.lproj/MainMenu.xib', + 'TestApp/English.lproj/Main_iPhone.storyboard', + 'TestApp/Images.xcassets', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'SDKROOT': 'iphonesimulator', # -isysroot + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/ios/app-bundle/test-crosscompile.gyp b/third_party/python/gyp/test/ios/app-bundle/test-crosscompile.gyp new file mode 100644 index 0000000000..d9049588ba --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/test-crosscompile.gyp @@ -0,0 +1,47 @@ +# 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. +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ], + 'targets': [ + # This target will not be built, but is here so that ninja Xcode emulation + # understand this is a multi-platform (ios + mac) build. + { + 'target_name': 'TestDummy', + 'product_name': 'TestDummy', + 'toolsets': ['target'], + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'tool_main.cc', + ], + 'xcode_settings': { + 'SDKROOT': 'iphonesimulator', # -isysroot + 'TARGETED_DEVICE_FAMILY': '1,2', + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', + }, + }, + { + 'target_name': 'TestHost', + 'product_name': 'TestHost', + 'toolsets': ['host'], + 'type': 'executable', + 'mac_bundle': 0, + 'sources': [ + 'tool_main.cc', + ], + 'xcode_settings': { + 'SDKROOT': 'macosx', + 'ARCHS': [ + '$(ARCHS_STANDARD)', + 'x86_64', + ], + 'VALID_ARCHS': [ + 'x86_64', + ], + } + } + ], +} diff --git a/third_party/python/gyp/test/ios/app-bundle/test-device.gyp b/third_party/python/gyp/test/ios/app-bundle/test-device.gyp new file mode 100644 index 0000000000..a0cfff7cdb --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/test-device.gyp @@ -0,0 +1,109 @@ +# 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. +{ + 'conditions': [ + ['"<(GENERATOR)"=="xcode"', { + 'target_defaults': { + 'configurations': { + 'Default': { + 'xcode_settings': { + 'SDKROOT': 'iphonesimulator', + 'CONFIGURATION_BUILD_DIR':'build/Default', + } + }, + 'Default-iphoneos': { + 'xcode_settings': { + 'SDKROOT': 'iphoneos', + 'CONFIGURATION_BUILD_DIR':'build/Default-iphoneos', + } + }, + }, + }, + }, { + 'target_defaults': { + 'configurations': { + 'Default': { + 'xcode_settings': { + 'SDKROOT': 'iphonesimulator', + } + }, + }, + }, + }], + ], + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test App Gyp', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', + 'TestApp/English.lproj/MainMenu.xib', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'SDKROOT': 'iphonesimulator', # -isysroot + 'TARGETED_DEVICE_FAMILY': '1,2', + 'INFOPLIST_OUTPUT_FORMAT':'xml', + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'IPHONEOS_DEPLOYMENT_TARGET': '8.0', + 'CODE_SIGNING_REQUIRED': 'NO', + 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', + + }, + }, + { + 'target_name': 'sig_test', + 'product_name': 'sigtest', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', + 'TestApp/English.lproj/MainMenu.xib', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'postbuilds': [ + { + 'postbuild_name': 'Verify no signature', + 'action': [ + 'python', + 'TestApp/check_no_signature.py' + ], + }, + ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'SDKROOT': 'iphonesimulator', # -isysroot + 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', + 'INFOPLIST_OUTPUT_FORMAT':'xml', + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'IPHONEOS_DEPLOYMENT_TARGET': '8.0', + 'CONFIGURATION_BUILD_DIR':'buildsig/Default', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/ios/app-bundle/test.gyp b/third_party/python/gyp/test/ios/app-bundle/test.gyp new file mode 100644 index 0000000000..544c589f60 --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/test.gyp @@ -0,0 +1,75 @@ +# 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. +{ + 'conditions': [ + ['"<(GENERATOR)"=="ninja"', { + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + }], + ], + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test App Gyp', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', + 'TestApp/English.lproj/LanguageMap.plist', + 'TestApp/English.lproj/MainMenu.xib', + 'TestApp/English.lproj/Main_iPhone.storyboard', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'SDKROOT': 'iphonesimulator', # -isysroot + 'IPHONEOS_DEPLOYMENT_TARGET': '5.0', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + }, + { + 'target_name': 'test_app_xml', + 'product_name': 'Test App Gyp XML', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', + 'TestApp/English.lproj/MainMenu.xib', + 'TestApp/English.lproj/Main_iPhone.storyboard', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'INFOPLIST_OUTPUT_FORMAT':'xml', + 'SDKROOT': 'iphonesimulator', # -isysroot + 'IPHONEOS_DEPLOYMENT_TARGET': '5.0', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/ios/app-bundle/tool_main.cc b/third_party/python/gyp/test/ios/app-bundle/tool_main.cc new file mode 100644 index 0000000000..9dc3c94f34 --- /dev/null +++ b/third_party/python/gyp/test/ios/app-bundle/tool_main.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 main() { + return 0; +} diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/Info.plist b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/Info.plist new file mode 100644 index 0000000000..a0985c3e4d --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp new file mode 100644 index 0000000000..217dbb0479 --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp @@ -0,0 +1,97 @@ +# 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, + 'xcode_settings': { + 'SDKROOT': 'iphoneos', + 'TARGETED_DEVICE_FAMILY': '1,2', + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', + 'CODE_SIGNING_REQUIRED': 'NO', + 'INFOPLIST_FILE': 'Info.plist', + # This is where the test framework looks for results. Without + # this line the result will be in build/Default-iphoneos. + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + '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/ios/copies-with-xcode-envvars/empty.c b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/empty.c new file mode 100644 index 0000000000..237c8ce181 --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/empty.c @@ -0,0 +1 @@ +int main() {} diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file0 b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file0 new file mode 100644 index 0000000000..117889361f --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file0 @@ -0,0 +1 @@ +file0 contents diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file1 b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file1 new file mode 100644 index 0000000000..84d55c5759 --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file1 @@ -0,0 +1 @@ +file1 contents diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file10 b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file10 new file mode 100644 index 0000000000..372e992ef9 --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file10 @@ -0,0 +1 @@ +file10 contents diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file11 b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file11 new file mode 100644 index 0000000000..923e760e1f --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file11 @@ -0,0 +1 @@ +file11 contents diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file2 b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file2 new file mode 100644 index 0000000000..af1b8ae35d --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file2 @@ -0,0 +1 @@ +file2 contents diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file3 b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file3 new file mode 100644 index 0000000000..43f16f3522 --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file3 @@ -0,0 +1 @@ +file3 contents diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file4 b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file4 new file mode 100644 index 0000000000..5f7270a084 --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file4 @@ -0,0 +1 @@ +file4 contents diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file5 b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file5 new file mode 100644 index 0000000000..41f47186bd --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file5 @@ -0,0 +1 @@ +file5 contents diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file6 b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file6 new file mode 100644 index 0000000000..f5d5757348 --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file6 @@ -0,0 +1 @@ +file6 contents diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file7 b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file7 new file mode 100644 index 0000000000..90dbe6e9e1 --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file7 @@ -0,0 +1 @@ +file7 contents diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file8 b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file8 new file mode 100644 index 0000000000..9eb613fabb --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file8 @@ -0,0 +1 @@ +file8 contents diff --git a/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file9 b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file9 new file mode 100644 index 0000000000..e37ac72ada --- /dev/null +++ b/third_party/python/gyp/test/ios/copies-with-xcode-envvars/file9 @@ -0,0 +1 @@ +file9 contents diff --git a/third_party/python/gyp/test/ios/deployment-target/check-version-min.c b/third_party/python/gyp/test/ios/deployment-target/check-version-min.c new file mode 100644 index 0000000000..761c529085 --- /dev/null +++ b/third_party/python/gyp/test/ios/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/ios/deployment-target/deployment-target.gyp b/third_party/python/gyp/test/ios/deployment-target/deployment-target.gyp new file mode 100644 index 0000000000..bdc1439b5e --- /dev/null +++ b/third_party/python/gyp/test/ios/deployment-target/deployment-target.gyp @@ -0,0 +1,34 @@ +# 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': 'version-min-4.3', + 'type': 'static_library', + 'sources': [ 'check-version-min.c', ], + 'defines': [ 'GYPTEST_IOS_VERSION_MIN=40300', ], + 'xcode_settings': { + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '4.3', + }, + }, + { + 'target_name': 'version-min-5.0', + 'type': 'static_library', + 'sources': [ 'check-version-min.c', ], + 'defines': [ 'GYPTEST_IOS_VERSION_MIN=50000', ], + 'xcode_settings': { + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '5.0', + }, + } + ], +} + diff --git a/third_party/python/gyp/test/ios/extension/ActionExtension/ActionViewController.h b/third_party/python/gyp/test/ios/extension/ActionExtension/ActionViewController.h new file mode 100644 index 0000000000..1c92509029 --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ActionExtension/ActionViewController.h @@ -0,0 +1,9 @@ +// 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. + +#import + +@interface ActionViewController : UIViewController + +@end diff --git a/third_party/python/gyp/test/ios/extension/ActionExtension/ActionViewController.m b/third_party/python/gyp/test/ios/extension/ActionExtension/ActionViewController.m new file mode 100644 index 0000000000..d37bacdae1 --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ActionExtension/ActionViewController.m @@ -0,0 +1,31 @@ +// 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. + +#import "ActionViewController.h" +#import + +@interface ActionViewController () + +@end + +@implementation ActionViewController + +- (void)viewDidLoad { + [super viewDidLoad]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +- (IBAction)done { + // Return any edited content to the host app. + // This template doesn't do anything, so we just echo the passed in items. + [self.extensionContext + completeRequestReturningItems:self.extensionContext.inputItems + completionHandler:nil]; +} + +@end diff --git a/third_party/python/gyp/test/ios/extension/ActionExtension/Info.plist b/third_party/python/gyp/test/ios/extension/ActionExtension/Info.plist new file mode 100644 index 0000000000..f89cd790bc --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ActionExtension/Info.plist @@ -0,0 +1,42 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ActionExtension + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.google.gyptest.extension.ActionExtension + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + XPC! + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSExtension + + NSExtensionAttributes + + NSExtensionActivationRule + TRUEPREDICATE + NSExtensionPointName + com.apple.ui-services + NSExtensionPointVersion + 1.0 + + NSExtensionMainStoryboard + MainInterface + NSExtensionPointIdentifier + com.apple.ui-services + + + diff --git a/third_party/python/gyp/test/ios/extension/ActionExtension/MainInterface.storyboard b/third_party/python/gyp/test/ios/extension/ActionExtension/MainInterface.storyboard new file mode 100644 index 0000000000..5aa58184e8 --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ActionExtension/MainInterface.storyboard @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/third_party/python/gyp/test/ios/extension/ExtensionContainer/AppDelegate.h b/third_party/python/gyp/test/ios/extension/ExtensionContainer/AppDelegate.h new file mode 100644 index 0000000000..510e2300b1 --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ExtensionContainer/AppDelegate.h @@ -0,0 +1,12 @@ +// 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. + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end + diff --git a/third_party/python/gyp/test/ios/extension/ExtensionContainer/AppDelegate.m b/third_party/python/gyp/test/ios/extension/ExtensionContainer/AppDelegate.m new file mode 100644 index 0000000000..1197bc1bbc --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ExtensionContainer/AppDelegate.m @@ -0,0 +1,19 @@ +// 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. + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication*)application + didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { + // Override point for customization after application launch. + return YES; +} + +@end diff --git a/third_party/python/gyp/test/ios/extension/ExtensionContainer/Base.lproj/Main.storyboard b/third_party/python/gyp/test/ios/extension/ExtensionContainer/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..e8f3cfb40c --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ExtensionContainer/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/third_party/python/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/AppIcon.appiconset/Contents.json b/third_party/python/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..f697f61f4a --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,53 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/third_party/python/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/LaunchImage.launchimage/Contents.json b/third_party/python/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000000..4458b40c05 --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,51 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "subtype" : "retina4", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/third_party/python/gyp/test/ios/extension/ExtensionContainer/Info.plist b/third_party/python/gyp/test/ios/extension/ExtensionContainer/Info.plist new file mode 100644 index 0000000000..31ccf4cc82 --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ExtensionContainer/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ExtensionContainer + CFBundleIdentifier + com.google.gyptest.extension + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + + diff --git a/third_party/python/gyp/test/ios/extension/ExtensionContainer/ViewController.h b/third_party/python/gyp/test/ios/extension/ExtensionContainer/ViewController.h new file mode 100644 index 0000000000..fad7754714 --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ExtensionContainer/ViewController.h @@ -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. + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/third_party/python/gyp/test/ios/extension/ExtensionContainer/ViewController.m b/third_party/python/gyp/test/ios/extension/ExtensionContainer/ViewController.m new file mode 100644 index 0000000000..3810fa9cba --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ExtensionContainer/ViewController.m @@ -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. + +#import "ViewController.h" + +@interface ViewController () + + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/third_party/python/gyp/test/ios/extension/ExtensionContainer/main.m b/third_party/python/gyp/test/ios/extension/ExtensionContainer/main.m new file mode 100644 index 0000000000..47aecb5148 --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/ExtensionContainer/main.m @@ -0,0 +1,13 @@ +// 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. +// +#import +#import "AppDelegate.h" + +int main(int argc, char* argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, + NSStringFromClass([AppDelegate class])); + } +} diff --git a/third_party/python/gyp/test/ios/extension/extension.gyp b/third_party/python/gyp/test/ios/extension/extension.gyp new file mode 100644 index 0000000000..91c068413d --- /dev/null +++ b/third_party/python/gyp/test/ios/extension/extension.gyp @@ -0,0 +1,91 @@ +# 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. + +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + 'targets': [ + { + 'target_name': 'ExtensionContainer', + 'product_name': 'ExtensionContainer', + 'type': 'executable', + 'mac_bundle': 1, + 'mac_bundle_resources': [ + 'ExtensionContainer/Base.lproj/Main.storyboard', + ], + 'sources': [ + 'ExtensionContainer/AppDelegate.h', + 'ExtensionContainer/AppDelegate.m', + 'ExtensionContainer/ViewController.h', + 'ExtensionContainer/ViewController.m', + 'ExtensionContainer/main.m', + ], + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/ExtensionContainer.app/PlugIns', + 'files': [ + '<(PRODUCT_DIR)/ActionExtension.appex', + ]}], + 'dependencies': [ + 'ActionExtension' + ], + + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'INFOPLIST_FILE': 'ExtensionContainer/Info.plist', + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'ARCHS': [ 'armv7' ], + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', + 'CODE_SIGNING_REQUIRED': 'NO', + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + }, + { + 'target_name': 'ActionExtension', + 'product_name': 'ActionExtension', + 'type': 'executable', + 'mac_bundle': 1, + 'ios_app_extension': 1, + 'sources': [ + 'ActionExtension/ActionViewController.h', + 'ActionExtension/ActionViewController.m', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + '$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'INFOPLIST_FILE': 'ActionExtension/Info.plist', + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'ARCHS': [ 'armv7' ], + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', + 'CODE_SIGNING_REQUIRED': 'NO', + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + }, + ], +} + diff --git a/third_party/python/gyp/test/ios/framework/framework.gyp b/third_party/python/gyp/test/ios/framework/framework.gyp new file mode 100644 index 0000000000..2c6fdd5b27 --- /dev/null +++ b/third_party/python/gyp/test/ios/framework/framework.gyp @@ -0,0 +1,43 @@ +# Copyright 2016 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. + +{ + 'targets': [ + { + 'target_name': 'iOSFramework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ + 'iOSFramework/iOSFramework.h', + 'iOSFramework/Thing.h', + 'iOSFramework/Thing.m', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'mac_framework_headers': [ + # Using two headers here tests mac_tool.py NextGreaterPowerOf2. + 'iOSFramework/iOSFramework.h', + 'iOSFramework/Thing.h', + ], + 'mac_framework_dirs': [ + '$(SDKROOT)/../../Library/Frameworks', + ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'INFOPLIST_FILE': 'iOSFramework/Info.plist', + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '8.0', + 'CONFIGURATION_BUILD_DIR':'build/Default', + 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', + }, + }, + ], +} diff --git a/third_party/python/gyp/test/ios/framework/iOSFramework/Info.plist b/third_party/python/gyp/test/ios/framework/iOSFramework/Info.plist new file mode 100644 index 0000000000..d3de8eefb6 --- /dev/null +++ b/third_party/python/gyp/test/ios/framework/iOSFramework/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/third_party/python/gyp/test/ios/framework/iOSFramework/Thing.h b/third_party/python/gyp/test/ios/framework/iOSFramework/Thing.h new file mode 100644 index 0000000000..a34e908fc9 --- /dev/null +++ b/third_party/python/gyp/test/ios/framework/iOSFramework/Thing.h @@ -0,0 +1,10 @@ +#import +#import + +@interface Thing : NSObject + ++ (instancetype)thing; + +- (void)sayHello; + +@end diff --git a/third_party/python/gyp/test/ios/framework/iOSFramework/Thing.m b/third_party/python/gyp/test/ios/framework/iOSFramework/Thing.m new file mode 100644 index 0000000000..5b2b54925e --- /dev/null +++ b/third_party/python/gyp/test/ios/framework/iOSFramework/Thing.m @@ -0,0 +1,22 @@ +#import "Thing.h" + +@interface Thing () + +@end + +@implementation Thing + ++ (instancetype)thing { + static Thing* thing = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + thing = [[[self class] alloc] init]; + }); + return thing; +} + +- (void)sayHello { + NSLog(@"Hello World"); +} + +@end diff --git a/third_party/python/gyp/test/ios/framework/iOSFramework/iOSFramework.h b/third_party/python/gyp/test/ios/framework/iOSFramework/iOSFramework.h new file mode 100644 index 0000000000..e86b524d17 --- /dev/null +++ b/third_party/python/gyp/test/ios/framework/iOSFramework/iOSFramework.h @@ -0,0 +1,9 @@ +#import + +//! Project version number for iOSFramework. +FOUNDATION_EXPORT double iOSFrameworkVersionNumber; + +//! Project version string for iOSFramework. +FOUNDATION_EXPORT const unsigned char iOSFrameworkVersionString[]; + +#import diff --git a/third_party/python/gyp/test/ios/gyptest-app-ios-assets-catalog.py b/third_party/python/gyp/test/ios/gyptest-app-ios-assets-catalog.py new file mode 100755 index 0000000000..efd96ac752 --- /dev/null +++ b/third_party/python/gyp/test/ios/gyptest-app-ios-assets-catalog.py @@ -0,0 +1,57 @@ +#!/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 ios app bundles are built correctly. +""" + +import TestGyp +import TestMac + +import os.path +import sys + +# 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=['xcode', 'ninja']) + test.run_gyp(test_gyp_path, chdir='app-bundle') + test.build(test_gyp_path, test.ALL, chdir='app-bundle') + + # Test that the extension is .bundle + test.built_file_must_exist( + os.path.join(test_app_path, 'Test App Assets Catalog Gyp'), + chdir='app-bundle') + + # Info.plist + info_plist = test.built_file_path( + os.path.join(test_app_path, 'Info.plist'), + chdir='app-bundle') + # Resources + test.built_file_must_exist( + os.path.join(test_app_path, 'English.lproj/InfoPlist.strings'), + chdir='app-bundle') + test.built_file_must_exist( + os.path.join(test_app_path, 'English.lproj/MainMenu.nib'), + chdir='app-bundle') + test.built_file_must_exist( + os.path.join(test_app_path, 'English.lproj/Main_iPhone.storyboardc'), + chdir='app-bundle') + test.built_file_must_exist( + os.path.join(test_app_path, 'Assets.car'), + chdir='app-bundle') + + # Packaging + test.built_file_must_exist( + os.path.join(test_app_path, 'PkgInfo'), + chdir='app-bundle') + test.built_file_must_match( + os.path.join(test_app_path, 'PkgInfo'), 'APPLause', + chdir='app-bundle') + + test.pass_test() diff --git a/third_party/python/gyp/test/ios/gyptest-app-ios.py b/third_party/python/gyp/test/ios/gyptest-app-ios.py new file mode 100755 index 0000000000..99f9e865dc --- /dev/null +++ b/third_party/python/gyp/test/ios/gyptest-app-ios.py @@ -0,0 +1,76 @@ +#!/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 ios app bundles are built correctly. +""" + +import TestGyp + +import subprocess +import sys + +def CheckFileXMLPropertyList(file): + output = subprocess.check_output(['file', file]) + if not 'XML 1.0 document text' in output: + print('File: Expected XML 1.0 document text, got %s' % output) + test.fail_test() + +def CheckFileBinaryPropertyList(file): + output = subprocess.check_output(['file', file]) + if not 'Apple binary property list' in output: + print('File: Expected Apple binary property list, got %s' % output) + test.fail_test() + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['xcode', 'ninja']) + + test.run_gyp('test.gyp', chdir='app-bundle') + + test.build('test.gyp', test.ALL, chdir='app-bundle') + + # Test that the extension is .bundle + test.built_file_must_exist('Test App Gyp.app/Test App Gyp', + chdir='app-bundle') + + # Info.plist + info_plist = test.built_file_path('Test App Gyp.app/Info.plist', + chdir='app-bundle') + test.built_file_must_exist(info_plist) + CheckFileBinaryPropertyList(info_plist) + + # XML Info.plist + info_plist = test.built_file_path('Test App Gyp XML.app/Info.plist', + chdir='app-bundle') + CheckFileXMLPropertyList(info_plist) + + # Resources + strings_file = test.built_file_path( + 'Test App Gyp.app/English.lproj/InfoPlist.strings', + chdir='app-bundle') + test.built_file_must_exist(strings_file) + CheckFileBinaryPropertyList(strings_file) + + extra_plist_file = test.built_file_path( + 'Test App Gyp.app/English.lproj/LanguageMap.plist', + chdir='app-bundle') + test.built_file_must_exist(extra_plist_file) + CheckFileBinaryPropertyList(extra_plist_file) + + test.built_file_must_exist( + 'Test App Gyp.app/English.lproj/MainMenu.nib', + chdir='app-bundle') + test.built_file_must_exist( + 'Test App Gyp.app/English.lproj/Main_iPhone.storyboardc', + chdir='app-bundle') + + # Packaging + test.built_file_must_exist('Test App Gyp.app/PkgInfo', + chdir='app-bundle') + test.built_file_must_match('Test App Gyp.app/PkgInfo', 'APPLause', + chdir='app-bundle') + + test.pass_test() diff --git a/third_party/python/gyp/test/ios/gyptest-archs.py b/third_party/python/gyp/test/ios/gyptest-archs.py new file mode 100644 index 0000000000..c3340431bd --- /dev/null +++ b/third_party/python/gyp/test/ios/gyptest-archs.py @@ -0,0 +1,62 @@ +#!/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 device and simulator bundles are built correctly. +""" + +import TestGyp +import TestMac + +import collections +import sys + + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'xcode']) + + if test.format == 'xcode': + # This test appears to hang flakily. + test.skip_test() # bug=532 + + test_cases = [ + ('Default', 'TestArch32Bits', ['i386']), + ('Default-iphoneos', 'TestArch32Bits', ['armv7']), + ] + + if TestMac.Xcode.Version() < '0510': + test_cases.extend([ + ('Default', 'TestNoArchs', ['i386']), + ('Default-iphoneos', 'TestNoArchs', ['armv7'])]) + + if TestMac.Xcode.Version() >= '0500': + test_cases.extend([ + ('Default', 'TestArch64Bits', ['x86_64']), + ('Default', 'TestMultiArchs', ['i386', 'x86_64']), + ('Default-iphoneos', 'TestArch64Bits', ['arm64']), + ('Default-iphoneos', 'TestMultiArchs', ['armv7', 'arm64'])]) + + test.run_gyp('test-archs.gyp', chdir='app-bundle') + for configuration, target, archs in test_cases: + is_device_build = configuration.endswith('-iphoneos') + + kwds = collections.defaultdict(list) + if test.format == 'xcode': + if is_device_build: + configuration, sdk = configuration.split('-') + kwds['arguments'].extend(['-sdk', sdk]) + if TestMac.Xcode.Version() < '0500': + kwds['arguments'].extend(['-arch', archs[0]]) + + test.set_configuration(configuration) + filename = '%s.app/%s' % (target, target) + test.build('test-archs.gyp', target, chdir='app-bundle', **kwds) + result_file = test.built_file_path(filename, chdir='app-bundle') + + test.must_exist(result_file) + TestMac.CheckFileType(test, result_file, archs) + + test.pass_test() diff --git a/third_party/python/gyp/test/ios/gyptest-copies-with-xcode-envvars.py b/third_party/python/gyp/test/ios/gyptest-copies-with-xcode-envvars.py new file mode 100644 index 0000000000..88d9e028b8 --- /dev/null +++ b/third_party/python/gyp/test/ios/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=['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 + 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 + 'file2', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file2 contents\n') + out_path = test.built_file_path(contents_path + 'file3', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file3 contents\n') + out_path = test.built_file_path(contents_path + 'testimages/file4', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file4 contents\n') + out_path = test.built_file_path(contents_path + '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/ios/gyptest-crosscompile.py b/third_party/python/gyp/test/ios/gyptest-crosscompile.py new file mode 100644 index 0000000000..a0816836e5 --- /dev/null +++ b/third_party/python/gyp/test/ios/gyptest-crosscompile.py @@ -0,0 +1,34 @@ +#!/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 tools are built correctly. +""" + +import TestGyp +import TestMac + +import sys +import os + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'xcode']) + + oldenv = os.environ.copy() + try: + os.environ['GYP_CROSSCOMPILE'] = '1' + test.run_gyp('test-crosscompile.gyp', chdir='app-bundle') + finally: + os.environ.clear() + os.environ.update(oldenv) + + test.set_configuration('Default') + test.build('test-crosscompile.gyp', 'TestHost', chdir='app-bundle') + result_file = test.built_file_path('TestHost', chdir='app-bundle') + test.must_exist(result_file) + TestMac.CheckFileType(test, result_file, ['x86_64']) + + test.pass_test() diff --git a/third_party/python/gyp/test/ios/gyptest-deployment-target.py b/third_party/python/gyp/test/ios/gyptest-deployment-target.py new file mode 100644 index 0000000000..6c09d9dc04 --- /dev/null +++ b/third_party/python/gyp/test/ios/gyptest-deployment-target.py @@ -0,0 +1,23 @@ +#!/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 IPHONEOS_DEPLOYMENT_TARGET works. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode']) + + 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/ios/gyptest-extension.py b/third_party/python/gyp/test/ios/gyptest-extension.py new file mode 100755 index 0000000000..bb239ae5b8 --- /dev/null +++ b/third_party/python/gyp/test/ios/gyptest-extension.py @@ -0,0 +1,51 @@ +#!/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 ios app extensions are built correctly. +""" + +from __future__ import print_function + +import TestGyp +import TestMac +import subprocess +import sys + +def CheckStrip(p, expected): + if expected not in subprocess.check_output(['nm','-gU', p]): + print(expected + " shouldn't get stripped out.") + test.fail_test() + +def CheckEntrypoint(p, expected): + if expected not in subprocess.check_output(['nm', p]): + print(expected + "not found.") + test.fail_test() + +if sys.platform == 'darwin' and TestMac.Xcode.Version()>="0600": + + test = TestGyp.TestGyp(formats=['ninja', 'xcode']) + + if test.format in ('ninja', 'xcode-ninja'): + test.skip_test() # bug=534 + + test.run_gyp('extension.gyp', chdir='extension') + + test.build('extension.gyp', 'ExtensionContainer', chdir='extension') + + # Test that the extension is .appex + test.built_file_must_exist( + 'ExtensionContainer.app/PlugIns/ActionExtension.appex', + chdir='extension') + + path = test.built_file_path( + 'ExtensionContainer.app/PlugIns/ActionExtension.appex/ActionExtension', + chdir='extension') + CheckStrip(path, "ActionViewController") + CheckEntrypoint(path, "_NSExtensionMain") + + test.pass_test() + diff --git a/third_party/python/gyp/test/ios/gyptest-framework.py b/third_party/python/gyp/test/ios/gyptest-framework.py new file mode 100755 index 0000000000..a6dd857b20 --- /dev/null +++ b/third_party/python/gyp/test/ios/gyptest-framework.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python + +# Copyright 2016 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 ios app frameworks are built correctly. +""" + +import TestGyp +import TestMac +import subprocess +import sys + +if sys.platform == 'darwin' and TestMac.Xcode.Version()>="0700": + + test = TestGyp.TestGyp(formats=['ninja']) + if test.format == 'xcode-ninja': + test.skip_test() + + test.run_gyp('framework.gyp', chdir='framework') + + test.build('framework.gyp', 'iOSFramework', chdir='framework') + + test.built_file_must_exist( + 'iOSFramework.framework/Headers/iOSFramework.h', + chdir='framework') + test.built_file_must_exist( + 'iOSFramework.framework/Headers/Thing.h', + chdir='framework') + test.built_file_must_exist( + 'iOSFramework.framework/iOSFramework', + chdir='framework') + + test.pass_test() + diff --git a/third_party/python/gyp/test/ios/gyptest-per-config-settings.py b/third_party/python/gyp/test/ios/gyptest-per-config-settings.py new file mode 100644 index 0000000000..c3a22e0562 --- /dev/null +++ b/third_party/python/gyp/test/ios/gyptest-per-config-settings.py @@ -0,0 +1,190 @@ +#!/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 device and simulator bundles are built correctly. +""" + +from __future__ import print_function + +import plistlib +import TestGyp +import os +import struct +import subprocess +import sys +import tempfile +import TestMac + +print("This test is currently disabled: https://crbug.com/483696.") +sys.exit(0) + +def CheckFileType(file, expected): + proc = subprocess.Popen(['lipo', '-info', file], stdout=subprocess.PIPE) + o = proc.communicate()[0].strip() + assert not proc.returncode + if not expected in o: + print('File: Expected %s, got %s' % (expected, o)) + test.fail_test() + +def HasCerts(): + # Because the bots do not have certs, don't check them if there are no + # certs available. + proc = subprocess.Popen(['security','find-identity','-p', 'codesigning', + '-v'], stdout=subprocess.PIPE) + return "0 valid identities found" not in proc.communicate()[0].strip() + +def CheckSignature(file): + proc = subprocess.Popen(['codesign', '-v', file], stdout=subprocess.PIPE) + o = proc.communicate()[0].strip() + assert not proc.returncode + if "code object is not signed at all" in o: + print('File %s not properly signed.' % (file)) + test.fail_test() + +def CheckEntitlements(file, expected_entitlements): + with tempfile.NamedTemporaryFile() as temp: + proc = subprocess.Popen(['codesign', '--display', '--entitlements', + temp.name, file], stdout=subprocess.PIPE) + o = proc.communicate()[0].strip() + assert not proc.returncode + data = temp.read() + entitlements = ParseEntitlements(data) + if not entitlements: + print('No valid entitlements found in %s.' % (file)) + test.fail_test() + if entitlements != expected_entitlements: + print('Unexpected entitlements found in %s.' % (file)) + test.fail_test() + +def ParseEntitlements(data): + if len(data) < 8: + return None + magic, length = struct.unpack('>II', data[:8]) + if magic != 0xfade7171 or length != len(data): + return None + return data[8:] + +def GetXcodeVersionValue(type): + args = ['xcodebuild', '-version', '-sdk', 'iphoneos', type] + job = subprocess.Popen(args, stdout=subprocess.PIPE) + return job.communicate()[0].strip() + +def GetMachineBuild(): + args = ['sw_vers', '-buildVersion'] + job = subprocess.Popen(args, stdout=subprocess.PIPE) + return job.communicate()[0].strip() + +def CheckPlistvalue(plist, key, expected): + if key not in plist: + print('%s not set in plist' % key) + test.fail_test() + return + actual = plist[key] + if actual != expected: + print('File: Expected %s, got %s for %s' % (expected, actual, key)) + test.fail_test() + +def CheckPlistNotSet(plist, key): + if key in plist: + print('%s should not be set in plist' % key) + test.fail_test() + return + +def ConvertBinaryPlistToXML(path): + proc = subprocess.call(['plutil', '-convert', 'xml1', path], + stdout=subprocess.PIPE) + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'xcode']) + + test.run_gyp('test-device.gyp', chdir='app-bundle') + + test_configs = ['Default-iphoneos', 'Default'] + for configuration in test_configs: + test.set_configuration(configuration) + test.build('test-device.gyp', 'test_app', chdir='app-bundle') + result_file = test.built_file_path('Test App Gyp.app/Test App Gyp', + chdir='app-bundle') + test.must_exist(result_file) + info_plist = test.built_file_path('Test App Gyp.app/Info.plist', + chdir='app-bundle') + plist = plistlib.readPlist(info_plist) + xcode_version = TestMac.Xcode.Version() + if xcode_version >= '0720': + if len(plist) != 23: + print('plist should have 23 entries, but it has %s' % len(plist)) + test.fail_test() + + # Values that will hopefully never change. + CheckPlistvalue(plist, 'CFBundleDevelopmentRegion', 'English') + CheckPlistvalue(plist, 'CFBundleExecutable', 'Test App Gyp') + CheckPlistvalue(plist, 'CFBundleIdentifier', 'com.google.Test App Gyp') + CheckPlistvalue(plist, 'CFBundleInfoDictionaryVersion', '6.0') + CheckPlistvalue(plist, 'CFBundleName', 'Test App Gyp') + CheckPlistvalue(plist, 'CFBundlePackageType', 'APPL') + CheckPlistvalue(plist, 'CFBundleShortVersionString', '1.0') + CheckPlistvalue(plist, 'CFBundleSignature', 'ause') + CheckPlistvalue(plist, 'CFBundleVersion', '1') + CheckPlistvalue(plist, 'NSMainNibFile', 'MainMenu') + CheckPlistvalue(plist, 'NSPrincipalClass', 'NSApplication') + CheckPlistvalue(plist, 'UIDeviceFamily', [1, 2]) + + # Values that get pulled from xcodebuild. + machine_build = GetMachineBuild() + platform_version = GetXcodeVersionValue('ProductVersion') + sdk_build = GetXcodeVersionValue('ProductBuildVersion') + xcode_build = TestMac.Xcode.Build() + + # Xcode keeps changing what gets included in executable plists, and it + # changes between device and simuator builds. Allow the strictest tests for + # Xcode 7.2 and above. + if xcode_version >= '0720': + CheckPlistvalue(plist, 'BuildMachineOSBuild', machine_build) + CheckPlistvalue(plist, 'DTCompiler', 'com.apple.compilers.llvm.clang.1_0') + CheckPlistvalue(plist, 'DTPlatformVersion', platform_version) + CheckPlistvalue(plist, 'DTSDKBuild', sdk_build) + CheckPlistvalue(plist, 'DTXcode', xcode_version) + CheckPlistvalue(plist, 'DTXcodeBuild', xcode_build) + CheckPlistvalue(plist, 'MinimumOSVersion', '8.0') + + + if configuration == 'Default-iphoneos': + platform_name = 'iphoneos' + CheckFileType(result_file, 'armv7') + CheckPlistvalue(plist, 'CFBundleSupportedPlatforms', ['iPhoneOS']) + # Apple keeps changing their mind. + if xcode_version >= '0720': + CheckPlistvalue(plist, 'DTPlatformBuild', sdk_build) + else: + platform_name = 'iphonesimulator' + CheckFileType(result_file, 'i386') + CheckPlistvalue(plist, 'CFBundleSupportedPlatforms', ['iPhoneSimulator']) + if xcode_version >= '0720': + CheckPlistvalue(plist, 'DTPlatformBuild', '') + + CheckPlistvalue(plist, 'DTPlatformName', platform_name) + CheckPlistvalue(plist, 'DTSDKName', platform_name + platform_version) + + + if HasCerts() and configuration == 'Default-iphoneos': + test.build('test-device.gyp', 'sig_test', chdir='app-bundle') + result_file = test.built_file_path('sigtest.app/sigtest', + chdir='app-bundle') + CheckSignature(result_file) + info_plist = test.built_file_path('sigtest.app/Info.plist', + chdir='app-bundle') + + plist = plistlib.readPlist(info_plist) + CheckPlistvalue(plist, 'UIDeviceFamily', [1]) + + entitlements_file = test.built_file_path('sig_test.xcent', + chdir='app-bundle') + if os.path.isfile(entitlements_file): + expected_entitlements = open(entitlements_file).read() + CheckEntitlements(result_file, expected_entitlements) + + test.pass_test() diff --git a/third_party/python/gyp/test/ios/gyptest-watch.py b/third_party/python/gyp/test/ios/gyptest-watch.py new file mode 100755 index 0000000000..39bab49bb0 --- /dev/null +++ b/third_party/python/gyp/test/ios/gyptest-watch.py @@ -0,0 +1,44 @@ +#!/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 ios watch extensions and apps are built correctly. +""" + +from __future__ import print_function + +import TestGyp +import TestMac + +import sys + +if sys.platform == 'darwin': + print("This test is currently disabled: https://crbug.com/483696.") + sys.exit(0) + + +if sys.platform == 'darwin' and TestMac.Xcode.Version() >= "0620": + test = TestGyp.TestGyp(formats=['ninja', 'xcode']) + + test.run_gyp('watch.gyp', chdir='watch') + + test.build( + 'watch.gyp', + 'WatchContainer', + chdir='watch') + + # Test that the extension exists + test.built_file_must_exist( + 'WatchContainer.app/PlugIns/WatchKitExtension.appex', + chdir='watch') + + # Test that the watch app exists + test.built_file_must_exist( + 'WatchContainer.app/PlugIns/WatchKitExtension.appex/WatchApp.app', + chdir='watch') + + test.pass_test() + diff --git a/third_party/python/gyp/test/ios/gyptest-xcode-ninja.py b/third_party/python/gyp/test/ios/gyptest-xcode-ninja.py new file mode 100644 index 0000000000..609db8c98f --- /dev/null +++ b/third_party/python/gyp/test/ios/gyptest-xcode-ninja.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. + +""" +Verify that the xcode-ninja GYP_GENERATOR runs and builds correctly. +""" + +import TestGyp + +import os +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['xcode']) + + # Run ninja and xcode-ninja + test.formats = ['ninja', 'xcode-ninja'] + test.run_gyp('test.gyp', chdir='app-bundle') + + # If it builds the target, it works. + test.build('test.ninja.gyp', chdir='app-bundle') + test.pass_test() diff --git a/third_party/python/gyp/test/ios/watch/WatchApp/Images.xcassets/AppIcon.appiconset/Contents.json b/third_party/python/gyp/test/ios/watch/WatchApp/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..562c5eff97 --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchApp/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,62 @@ +{ + "images" : [ + { + "size" : "14.5x14.5", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "38mm" + }, + { + "size" : "18x18", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "42mm" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "2x" + }, + { + "size" : "29.3x29.3", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "38mm" + }, + { + "size" : "44x44", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "42mm" + }, + { + "size" : "86x86", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "38mm" + }, + { + "size" : "98x98", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "42mm" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/third_party/python/gyp/test/ios/watch/WatchApp/Images.xcassets/LaunchImage.launchimage/Contents.json b/third_party/python/gyp/test/ios/watch/WatchApp/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000000..ed123feff6 --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchApp/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "watch", + "extent" : "full-screen", + "minimum-system-version" : "8.0", + "subtype" : "38mm", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "watch", + "extent" : "full-screen", + "minimum-system-version" : "8.0", + "subtype" : "42mm", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/third_party/python/gyp/test/ios/watch/WatchApp/Info.plist b/third_party/python/gyp/test/ios/watch/WatchApp/Info.plist new file mode 100644 index 0000000000..3cf65b8285 --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchApp/Info.plist @@ -0,0 +1,35 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + WatchApp + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + com.google.gyptest.watch.watchapp + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + WKCompanionAppBundleIdentifier + com.google.gyptest.watch + WKWatchKitApp + + + diff --git a/third_party/python/gyp/test/ios/watch/WatchApp/Interface.storyboard b/third_party/python/gyp/test/ios/watch/WatchApp/Interface.storyboard new file mode 100644 index 0000000000..5f52cb6c90 --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchApp/Interface.storyboard @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/third_party/python/gyp/test/ios/watch/WatchContainer/AppDelegate.h b/third_party/python/gyp/test/ios/watch/WatchContainer/AppDelegate.h new file mode 100644 index 0000000000..510e2300b1 --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchContainer/AppDelegate.h @@ -0,0 +1,12 @@ +// 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. + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end + diff --git a/third_party/python/gyp/test/ios/watch/WatchContainer/AppDelegate.m b/third_party/python/gyp/test/ios/watch/WatchContainer/AppDelegate.m new file mode 100644 index 0000000000..1197bc1bbc --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchContainer/AppDelegate.m @@ -0,0 +1,19 @@ +// 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. + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication*)application + didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { + // Override point for customization after application launch. + return YES; +} + +@end diff --git a/third_party/python/gyp/test/ios/watch/WatchContainer/Base.lproj/Main.storyboard b/third_party/python/gyp/test/ios/watch/WatchContainer/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..e8f3cfb40c --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchContainer/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/third_party/python/gyp/test/ios/watch/WatchContainer/Images.xcassets/AppIcon.appiconset/Contents.json b/third_party/python/gyp/test/ios/watch/WatchContainer/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..f697f61f4a --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchContainer/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,53 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/third_party/python/gyp/test/ios/watch/WatchContainer/Images.xcassets/LaunchImage.launchimage/Contents.json b/third_party/python/gyp/test/ios/watch/WatchContainer/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000000..4458b40c05 --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchContainer/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,51 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "subtype" : "retina4", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/third_party/python/gyp/test/ios/watch/WatchContainer/Info.plist b/third_party/python/gyp/test/ios/watch/WatchContainer/Info.plist new file mode 100644 index 0000000000..a40319c78e --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchContainer/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + WatchContainer + CFBundleIdentifier + com.google.gyptest.watch + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + + diff --git a/third_party/python/gyp/test/ios/watch/WatchContainer/ViewController.h b/third_party/python/gyp/test/ios/watch/WatchContainer/ViewController.h new file mode 100644 index 0000000000..fad7754714 --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchContainer/ViewController.h @@ -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. + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/third_party/python/gyp/test/ios/watch/WatchContainer/ViewController.m b/third_party/python/gyp/test/ios/watch/WatchContainer/ViewController.m new file mode 100644 index 0000000000..3810fa9cba --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchContainer/ViewController.m @@ -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. + +#import "ViewController.h" + +@interface ViewController () + + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/third_party/python/gyp/test/ios/watch/WatchContainer/main.m b/third_party/python/gyp/test/ios/watch/WatchContainer/main.m new file mode 100644 index 0000000000..47aecb5148 --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchContainer/main.m @@ -0,0 +1,13 @@ +// 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. +// +#import +#import "AppDelegate.h" + +int main(int argc, char* argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, + NSStringFromClass([AppDelegate class])); + } +} diff --git a/third_party/python/gyp/test/ios/watch/WatchKitExtension/Images.xcassets/MyImage.imageset/Contents.json b/third_party/python/gyp/test/ios/watch/WatchKitExtension/Images.xcassets/MyImage.imageset/Contents.json new file mode 100644 index 0000000000..f80d950868 --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchKitExtension/Images.xcassets/MyImage.imageset/Contents.json @@ -0,0 +1,20 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/third_party/python/gyp/test/ios/watch/WatchKitExtension/Info.plist b/third_party/python/gyp/test/ios/watch/WatchKitExtension/Info.plist new file mode 100644 index 0000000000..7a354643ef --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchKitExtension/Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + WatchContainer WatchKit Extension + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + com.google.gyptest.watch.watchkitextension + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + XPC! + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSExtension + + NSExtensionAttributes + + WKAppBundleIdentifier + com.google.gyptest.watch.watchapp + + NSExtensionPointIdentifier + com.apple.watchkit + + RemoteInterfacePrincipalClass + InterfaceController + + diff --git a/third_party/python/gyp/test/ios/watch/WatchKitExtension/InterfaceController.h b/third_party/python/gyp/test/ios/watch/WatchKitExtension/InterfaceController.h new file mode 100644 index 0000000000..c3395eb484 --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchKitExtension/InterfaceController.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. + +#import +#import + +@interface InterfaceController : WKInterfaceController +@end + diff --git a/third_party/python/gyp/test/ios/watch/WatchKitExtension/InterfaceController.m b/third_party/python/gyp/test/ios/watch/WatchKitExtension/InterfaceController.m new file mode 100644 index 0000000000..564b7d1da5 --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchKitExtension/InterfaceController.m @@ -0,0 +1,25 @@ +// 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. + +#import "InterfaceController.h" + +@implementation InterfaceController + +- (instancetype)initWithContext:(id)context { + if ((self = [super initWithContext:context])) { + // -initWithContext: + } + return self; +} + +- (void)willActivate { + // -willActivate +} + +- (void)didDeactivate { + // -didDeactivate +} + +@end + diff --git a/third_party/python/gyp/test/ios/watch/WatchKitExtension/MainInterface.storyboard b/third_party/python/gyp/test/ios/watch/WatchKitExtension/MainInterface.storyboard new file mode 100644 index 0000000000..5aa58184e8 --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/WatchKitExtension/MainInterface.storyboard @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/third_party/python/gyp/test/ios/watch/watch.gyp b/third_party/python/gyp/test/ios/watch/watch.gyp new file mode 100644 index 0000000000..49be5554ee --- /dev/null +++ b/third_party/python/gyp/test/ios/watch/watch.gyp @@ -0,0 +1,105 @@ +# 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. + +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + 'target_defaults': { + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '8.2', + 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', + } + }, + 'targets': [ + { + 'target_name': 'WatchContainer', + 'product_name': 'WatchContainer', + 'type': 'executable', + 'mac_bundle': 1, + 'mac_bundle_resources': [ + 'WatchContainer/Base.lproj/Main.storyboard', + ], + 'sources': [ + 'WatchContainer/AppDelegate.h', + 'WatchContainer/AppDelegate.m', + 'WatchContainer/ViewController.h', + 'WatchContainer/ViewController.m', + 'WatchContainer/main.m', + ], + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/WatchContainer.app/PlugIns', + 'files': [ + '<(PRODUCT_DIR)/WatchKitExtension.appex', + ]}], + 'dependencies': [ + 'WatchKitExtension' + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'WatchContainer/Info.plist', + }, + }, + { + 'target_name': 'WatchKitExtension', + 'product_name': 'WatchKitExtension', + 'type': 'executable', + 'mac_bundle': 1, + 'ios_watchkit_extension': 1, + 'sources': [ + 'WatchKitExtension/InterfaceController.h', + 'WatchKitExtension/InterfaceController.m', + ], + 'mac_bundle_resources': [ + 'WatchKitExtension/Images.xcassets', + '<(PRODUCT_DIR)/WatchApp.app', + ], + 'dependencies': [ + 'WatchApp' + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/WatchKit.framework', + ], + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'WatchKitExtension/Info.plist', + 'SKIP_INSTALL': 'YES', + 'COPY_PHASE_STRIP': 'NO', + }, + }, + { + 'target_name': 'WatchApp', + 'product_name': 'WatchApp', + 'type': 'executable', + 'mac_bundle': 1, + 'ios_watch_app': 1, + 'mac_bundle_resources': [ + 'WatchApp/Images.xcassets', + 'WatchApp/Interface.storyboard', + ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'WatchApp/Info.plist', + 'SKIP_INSTALL': 'YES', + 'COPY_PHASE_STRIP': 'NO', + 'TARGETED_DEVICE_FAMILY': '4', + 'TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]': '1,4', + }, + }, + ], +} + diff --git a/third_party/python/gyp/test/ios/xctests/App/AppDelegate.h b/third_party/python/gyp/test/ios/xctests/App/AppDelegate.h new file mode 100644 index 0000000000..f8efce97ed --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/App/AppDelegate.h @@ -0,0 +1,11 @@ +// Copyright 2015 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. + +#import + +@interface AppDelegate : UIResponder + +@property(strong, nonatomic) UIWindow* window; + +@end diff --git a/third_party/python/gyp/test/ios/xctests/App/AppDelegate.m b/third_party/python/gyp/test/ios/xctests/App/AppDelegate.m new file mode 100644 index 0000000000..825dda75b7 --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/App/AppDelegate.m @@ -0,0 +1,18 @@ +// Copyright 2015 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. + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication*)application + didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { + return YES; +} + +@end diff --git a/third_party/python/gyp/test/ios/xctests/App/Base.lproj/LaunchScreen.xib b/third_party/python/gyp/test/ios/xctests/App/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000000..063dc5ea79 --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/App/Base.lproj/LaunchScreen.xib @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/third_party/python/gyp/test/ios/xctests/App/Base.lproj/Main.storyboard b/third_party/python/gyp/test/ios/xctests/App/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..f56d2f3bb5 --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/App/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/third_party/python/gyp/test/ios/xctests/App/Images.xcassets/AppIcon.appiconset/Contents.json b/third_party/python/gyp/test/ios/xctests/App/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..36d2c80d88 --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/App/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/third_party/python/gyp/test/ios/xctests/App/Info.plist b/third_party/python/gyp/test/ios/xctests/App/Info.plist new file mode 100644 index 0000000000..3f938f60f4 --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/App/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.google.gyptest.App + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/third_party/python/gyp/test/ios/xctests/App/ViewController.h b/third_party/python/gyp/test/ios/xctests/App/ViewController.h new file mode 100644 index 0000000000..95a281e8d8 --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/App/ViewController.h @@ -0,0 +1,9 @@ +// Copyright 2015 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. + +#import + +@interface ViewController : UIViewController + +@end diff --git a/third_party/python/gyp/test/ios/xctests/App/ViewController.m b/third_party/python/gyp/test/ios/xctests/App/ViewController.m new file mode 100644 index 0000000000..d38e3c5bb7 --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/App/ViewController.m @@ -0,0 +1,21 @@ +// Copyright 2015 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. + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; +} + +@end diff --git a/third_party/python/gyp/test/ios/xctests/App/main.m b/third_party/python/gyp/test/ios/xctests/App/main.m new file mode 100644 index 0000000000..83368075cd --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/App/main.m @@ -0,0 +1,13 @@ +// Copyright 2015 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. + +#import +#import "AppDelegate.h" + +int main(int argc, char* argv[]) { + @autoreleasepool { + return UIApplicationMain( + argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/third_party/python/gyp/test/ios/xctests/AppTests/AppTests.m b/third_party/python/gyp/test/ios/xctests/AppTests/AppTests.m new file mode 100644 index 0000000000..22121b089d --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/AppTests/AppTests.m @@ -0,0 +1,31 @@ +// Copyright 2015 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. + +#import +#import + +@interface AppTests : XCTestCase + +@end + +@implementation AppTests + +- (void)setUp { + [super setUp]; +} + +- (void)tearDown { + [super tearDown]; +} + +- (void)testExample { + XCTAssert(YES, @"Pass"); +} + +- (void)testPerformanceExample { + [self measureBlock:^{ + }]; +} + +@end diff --git a/third_party/python/gyp/test/ios/xctests/AppTests/Info.plist b/third_party/python/gyp/test/ios/xctests/AppTests/Info.plist new file mode 100644 index 0000000000..d43ff4ba8d --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/AppTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.google.gyptest.AppTests + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/third_party/python/gyp/test/ios/xctests/gyptest-xctests.py b/third_party/python/gyp/test/ios/xctests/gyptest-xctests.py new file mode 100644 index 0000000000..6642cfb938 --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/gyptest-xctests.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python + +# Copyright 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 iOS XCTests can be built correctly. +""" + +import TestGyp + +import os +import subprocess +import sys + +def HasCerts(): + # Because the bots do not have certs, don't check them if there are no + # certs available. + proc = subprocess.Popen(['security','find-identity','-p', 'codesigning', + '-v'], stdout=subprocess.PIPE) + return "0 valid identities found" not in proc.communicate()[0].strip() + +if sys.platform == "darwin": + # This test appears to be flaky and hangs some of the time. + sys.exit(2) # bug=531 + + test = TestGyp.TestGyp(formats=['xcode', 'ninja']) + test.run_gyp('xctests.gyp') + test_configs = ['Default'] + # TODO(crbug.com/557418): Enable this once xcodebuild works for iOS devices. + #if HasCerts() and test.format == 'xcode': + # test_configs.append('Default-iphoneos') + for config in test_configs: + test.set_configuration(config) + test.build('xctests.gyp', test.ALL) + test.built_file_must_exist('app_under_test.app/app_under_test') + test.built_file_must_exist('app_tests.xctest/app_tests') + if 'ninja' in test.format: + test.built_file_must_exist('obj/AppTests/app_tests.AppTests.i386.o') + test.built_file_must_exist('obj/AppTests/app_tests.AppTests.x86_64.o') + elif test.format == 'xcode': + xcode_object_path = os.path.join('..', 'xctests.build', + 'Default-iphonesimulator', + 'app_tests.build', 'Objects-normal', + '%s', 'AppTests.o') + test.built_file_must_exist(xcode_object_path % 'i386') + test.built_file_must_exist(xcode_object_path % 'x86_64') + test.pass_test() diff --git a/third_party/python/gyp/test/ios/xctests/xctests.gyp b/third_party/python/gyp/test/ios/xctests/xctests.gyp new file mode 100644 index 0000000000..8d4d6393b7 --- /dev/null +++ b/third_party/python/gyp/test/ios/xctests/xctests.gyp @@ -0,0 +1,74 @@ +# Copyright 2015 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. +{ + 'conditions': [ + ['"<(GENERATOR)"=="ninja"', { + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + }] + ], + 'target_defaults': { + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'SDKROOT': 'iphonesimulator', # -isysroot + 'CONFIGURATION_BUILD_DIR':'build/Default', + 'IPHONEOS_DEPLOYMENT_TARGET': '9.0', + 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', + } + }, + 'targets': [ + { + 'target_name': 'app_under_test', + 'type': 'executable', + 'mac_bundle': 1, + 'mac_bundle_resources': [ + 'App/Base.lproj/LaunchScreen.xib', + 'App/Base.lproj/Main.storyboard', + ], + 'sources': [ + 'App/AppDelegate.h', + 'App/AppDelegate.m', + 'App/ViewController.h', + 'App/ViewController.m', + 'App/main.m', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'App/Info.plist', + }, + }, + { + 'target_name': 'app_tests', + 'type': 'loadable_module', + 'mac_xctest_bundle': 1, + 'sources': [ + 'AppTests/AppTests.m', + ], + 'dependencies': [ + 'app_under_test' + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + ], + }, + 'xcode_settings': { + 'WRAPPER_EXTENSION': 'xctest', + 'INFOPLIST_FILE': 'AppTests/Info.plist', + 'BUNDLE_LOADER': '$(BUILT_PRODUCTS_DIR)/app_under_test.app/app_under_test', + 'TEST_HOST': '$(BUNDLE_LOADER)', + }, + }, + ], +} -- cgit v1.2.3