diff --git a/lib/slather/project.rb b/lib/slather/project.rb index fc1d8976..330183c6 100755 --- a/lib/slather/project.rb +++ b/lib/slather/project.rb @@ -587,6 +587,19 @@ def find_binary_files def find_buildable_names(xcscheme) found_buildable_names = [] + # enumerate code coverage targets + begin + code_coverage_targets = xcscheme.test_action.xml_element.elements['CodeCoverageTargets'] + targets = code_coverage_targets.map do |node| + Xcodeproj::XCScheme::BuildableReference.new(node) if node.is_a?(REXML::Element) + end.compact + buildable_names = targets.each do |target| + found_buildable_names.push(target.buildable_name) + end + rescue + # just in case if there are no entries in the test action + end + # enumerate build action entries begin xcscheme.build_action.entries.each do |entry| diff --git a/spec/fixtures/FixtureFramework/FixtureFramework.h b/spec/fixtures/FixtureFramework/FixtureFramework.h new file mode 100644 index 00000000..1a94b610 --- /dev/null +++ b/spec/fixtures/FixtureFramework/FixtureFramework.h @@ -0,0 +1,19 @@ +// +// FixtureFramework.h +// FixtureFramework +// +// Created by Stephen Williams on 11/03/21. +// Copyright © 2021 marklarr. All rights reserved. +// + +#import + +//! Project version number for FixtureFramework. +FOUNDATION_EXPORT double FixtureFrameworkVersionNumber; + +//! Project version string for FixtureFramework. +FOUNDATION_EXPORT const unsigned char FixtureFrameworkVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/spec/fixtures/FixtureFramework/FlashExperiment.swift b/spec/fixtures/FixtureFramework/FlashExperiment.swift new file mode 100644 index 00000000..5ab1f690 --- /dev/null +++ b/spec/fixtures/FixtureFramework/FlashExperiment.swift @@ -0,0 +1,7 @@ +import Foundation + +public struct FlashExperiment { + public let isAwesome = true + + public init() {} +} diff --git a/spec/fixtures/FixtureFramework/Info.plist b/spec/fixtures/FixtureFramework/Info.plist new file mode 100644 index 00000000..a996e66c --- /dev/null +++ b/spec/fixtures/FixtureFramework/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright + Copyright © 2021 marklarr. All rights reserved. + + diff --git a/spec/fixtures/FixtureFrameworkTests/FixtureFrameworkTests.swift b/spec/fixtures/FixtureFrameworkTests/FixtureFrameworkTests.swift new file mode 100644 index 00000000..0b77f57c --- /dev/null +++ b/spec/fixtures/FixtureFrameworkTests/FixtureFrameworkTests.swift @@ -0,0 +1,34 @@ +// +// FixtureFrameworkTests.swift +// FixtureFrameworkTests +// +// Created by Stephen Williams on 11/03/21. +// Copyright © 2021 marklarr. All rights reserved. +// + +import XCTest +@testable import FixtureFramework + +class FixtureFrameworkTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/spec/fixtures/FixtureFrameworkTests/FlashExperimentTests.swift b/spec/fixtures/FixtureFrameworkTests/FlashExperimentTests.swift new file mode 100644 index 00000000..88c58db0 --- /dev/null +++ b/spec/fixtures/FixtureFrameworkTests/FlashExperimentTests.swift @@ -0,0 +1,9 @@ +import XCTest +import FixtureFramework + +class FlashExperimentTests: XCTestCase { + func testExample() throws { + let sut = FlashExperiment() + XCTAssertTrue(sut.isAwesome, "Your flash experiment isn't awesome!") + } +} diff --git a/spec/fixtures/FixtureFrameworkTests/Info.plist b/spec/fixtures/FixtureFrameworkTests/Info.plist new file mode 100644 index 00000000..64d65ca4 --- /dev/null +++ b/spec/fixtures/FixtureFrameworkTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/spec/fixtures/fixtures.xcodeproj/project.pbxproj b/spec/fixtures/fixtures.xcodeproj/project.pbxproj index 5f0ca1e9..401f3447 100644 --- a/spec/fixtures/fixtures.xcodeproj/project.pbxproj +++ b/spec/fixtures/fixtures.xcodeproj/project.pbxproj @@ -35,6 +35,8 @@ 8C9A2046195965F10013B6B3 /* libfixtures.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C9A202D195965F10013B6B3 /* libfixtures.a */; }; 8C9A204C195965F10013B6B3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8C9A204A195965F10013B6B3 /* InfoPlist.strings */; }; 8C9A204E195965F10013B6B3 /* fixturesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9A204D195965F10013B6B3 /* fixturesTests.m */; }; + B1E6981225F96B680086A3E2 /* FixtureFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E6980425F96B670086A3E2 /* FixtureFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B1E6982025F96B930086A3E2 /* FlashExperiment.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1E6981F25F96B930086A3E2 /* FlashExperiment.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -52,6 +54,20 @@ remoteGlobalIDString = 8C9A202C195965F10013B6B3; remoteInfo = fixtures; }; + B1E6982F25F96F490086A3E2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 8C9A2025195965F00013B6B3 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B1E6980125F96B670086A3E2; + remoteInfo = FixtureFramework; + }; + B1E6983725F970320086A3E2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 8C9A2025195965F00013B6B3 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B1E6980125F96B670086A3E2; + remoteInfo = FixtureFramework; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -86,6 +102,13 @@ 8C9A2049195965F10013B6B3 /* fixturesTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "fixturesTests-Info.plist"; sourceTree = ""; }; 8C9A204B195965F10013B6B3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 8C9A204D195965F10013B6B3 /* fixturesTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = fixturesTests.m; sourceTree = ""; }; + B1E6980225F96B670086A3E2 /* FixtureFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FixtureFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B1E6980425F96B670086A3E2 /* FixtureFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FixtureFramework.h; sourceTree = ""; }; + B1E6980525F96B670086A3E2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B1E6980F25F96B680086A3E2 /* FixtureFrameworkTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FixtureFrameworkTests.swift; sourceTree = ""; }; + B1E6981125F96B680086A3E2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B1E6981F25F96B930086A3E2 /* FlashExperiment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlashExperiment.swift; sourceTree = ""; }; + B1E6982725F96BD30086A3E2 /* FlashExperimentTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlashExperimentTests.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -124,6 +147,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + B1E697FF25F96B670086A3E2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -155,6 +185,8 @@ 8C9A2036195965F10013B6B3 /* fixtures */, 3773307A1CC42A58005EAF65 /* fixturesTwo */, 8C9A2047195965F10013B6B3 /* fixturesTests */, + B1E6980325F96B670086A3E2 /* FixtureFramework */, + B1E6980E25F96B670086A3E2 /* FixtureFrameworkTests */, 8C9A202F195965F10013B6B3 /* Frameworks */, 8C9A202E195965F10013B6B3 /* Products */, ); @@ -167,6 +199,7 @@ 8C9A2040195965F10013B6B3 /* fixturesTests.xctest */, 377330791CC42A58005EAF65 /* libfixturesTwo.dylib */, 85AE690C1E45F0F900DA2D47 /* fixturesTestsSecond.xctest */, + B1E6980225F96B670086A3E2 /* FixtureFramework.framework */, ); name = Products; sourceTree = ""; @@ -236,6 +269,26 @@ path = "Supporting Files"; sourceTree = ""; }; + B1E6980325F96B670086A3E2 /* FixtureFramework */ = { + isa = PBXGroup; + children = ( + B1E6980425F96B670086A3E2 /* FixtureFramework.h */, + B1E6980525F96B670086A3E2 /* Info.plist */, + B1E6981F25F96B930086A3E2 /* FlashExperiment.swift */, + ); + path = FixtureFramework; + sourceTree = ""; + }; + B1E6980E25F96B670086A3E2 /* FixtureFrameworkTests */ = { + isa = PBXGroup; + children = ( + B1E6980F25F96B680086A3E2 /* FixtureFrameworkTests.swift */, + B1E6981125F96B680086A3E2 /* Info.plist */, + B1E6982725F96BD30086A3E2 /* FlashExperimentTests.swift */, + ); + path = FixtureFrameworkTests; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -260,6 +313,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + B1E697FD25F96B670086A3E2 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + B1E6981225F96B680086A3E2 /* FixtureFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ @@ -309,6 +370,7 @@ buildRules = ( ); dependencies = ( + B1E6983025F96F490086A3E2 /* PBXTargetDependency */, ); name = fixtures; productName = fixtures; @@ -326,6 +388,7 @@ buildRules = ( ); dependencies = ( + B1E6983825F970320086A3E2 /* PBXTargetDependency */, 8C9A2045195965F10013B6B3 /* PBXTargetDependency */, ); name = fixturesTests; @@ -333,18 +396,42 @@ productReference = 8C9A2040195965F10013B6B3 /* fixturesTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + B1E6980125F96B670086A3E2 /* FixtureFramework */ = { + isa = PBXNativeTarget; + buildConfigurationList = B1E6981725F96B680086A3E2 /* Build configuration list for PBXNativeTarget "FixtureFramework" */; + buildPhases = ( + B1E697FD25F96B670086A3E2 /* Headers */, + B1E697FE25F96B670086A3E2 /* Sources */, + B1E697FF25F96B670086A3E2 /* Frameworks */, + B1E6980025F96B670086A3E2 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = FixtureFramework; + productName = FixtureFramework; + productReference = B1E6980225F96B670086A3E2 /* FixtureFramework.framework */; + productType = "com.apple.product-type.framework"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 8C9A2025195965F00013B6B3 /* Project object */ = { isa = PBXProject; attributes = { + LastSwiftUpdateCheck = 1240; LastUpgradeCheck = 0510; ORGANIZATIONNAME = marklarr; TargetAttributes = { 377330781CC42A58005EAF65 = { CreatedOnToolsVersion = 7.3; }; + B1E6980125F96B670086A3E2 = { + CreatedOnToolsVersion = 12.4; + LastSwiftMigration = 1240; + ProvisioningStyle = Automatic; + }; }; }; buildConfigurationList = 8C9A2028195965F00013B6B3 /* Build configuration list for PBXProject "fixtures" */; @@ -352,6 +439,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 8C9A2024195965F00013B6B3; @@ -363,6 +451,7 @@ 377330781CC42A58005EAF65 /* fixturesTwo */, 8C9A203F195965F10013B6B3 /* fixturesTests */, 85AE68FC1E45F0F900DA2D47 /* fixturesTestsSecond */, + B1E6980125F96B670086A3E2 /* FixtureFramework */, ); }; /* End PBXProject section */ @@ -384,6 +473,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + B1E6980025F96B670086A3E2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -427,6 +523,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + B1E697FE25F96B670086A3E2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B1E6982025F96B930086A3E2 /* FlashExperiment.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -440,6 +544,16 @@ target = 8C9A202C195965F10013B6B3 /* fixtures */; targetProxy = 8C9A2044195965F10013B6B3 /* PBXContainerItemProxy */; }; + B1E6983025F96F490086A3E2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B1E6980125F96B670086A3E2 /* FixtureFramework */; + targetProxy = B1E6982F25F96F490086A3E2 /* PBXContainerItemProxy */; + }; + B1E6983825F970320086A3E2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B1E6980125F96B670086A3E2 /* FixtureFramework */; + targetProxy = B1E6983725F970320086A3E2 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -653,6 +767,105 @@ }; name = Release; }; + B1E6981325F96B680086A3E2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = FixtureFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 11.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.onato.FixtureFramework; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + B1E6981425F96B680086A3E2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = FixtureFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 11.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.onato.FixtureFramework; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -701,6 +914,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + B1E6981725F96B680086A3E2 /* Build configuration list for PBXNativeTarget "FixtureFramework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B1E6981325F96B680086A3E2 /* Debug */, + B1E6981425F96B680086A3E2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 8C9A2025195965F00013B6B3 /* Project object */; diff --git a/spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixtures.xcscheme b/spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixtures.xcscheme index 0cded095..f475487f 100644 --- a/spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixtures.xcscheme +++ b/spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixtures.xcscheme @@ -26,7 +26,18 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + @@ -39,8 +50,6 @@ - - - - + + + + diff --git a/spec/fixtures/fixtures.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/spec/fixtures/fixtures.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/spec/fixtures/fixtures.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/spec/slather/project_spec.rb b/spec/slather/project_spec.rb index 11a6f63c..610ab10d 100755 --- a/spec/slather/project_spec.rb +++ b/spec/slather/project_spec.rb @@ -243,8 +243,9 @@ class SpecXcode7CoverageFile < Slather::ProfdataCoverageFile allow(fixtures_project).to receive(:scheme).and_return("fixtures") fixtures_project.send(:configure_binary_file) binary_file_location = fixtures_project.send(:binary_file) - expect(binary_file_location.count).to eq(1) - expect(binary_file_location.first).to end_with("Debug/fixturesTests.xctest/Contents/MacOS/fixturesTests") + expect(binary_file_location.count).to eq(2) + expect(binary_file_location.first).to end_with("Debug/FixtureFramework.framework/Versions/A/FixtureFramework") + expect(binary_file_location.last).to end_with("Debug/fixturesTests.xctest/Contents/MacOS/fixturesTests") end it "should find the product path provided a workspace and scheme" do @@ -252,8 +253,9 @@ class SpecXcode7CoverageFile < Slather::ProfdataCoverageFile allow(fixtures_project).to receive(:scheme).and_return("fixtures") fixtures_project.send(:configure_binary_file) binary_file_location = fixtures_project.send(:binary_file) - expect(binary_file_location.count).to eq(1) - expect(binary_file_location.first).to end_with("Debug/fixturesTests.xctest/Contents/MacOS/fixturesTests") + expect(binary_file_location.count).to eq(2) + expect(binary_file_location.first).to end_with("Debug/FixtureFramework.framework/Versions/A/FixtureFramework") + expect(binary_file_location.last).to end_with("Debug/fixturesTests.xctest/Contents/MacOS/fixturesTests") end it "should find the product path for a scheme with no buildable products" do