Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reinstate Xcode 15 support #42

Merged
merged 3 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/XcresultparserLib.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "XcresultparserLib"
BuildableName = "XcresultparserLib"
BlueprintName = "XcresultparserLib"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:Tests/XcresultparserLib.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "XcresultparserLib"
BuildableName = "XcresultparserLib"
BlueprintName = "XcresultparserLib"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 6.0
// swift-tools-version: 5.10
import PackageDescription
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldnt this rather be 5.9 to have largest compatibility with Xcode 15 versions? Specially given minimum supported Xcode version by brew is Xcode 15.0 which is having Swift 5.9, while Swift 5.10 is reaching only Xcode versions >= 15.3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raised #43 to address that.


let package = Package(
Expand Down
23 changes: 23 additions & 0 deletions Tests/XcresultparserLib.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"configurations" : [
{
"id" : "E1E08303-EEF4-40FA-AEB1-1293563FB435",
"name" : "Test Scheme Action",
"options" : {

}
}
],
"defaultOptions" : {
"language" : "en",
"locationScenario" : {
"identifier" : "New York, NY, USA",
"referenceType" : "built-in"
},
"region" : "US"
},
"testTargets" : [

],
"version" : 1
}
21 changes: 11 additions & 10 deletions Tests/XcresultparserTests/XcresultparserTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,20 @@ final class XcresultparserTests: XCTestCase {
return
}
XCTAssertEqual("", resultParser.documentPrefix(title: "XCResults"))

let expectedSummary = "Errors: 0; Warnings: 3; Analizer Warnings: 0; Tests: 7; Failed: 1; Skipped: 0"
XCTAssertEqual(expectedSummary, resultParser.summary)
XCTAssertEqual("\n---------------------\n", resultParser.divider)

XCTAssertTrue(resultParser.testDetails.starts(
with: "\n\n### XcresultparserTests.xctest (4,3274)\n### XcresultparserTests (4,3269)\n* <span"
))

XCTAssertTrue(resultParser.coverageDetails.starts(
with: "\nTotal coverage: 49,2% (1530/3108)\nXcresultparserLib: 46,2% (672/1454)" +
"\n## CLIResultFormatter.swift: 61,9% (39/63)"
))

let lines = resultParser.testDetails.components(separatedBy: .newlines)
XCTAssertTrue(lines[2].starts(with: "### XcresultparserTests.xctest"))
XCTAssertTrue(lines[3].starts(with: "### XcresultparserTests"))
XCTAssertTrue(lines[4].starts(with: "* <span"))

let cLines = resultParser.coverageDetails.components(separatedBy: .newlines)
XCTAssertTrue(cLines[1].starts(with: "Total coverage:"))
XCTAssertTrue(cLines[2].starts(with: "XcresultparserLib:"))
XCTAssertTrue(cLines[3].starts(with: "## CLIResultFormatter.swift:"))

XCTAssertEqual("", resultParser.documentSuffix)
}
Expand Down
Loading