Skip to content

Commit 70c0d0f

Browse files
committed
Make all Swift PM tests succeed
1 parent 6a2fca0 commit 70c0d0f

File tree

4 files changed

+245
-193
lines changed

4 files changed

+245
-193
lines changed
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1230"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "XMPPFramework_XMPPFramework"
18+
BuildableName = "XMPPFramework_XMPPFramework"
19+
BlueprintName = "XMPPFramework_XMPPFramework"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "YES"
27+
buildForArchiving = "YES"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "XMPPFramework"
32+
BuildableName = "XMPPFramework"
33+
BlueprintName = "XMPPFramework"
34+
ReferencedContainer = "container:">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
<BuildActionEntry
38+
buildForTesting = "YES"
39+
buildForRunning = "YES"
40+
buildForProfiling = "YES"
41+
buildForArchiving = "YES"
42+
buildForAnalyzing = "YES">
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "XMPPFrameworkSwift"
46+
BuildableName = "XMPPFrameworkSwift"
47+
BlueprintName = "XMPPFrameworkSwift"
48+
ReferencedContainer = "container:">
49+
</BuildableReference>
50+
</BuildActionEntry>
51+
<BuildActionEntry
52+
buildForTesting = "YES"
53+
buildForRunning = "YES"
54+
buildForProfiling = "NO"
55+
buildForArchiving = "NO"
56+
buildForAnalyzing = "YES">
57+
<BuildableReference
58+
BuildableIdentifier = "primary"
59+
BlueprintIdentifier = "XMPPFrameworkSwiftTests"
60+
BuildableName = "XMPPFrameworkSwiftTests"
61+
BlueprintName = "XMPPFrameworkSwiftTests"
62+
ReferencedContainer = "container:">
63+
</BuildableReference>
64+
</BuildActionEntry>
65+
<BuildActionEntry
66+
buildForTesting = "YES"
67+
buildForRunning = "YES"
68+
buildForProfiling = "NO"
69+
buildForArchiving = "NO"
70+
buildForAnalyzing = "YES">
71+
<BuildableReference
72+
BuildableIdentifier = "primary"
73+
BlueprintIdentifier = "XMPPFrameworkTests"
74+
BuildableName = "XMPPFrameworkTests"
75+
BlueprintName = "XMPPFrameworkTests"
76+
ReferencedContainer = "container:">
77+
</BuildableReference>
78+
</BuildActionEntry>
79+
<BuildActionEntry
80+
buildForTesting = "YES"
81+
buildForRunning = "YES"
82+
buildForProfiling = "YES"
83+
buildForArchiving = "YES"
84+
buildForAnalyzing = "YES">
85+
<BuildableReference
86+
BuildableIdentifier = "primary"
87+
BlueprintIdentifier = "XMPPFrameworkTestsShared"
88+
BuildableName = "XMPPFrameworkTestsShared"
89+
BlueprintName = "XMPPFrameworkTestsShared"
90+
ReferencedContainer = "container:">
91+
</BuildableReference>
92+
</BuildActionEntry>
93+
</BuildActionEntries>
94+
</BuildAction>
95+
<TestAction
96+
buildConfiguration = "Debug"
97+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
98+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
99+
shouldUseLaunchSchemeArgsEnv = "YES">
100+
<Testables>
101+
<TestableReference
102+
skipped = "NO">
103+
<BuildableReference
104+
BuildableIdentifier = "primary"
105+
BlueprintIdentifier = "XMPPFrameworkSwiftTests"
106+
BuildableName = "XMPPFrameworkSwiftTests"
107+
BlueprintName = "XMPPFrameworkSwiftTests"
108+
ReferencedContainer = "container:">
109+
</BuildableReference>
110+
</TestableReference>
111+
<TestableReference
112+
skipped = "NO">
113+
<BuildableReference
114+
BuildableIdentifier = "primary"
115+
BlueprintIdentifier = "XMPPFrameworkTests"
116+
BuildableName = "XMPPFrameworkTests"
117+
BlueprintName = "XMPPFrameworkTests"
118+
ReferencedContainer = "container:">
119+
</BuildableReference>
120+
</TestableReference>
121+
</Testables>
122+
</TestAction>
123+
<LaunchAction
124+
buildConfiguration = "Debug"
125+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
126+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
127+
launchStyle = "0"
128+
useCustomWorkingDirectory = "NO"
129+
ignoresPersistentStateOnLaunch = "NO"
130+
debugDocumentVersioning = "YES"
131+
debugServiceExtension = "internal"
132+
allowLocationSimulation = "YES">
133+
</LaunchAction>
134+
<ProfileAction
135+
buildConfiguration = "Release"
136+
shouldUseLaunchSchemeArgsEnv = "YES"
137+
savedToolIdentifier = ""
138+
useCustomWorkingDirectory = "NO"
139+
debugDocumentVersioning = "YES">
140+
<MacroExpansion>
141+
<BuildableReference
142+
BuildableIdentifier = "primary"
143+
BlueprintIdentifier = "XMPPFramework_XMPPFramework"
144+
BuildableName = "XMPPFramework_XMPPFramework"
145+
BlueprintName = "XMPPFramework_XMPPFramework"
146+
ReferencedContainer = "container:">
147+
</BuildableReference>
148+
</MacroExpansion>
149+
</ProfileAction>
150+
<AnalyzeAction
151+
buildConfiguration = "Debug">
152+
</AnalyzeAction>
153+
<ArchiveAction
154+
buildConfiguration = "Release"
155+
revealArchiveInOrganizer = "YES">
156+
</ArchiveAction>
157+
</Scheme>

.travis.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ language: objective-c
33
jobs:
44
include:
55
- stage: Swift PM
6-
osx_image: xcode12u
6+
osx_image: xcode12.2
77
script:
8-
# Build the project using Swift PM
9-
- swift build
10-
# Test the project using Swift PM
11-
- swift test
8+
# Remove the Xcode project so `xcodebuild` would be able to test the Swift PM project.
9+
- rm -rf *.xcodeproj
10+
# Test the Swift PM project using `xcodebuild`.
11+
# The test is performed using `xcodebuild` rather than `swift test` due to this bug:
12+
# https://bugs.swift.org/browse/SR-13560
13+
- xcodebuild -scheme SPM_XMPPFramework-Package -destination "name=iPhone 11 Pro" test
1214

1315
- stage: Xcode Tests
1416
osx_image: xcode9.3

Package.swift

Lines changed: 81 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// swift-tools-version:5.2
1+
// swift-tools-version:5.3
22
import PackageDescription
33

44
let package = Package(
55
name: "XMPPFramework",
6+
defaultLocalization: "en",
67
platforms: [
78
.macOS(.v10_10),
8-
.iOS(.v8),
9+
.iOS(.v9),
910
.tvOS(.v9)
1011
],
1112
products: [
@@ -37,6 +38,22 @@ let package = Package(
3738
exclude: [
3839
"Swift",
3940
"Xcode",
41+
"README.md",
42+
"copying.txt",
43+
"Cartfile.resolved",
44+
"xmppframework.png",
45+
"Cartfile",
46+
"Core/Info.plist",
47+
"XMPPFramework.podspec"
48+
],
49+
resources: [
50+
.process("Extensions/Roster/CoreDataStorage/XMPPRoster.xcdatamodel"),
51+
.process("Extensions/XEP-0045/CoreDataStorage/XMPPRoom.xcdatamodeld"),
52+
.process("Extensions/XEP-0045/HybridStorage/XMPPRoomHybrid.xcdatamodeld"),
53+
.process("Extensions/XEP-0054/CoreDataStorage/XMPPvCard.xcdatamodeld"),
54+
.process("Extensions/XEP-0115/CoreDataStorage/XMPPCapabilities.xcdatamodel"),
55+
.process("Extensions/XEP-0136/CoreDataStorage/XMPPMessageArchiving.xcdatamodeld"),
56+
.process("Extensions/XMPPMUCLight/CoreDataStorage/XMPPRoomLight.xcdatamodel")
4057
],
4158
publicHeadersPath: "include/XMPPFramework",
4259
linkerSettings: [
@@ -50,14 +67,45 @@ let package = Package(
5067
"XMPPFramework",
5168
.product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack")
5269
],
53-
path: "Swift"
70+
path: "Swift",
71+
exclude: [
72+
"XMPPFrameworkSwift-Info.plist",
73+
"XMPPFrameworkSwift.h"
74+
]
5475
),
5576
.target(
5677
name: "XMPPFrameworkTestsShared",
5778
dependencies: [
5879
"XMPPFramework"
5980
],
6081
path: "Xcode/Testing-Shared",
82+
exclude: [
83+
"Info.plist",
84+
"XMPPvCardTests.m",
85+
"XMPPStanzaIdTests.swift",
86+
"OMEMOServerTests.m",
87+
"XMPPDelayedDeliveryTests.m",
88+
"XMPPMessageDeliveryReceiptsTests.m",
89+
"XMPPHTTPFileUploadTests.m",
90+
"XMPPRoomLightTests.m",
91+
"OMEMOModuleTests.m",
92+
"XMPPPushTests.swift",
93+
"EncodeDecodeTest.m",
94+
"XMPPOutOfBandResourceMessagingTests.m",
95+
"XMPPRoomLightCoreDataStorageTests.m",
96+
"XMPPMessageArchiveManagementTests.m",
97+
"CapabilitiesHashingTest.m",
98+
"XMPPMUCLightTests.m",
99+
"OMEMOElementTests.m",
100+
"XMPPURITests.m",
101+
"XMPPSwift.swift",
102+
"XMPPBookmarksTests.swift",
103+
"XMPPOneToOneChatTests.m",
104+
"OMEMOTestStorage.m",
105+
"XMPPManagedMessagingTests.m",
106+
"XMPPStorageHintTests.m",
107+
"XMPPPubSubTests.m"
108+
],
61109
sources: [
62110
"XMPPMockStream.m"
63111
],
@@ -71,9 +119,8 @@ let package = Package(
71119
],
72120
path: "Xcode/Testing-Shared",
73121
exclude: [
122+
"Info.plist",
74123
"XMPPMockStream.m",
75-
"XMPPvCardTests.m",
76-
"XMPPRoomLightCoreDataStorageTests.m",
77124
"XMPPBookmarksTests.swift",
78125
"XMPPPushTests.swift",
79126
"XMPPStanzaIdTests.swift",
@@ -89,7 +136,35 @@ let package = Package(
89136
],
90137
path: "Xcode",
91138
exclude: [
92-
"XMPPFrameworkTests-Bridging-Header.h"
139+
"Gemfile",
140+
"Gemfile.lock",
141+
"Examples",
142+
"Testing-Carthage",
143+
"Testing-iOS",
144+
"Testing-macOS",
145+
"Testing-Shared/OMEMOTestStorage.m",
146+
"Testing-Shared/Info.plist",
147+
"Testing-Shared/XMPPManagedMessagingTests.m",
148+
"Testing-Shared/XMPPMessageArchiveManagementTests.m",
149+
"Testing-Shared/XMPPOutOfBandResourceMessagingTests.m",
150+
"Testing-Shared/XMPPRoomLightCoreDataStorageTests.m",
151+
"Testing-Shared/XMPPRoomLightTests.m",
152+
"Testing-Shared/XMPPMessageDeliveryReceiptsTests.m",
153+
"Testing-Shared/OMEMOServerTests.m",
154+
"Testing-Shared/CapabilitiesHashingTest.m",
155+
"Testing-Shared/XMPPOneToOneChatTests.m",
156+
"Testing-Shared/XMPPDelayedDeliveryTests.m",
157+
"Testing-Shared/XMPPMockStream.m",
158+
"Testing-Shared/XMPPPubSubTests.m",
159+
"Testing-Shared/XMPPHTTPFileUploadTests.m",
160+
"Testing-Shared/XMPPvCardTests.m",
161+
"Testing-Shared/OMEMOElementTests.m",
162+
"Testing-Shared/OMEMOModuleTests.m",
163+
"Testing-Shared/EncodeDecodeTest.m",
164+
"Testing-Shared/XMPPStorageHintTests.m",
165+
"Testing-Shared/XMPPURITests.m",
166+
"Testing-Shared/XMPPMUCLightTests.m",
167+
"Testing-Shared/XMPPFrameworkTests-Bridging-Header.h"
93168
],
94169
sources: [
95170
"Testing-Shared/XMPPBookmarksTests.swift",

0 commit comments

Comments
 (0)