Commit df6b1f8a authored by Per Eckerdal's avatar Per Eckerdal

Test that linked deps get compiled and linked properly

On my machine, this test takes 3.2s.
parent 739c42df
pod 'XcodeprojTestPod', :path => 'XcodeprojTestPod'
../../../XcodeprojTestPod/Subproject/Subproject/Subproject.h
\ No newline at end of file
../../../XcodeprojTestPod/XcodeprojTestPod.h
\ No newline at end of file
../../../XcodeprojTestPod/XcodeprojTestPod.h
\ No newline at end of file
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
2319D2C5F44B42888CB33449 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46990BAC3A9A4021AF6A0077 /* libPods.a */; };
82AA92B6182BA170001D702E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 82AA92B5182BA170001D702E /* Foundation.framework */; };
82AA92B9182BA170001D702E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 82AA92B8182BA170001D702E /* main.m */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
82AA92B0182BA170001D702E /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
46990BAC3A9A4021AF6A0077 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
82AA92B2182BA170001D702E /* XcodeprojTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = XcodeprojTest; sourceTree = BUILT_PRODUCTS_DIR; };
82AA92B5182BA170001D702E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
82AA92B8182BA170001D702E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
95D185A0B0C446B3A4EE4B2A /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
82AA92AF182BA170001D702E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
82AA92B6182BA170001D702E /* Foundation.framework in Frameworks */,
2319D2C5F44B42888CB33449 /* libPods.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
82AA92A9182BA170001D702E = {
isa = PBXGroup;
children = (
82AA92B7182BA170001D702E /* XcodeprojTest */,
82AA92B4182BA170001D702E /* Frameworks */,
82AA92B3182BA170001D702E /* Products */,
95D185A0B0C446B3A4EE4B2A /* Pods.xcconfig */,
);
sourceTree = "<group>";
};
82AA92B3182BA170001D702E /* Products */ = {
isa = PBXGroup;
children = (
82AA92B2182BA170001D702E /* XcodeprojTest */,
);
name = Products;
sourceTree = "<group>";
};
82AA92B4182BA170001D702E /* Frameworks */ = {
isa = PBXGroup;
children = (
82AA92B5182BA170001D702E /* Foundation.framework */,
46990BAC3A9A4021AF6A0077 /* libPods.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
82AA92B7182BA170001D702E /* XcodeprojTest */ = {
isa = PBXGroup;
children = (
82AA92B8182BA170001D702E /* main.m */,
);
path = XcodeprojTest;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
82AA92B1182BA170001D702E /* XcodeprojTest */ = {
isa = PBXNativeTarget;
buildConfigurationList = 82AA92C0182BA170001D702E /* Build configuration list for PBXNativeTarget "XcodeprojTest" */;
buildPhases = (
8B49AD978F3248A4B2C3A321 /* Check Pods Manifest.lock */,
82AA92AE182BA170001D702E /* Sources */,
82AA92AF182BA170001D702E /* Frameworks */,
82AA92B0182BA170001D702E /* CopyFiles */,
6FA806B1A75A43B39CFEF6B1 /* Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = XcodeprojTest;
productName = XcodeprojTest;
productReference = 82AA92B2182BA170001D702E /* XcodeprojTest */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
82AA92AA182BA170001D702E /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = "Per Eckerdal";
};
buildConfigurationList = 82AA92AD182BA170001D702E /* Build configuration list for PBXProject "XcodeprojTest" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 82AA92A9182BA170001D702E;
productRefGroup = 82AA92B3182BA170001D702E /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
82AA92B1182BA170001D702E /* XcodeprojTest */,
);
};
/* End PBXProject section */
/* Begin PBXShellScriptBuildPhase section */
6FA806B1A75A43B39CFEF6B1 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
8B49AD978F3248A4B2C3A321 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
82AA92AE182BA170001D702E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
82AA92B9182BA170001D702E /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
82AA92BE182BA170001D702E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
82AA92BF182BA170001D702E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
SDKROOT = macosx;
};
name = Release;
};
82AA92C1182BA170001D702E /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 95D185A0B0C446B3A4EE4B2A /* Pods.xcconfig */;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
82AA92C2182BA170001D702E /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 95D185A0B0C446B3A4EE4B2A /* Pods.xcconfig */;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
82AA92AD182BA170001D702E /* Build configuration list for PBXProject "XcodeprojTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
82AA92BE182BA170001D702E /* Debug */,
82AA92BF182BA170001D702E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
82AA92C0182BA170001D702E /* Build configuration list for PBXNativeTarget "XcodeprojTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
82AA92C1182BA170001D702E /* Debug */,
82AA92C2182BA170001D702E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 82AA92AA182BA170001D702E /* Project object */;
}
#import <Foundation/Foundation.h>
#import <XcodeprojTestPod/XcodeprojTestPod.h>
int main(int argc, const char * argv[])
{
@autoreleasepool {
if ([XcodeprojTestPod twenty] == 20) {
NSLog(@"Success");
return 0;
} else {
NSLog(@"Failure!");
return 1;
}
}
return 0;
}
This project is licensed under the MIT license.
Copyright (c) 2013 Per Eckerdal <per.eckerdal@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
82AA928D182B9D5B001D702E /* Subproject.m in Sources */ = {isa = PBXBuildFile; fileRef = 82AA928C182B9D5B001D702E /* Subproject.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
82AA927F182B9D5B001D702E /* libSubproject.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSubproject.a; sourceTree = BUILT_PRODUCTS_DIR; };
82AA9285182B9D5B001D702E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
82AA928B182B9D5B001D702E /* Subproject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Subproject.h; sourceTree = "<group>"; };
82AA928C182B9D5B001D702E /* Subproject.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Subproject.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
82AA927C182B9D5B001D702E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
82AA9276182B9D5B001D702E = {
isa = PBXGroup;
children = (
82AA9288182B9D5B001D702E /* Subproject */,
82AA9281182B9D5B001D702E /* Frameworks */,
82AA9280182B9D5B001D702E /* Products */,
);
sourceTree = "<group>";
};
82AA9280182B9D5B001D702E /* Products */ = {
isa = PBXGroup;
children = (
82AA927F182B9D5B001D702E /* libSubproject.a */,
);
name = Products;
sourceTree = "<group>";
};
82AA9281182B9D5B001D702E /* Frameworks */ = {
isa = PBXGroup;
children = (
82AA9285182B9D5B001D702E /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
82AA9288182B9D5B001D702E /* Subproject */ = {
isa = PBXGroup;
children = (
82AA928B182B9D5B001D702E /* Subproject.h */,
82AA928C182B9D5B001D702E /* Subproject.m */,
);
path = Subproject;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
82AA927D182B9D5B001D702E /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
82AA927E182B9D5B001D702E /* Subproject */ = {
isa = PBXNativeTarget;
buildConfigurationList = 82AA92A3182B9D5B001D702E /* Build configuration list for PBXNativeTarget "Subproject" */;
buildPhases = (
82AA927B182B9D5B001D702E /* Sources */,
82AA927C182B9D5B001D702E /* Frameworks */,
82AA927D182B9D5B001D702E /* Headers */,
);
buildRules = (
);
dependencies = (
);
name = Subproject;
productName = Subproject;
productReference = 82AA927F182B9D5B001D702E /* libSubproject.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
82AA9277182B9D5B001D702E /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = "Per Eckerdal";
};
buildConfigurationList = 82AA927A182B9D5B001D702E /* Build configuration list for PBXProject "Subproject" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 82AA9276182B9D5B001D702E;
productRefGroup = 82AA9280182B9D5B001D702E /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
82AA927E182B9D5B001D702E /* Subproject */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
82AA927B182B9D5B001D702E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
82AA928D182B9D5B001D702E /* Subproject.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
82AA92A1182B9D5B001D702E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
82AA92A2182B9D5B001D702E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
SDKROOT = macosx;
};
name = Release;
};
82AA92A4182B9D5B001D702E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
82AA92A5182B9D5B001D702E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
82AA927A182B9D5B001D702E /* Build configuration list for PBXProject "Subproject" */ = {
isa = XCConfigurationList;
buildConfigurations = (
82AA92A1182B9D5B001D702E /* Debug */,
82AA92A2182B9D5B001D702E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
82AA92A3182B9D5B001D702E /* Build configuration list for PBXNativeTarget "Subproject" */ = {
isa = XCConfigurationList;
buildConfigurations = (
82AA92A4182B9D5B001D702E /* Debug */,
82AA92A5182B9D5B001D702E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 82AA9277182B9D5B001D702E /* Project object */;
}
#import <Foundation/Foundation.h>
@interface Subproject : NSObject
+ (NSInteger)twelve;
@end
#import "Subproject.h"
@implementation Subproject
+ (NSInteger)twelve
{
return 12;
}
@end
#import <Foundation/Foundation.h>
@interface XcodeprojTestPod : NSObject
+ (NSInteger)twenty;
@end
#import "XcodeprojTestPod.h"
#import "Subproject/Subproject/Subproject.h"
@implementation XcodeprojTestPod
+ (NSInteger)twenty
{
return [Subproject twelve] + 8;
}
@end
Pod::Spec.new do |s|
s.name = "XcodeprojTestPod"
s.version = "1.0"
s.summary = "A pod for testing spec.xcodeproj attribute"
s.description = <<-DESC
A pod for testing CocoaPod's ability to add Xcode projects as subprojects
to specs.
DESC
s.homepage = "https://www.github.com/pereckerdal/XcodeprojTestPod"
s.license = 'MIT'
s.author = { "Per Eckerdal" => "per.eckerdal@gmail.com" }
s.platform = :osx
s.source = { :git => 'https://github.com/pereckerdal/XcodeprojTestPod.git',
:tag => "#{s.version}" }
s.xcodeproj = { :project => 'Subproject/Subproject.xcodeproj',
:library_targets => ['Subproject'] }
s.source_files = '*.{h,m}', 'Subproject/**/*.h'
s.public_header_files = '*.h'
end
require 'fileutils'
require 'pathname'
root = Pathname.new(File.dirname(__FILE__)).realpath
excludes = %w(Podfile
clean.rb
XcodeprojTest
XcodeprojTest/main.m
XcodeprojTest.xcodeproj
XcodeprojTest.xcodeproj/project.pbxproj
XcodeprojTest.xcodeproj/project.xcworkspace
XcodeprojTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
XcodeprojTestPod
XcodeprojTestPod/.gitignore
XcodeprojTestPod/LICENSE
XcodeprojTestPod/Subproject
XcodeprojTestPod/Subproject/Subproject
XcodeprojTestPod/Subproject/Subproject/Subproject.h
XcodeprojTestPod/Subproject/Subproject/Subproject.m
XcodeprojTestPod/Subproject/Subproject.xcodeproj
XcodeprojTestPod/Subproject/Subproject.xcodeproj/project.pbxproj
XcodeprojTestPod/Subproject/Subproject.xcodeproj/project.xcworkspace
XcodeprojTestPod/Subproject/Subproject.xcodeproj/project.xcworkspace/contents.xcworkspacedata
XcodeprojTestPod/XcodeprojTestPod.h
XcodeprojTestPod/XcodeprojTestPod.m
XcodeprojTestPod/XcodeprojTestPod.podspec).map { |p| root+p }
paths_in_dir = Dir[root.to_s+'/**/*'].map do |filename|
Pathname.new(filename).realpath
end
files_to_remove = paths_in_dir.find_all do |path|
!excludes.include?(path)
end
files_to_remove.sort.reverse.each do |file|
unless file.to_s.start_with?(root.to_s)
# Double-check that we don't remove lots of files like crazy
raise Error, "A horrible internal error was about to happen!"
end
if File.directory?(file)
FileUtils.rmdir(file)
else
FileUtils.rm(file)
end
end
require File.expand_path('../../../spec_helper', __FILE__)
def execute_command(command)
if ENV['VERBOSE']
sh(command)
else
output = `#{command} 2>&1`
raise output unless $?.success?
end
end
module Pod
describe Installer::LinkedDependenciesInstaller do
......@@ -179,6 +188,34 @@ module Pod
#-------------------------------------------------------------------------#
describe "Functional Tests" do
it "actually compiles and links properly" do
load(fixture('XcodeprojTest/clean.rb'))
begin
Dir.chdir(fixture('XcodeprojTest')) do
pod_command = 'bundle exec ../../../bin/sandbox-pod'
execute_command "#{pod_command} install --verbose --no-repo-update 2>&1"
# Create the XcodeprojTest scheme, in order to be able to build with xcodebuild
testproj = Xcodeproj::Project.open(fixture('XcodeprojTest/XcodeprojTest.xcodeproj'))
testproj.recreate_user_schemes
execute_command "xcodebuild -workspace XcodeprojTest.xcworkspace -scheme XcodeprojTest -configuration Release install DSTROOT=$(pwd)"
`./usr/local/bin/XcodeprojTest 2>&1`.should.match /Success/
$?.success?.should.be.true
end
ensure
load(fixture('XcodeprojTest/clean.rb'))
end
end
end
#-------------------------------------------------------------------------#
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment