Skip to content

Commit

Permalink
Set product name for MonalUITests
Browse files Browse the repository at this point in the history
XCTest prepends the product name to the name of the .xctest file. For
instance - if the target's product name is xyz, the xctest file would
be named xyz.xctest.

Since we have multiple test targets in the project, the lack of a
product name caused two xctest files to be generated with the same
name, and copied to the same build location. This caused build errors
when trying to run the test targets.

Therefore - ensure there is a product name provided for each test
target, so that we can build and run the tests.
  • Loading branch information
matthewrfennell authored and tmolitor-stud-tu committed Feb 10, 2025
1 parent df81027 commit dd44644
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
12 changes: 9 additions & 3 deletions Monal/Monal.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@
C16D18342792A4AF00F869A0 /* DataLayerMigrations.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DataLayerMigrations.m; sourceTree = "<group>"; };
C176F1EB2AF11C31002034E5 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/System/Library/Frameworks/UserNotifications.framework; sourceTree = DEVELOPER_DIR; };
C1850E6625F37EC0003D506A /* Monal Tests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Monal Tests-Bridging-Header.h"; sourceTree = "<group>"; };
C1850EB525F38A2D003D506A /* .xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = .xctest; sourceTree = BUILT_PRODUCTS_DIR; };
C1850EB525F38A2D003D506A /* MonalUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MonalUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
C1850EB725F38A2D003D506A /* MonalUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MonalUITests.swift; sourceTree = "<group>"; };
C1850EB925F38A2D003D506A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C1850EC525F3C5EB003D506A /* TestHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestHelper.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -903,7 +903,7 @@
26AA70112146BBB800598605 /* shareSheet.appex */,
260773C0232FC4E800BFD50F /* NotificationService.appex */,
26CC579223A0867400ABB92A /* monalxmpp.framework */,
C1850EB525F38A2D003D506A /* .xctest */,
C1850EB525F38A2D003D506A /* MonalUITests.xctest */,
C1049186261301530054AC9E /* MonalXMPPUnitTests.xctest */,
);
name = Products;
Expand Down Expand Up @@ -1700,7 +1700,7 @@
);
name = MonalUITests;
productName = MonalUITests;
productReference = C1850EB525F38A2D003D506A /* .xctest */;
productReference = C1850EB525F38A2D003D506A /* MonalUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */
Expand Down Expand Up @@ -3751,6 +3751,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_NAME = MonalUITests;
STRIP_INSTALLED_PRODUCT = NO;
STRIP_SWIFT_SYMBOLS = NO;
TEST_TARGET_NAME = Monal;
Expand Down Expand Up @@ -4108,6 +4109,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_NAME = MonalUITests;
STRIP_INSTALLED_PRODUCT = NO;
STRIP_SWIFT_SYMBOLS = NO;
TEST_TARGET_NAME = Monal;
Expand Down Expand Up @@ -4199,6 +4201,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_NAME = MonalUITests;
STRIP_INSTALLED_PRODUCT = NO;
STRIP_SWIFT_SYMBOLS = NO;
TEST_TARGET_NAME = Monal;
Expand All @@ -4217,6 +4220,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_NAME = MonalUITests;
STRIP_INSTALLED_PRODUCT = NO;
STRIP_SWIFT_SYMBOLS = NO;
TEST_TARGET_NAME = Monal;
Expand All @@ -4236,6 +4240,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_NAME = MonalUITests;
STRIP_INSTALLED_PRODUCT = NO;
STRIP_SWIFT_SYMBOLS = NO;
TEST_TARGET_NAME = Monal;
Expand Down Expand Up @@ -4520,6 +4525,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_NAME = MonalUITests;
STRIP_INSTALLED_PRODUCT = NO;
STRIP_SWIFT_SYMBOLS = NO;
TEST_TARGET_NAME = Monal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C1850EB425F38A2D003D506A"
BuildableName = ".xctest"
BuildableName = "MonalUITests.xctest"
BlueprintName = "MonalUITests"
ReferencedContainer = "container:Monal.xcodeproj">
</BuildableReference>
Expand All @@ -43,7 +43,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C1850EB425F38A2D003D506A"
BuildableName = ".xctest"
BuildableName = "MonalUITests.xctest"
BlueprintName = "MonalUITests"
ReferencedContainer = "container:Monal.xcodeproj">
</BuildableReference>
Expand All @@ -53,7 +53,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C1850EB425F38A2D003D506A"
BuildableName = ".xctest"
BuildableName = "MonalUITests.xctest"
BlueprintName = "MonalUITests"
ReferencedContainer = "container:Monal.xcodeproj">
</BuildableReference>
Expand All @@ -63,7 +63,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C1850EB425F38A2D003D506A"
BuildableName = ".xctest"
BuildableName = "MonalUITests.xctest"
BlueprintName = "MonalUITests"
ReferencedContainer = "container:Monal.xcodeproj">
</BuildableReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C1850EB425F38A2D003D506A"
BuildableName = ".xctest"
BuildableName = "MonalUITests.xctest"
BlueprintName = "MonalUITests"
ReferencedContainer = "container:Monal.xcodeproj">
</BuildableReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C1850EB425F38A2D003D506A"
BuildableName = ".xctest"
BuildableName = "MonalUITests.xctest"
BlueprintName = "MonalUITests"
ReferencedContainer = "container:Monal.xcodeproj">
</BuildableReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C1850EB425F38A2D003D506A"
BuildableName = ".xctest"
BuildableName = "MonalUITests.xctest"
BlueprintName = "MonalUITests"
ReferencedContainer = "container:Monal.xcodeproj">
</BuildableReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C1850EB425F38A2D003D506A"
BuildableName = ".xctest"
BuildableName = "MonalUITests.xctest"
BlueprintName = "MonalUITests"
ReferencedContainer = "container:Monal.xcodeproj">
</BuildableReference>
Expand Down

0 comments on commit dd44644

Please sign in to comment.