Skip to content

Commit a3ceead

Browse files
committed
XdgTestHelper: Build and copy correctly into TestFoundation.app on Xcode
- Add an xdgTestHelper scheme so that it is built correctly as a dependancy of TestFoundation. - When copying the xdgTestHelper binary use a cp relative to the $BUILD_ROOT
1 parent e78f471 commit a3ceead

File tree

2 files changed

+34
-20
lines changed

2 files changed

+34
-20
lines changed

Foundation.xcodeproj/project.pbxproj

+34-18
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@
344344
B9974B9A1EDF4A22007F15B8 /* HTTPMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9974B931EDF4A22007F15B8 /* HTTPMessage.swift */; };
345345
B9974B9B1EDF4A22007F15B8 /* BodySource.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9974B941EDF4A22007F15B8 /* BodySource.swift */; };
346346
B9974B9C1EDF4A22007F15B8 /* EasyHandle.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9974B951EDF4A22007F15B8 /* EasyHandle.swift */; };
347-
B9F1379A20B99455000B7577 /* xdgTestHelper in CopyFiles */ = {isa = PBXBuildFile; fileRef = B9F1379920B99455000B7577 /* xdgTestHelper */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
348347
BB3D7558208A1E500085CFDC /* TestImports.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB3D7557208A1E500085CFDC /* TestImports.swift */; };
349348
BD8042161E09857800487EB8 /* TestLengthFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD8042151E09857800487EB8 /* TestLengthFormatter.swift */; };
350349
BDBB65901E256BFA001A7286 /* TestEnergyFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDBB658F1E256BFA001A7286 /* TestEnergyFormatter.swift */; };
@@ -457,13 +456,20 @@
457456
remoteGlobalIDString = 5B5D885C1BBC938800234F36;
458457
remoteInfo = SwiftFoundation;
459458
};
460-
B9F1379620B99357000B7577 /* PBXContainerItemProxy */ = {
459+
B90FD22F20C2FF420087EF44 /* PBXContainerItemProxy */ = {
461460
isa = PBXContainerItemProxy;
462461
containerPortal = 5B5D88541BBC938800234F36 /* Project object */;
463462
proxyType = 1;
464463
remoteGlobalIDString = 9F0DD33E1ECD734200F68030;
465464
remoteInfo = xdgTestHelper;
466465
};
466+
B90FD23120C2FF840087EF44 /* PBXContainerItemProxy */ = {
467+
isa = PBXContainerItemProxy;
468+
containerPortal = 5B5D88541BBC938800234F36 /* Project object */;
469+
proxyType = 1;
470+
remoteGlobalIDString = 5B5D885C1BBC938800234F36;
471+
remoteInfo = SwiftFoundation;
472+
};
467473
EA993CE21BEACD8E000969A2 /* PBXContainerItemProxy */ = {
468474
isa = PBXContainerItemProxy;
469475
containerPortal = 5B5D88541BBC938800234F36 /* Project object */;
@@ -494,16 +500,6 @@
494500
);
495501
runOnlyForDeploymentPostprocessing = 0;
496502
};
497-
B9F1379820B99363000B7577 /* CopyFiles */ = {
498-
isa = PBXCopyFilesBuildPhase;
499-
buildActionMask = 2147483647;
500-
dstPath = "";
501-
dstSubfolderSpec = 6;
502-
files = (
503-
B9F1379A20B99455000B7577 /* xdgTestHelper in CopyFiles */,
504-
);
505-
runOnlyForDeploymentPostprocessing = 0;
506-
};
507503
EA66F66D1BF56CCB00136161 /* CopyFiles */ = {
508504
isa = PBXCopyFilesBuildPhase;
509505
buildActionMask = 2147483647;
@@ -844,7 +840,6 @@
844840
B9974B931EDF4A22007F15B8 /* HTTPMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = HTTPMessage.swift; path = http/HTTPMessage.swift; sourceTree = "<group>"; };
845841
B9974B941EDF4A22007F15B8 /* BodySource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BodySource.swift; sourceTree = "<group>"; };
846842
B9974B951EDF4A22007F15B8 /* EasyHandle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EasyHandle.swift; sourceTree = "<group>"; };
847-
B9F1379920B99455000B7577 /* xdgTestHelper */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = xdgTestHelper; path = DerivedData/Foundation/Build/Products/Debug/xdgTestHelper.app/Contents/MacOS/xdgTestHelper; sourceTree = "<group>"; };
848843
BB3D7557208A1E500085CFDC /* TestImports.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestImports.swift; sourceTree = "<group>"; };
849844
BD8042151E09857800487EB8 /* TestLengthFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestLengthFormatter.swift; sourceTree = "<group>"; };
850845
BDBB658F1E256BFA001A7286 /* TestEnergyFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestEnergyFormatter.swift; sourceTree = "<group>"; };
@@ -1056,7 +1051,6 @@
10561051
5B5D88531BBC938800234F36 = {
10571052
isa = PBXGroup;
10581053
children = (
1059-
B9F1379920B99455000B7577 /* xdgTestHelper */,
10601054
B167A6641ED7303F0040B09A /* README.md */,
10611055
5BDC3F2C1BCC5DB500ED97BB /* Foundation */,
10621056
EAB57B681BD1A255004AC5C5 /* CoreFoundation */,
@@ -2042,12 +2036,12 @@
20422036
5BDC40591BD6D83B00ED97BB /* Frameworks */,
20432037
5BDC405A1BD6D83B00ED97BB /* Resources */,
20442038
5BDC406D1BD6D8B300ED97BB /* CopyFiles */,
2045-
B9F1379820B99363000B7577 /* CopyFiles */,
2039+
B90FD23320C303200087EF44 /* ShellScript */,
20462040
);
20472041
buildRules = (
20482042
);
20492043
dependencies = (
2050-
B9F1379720B99357000B7577 /* PBXTargetDependency */,
2044+
B90FD23020C2FF420087EF44 /* PBXTargetDependency */,
20512045
AE2FC5951CFEFC70008F7981 /* PBXTargetDependency */,
20522046
);
20532047
name = TestFoundation;
@@ -2066,6 +2060,7 @@
20662060
buildRules = (
20672061
);
20682062
dependencies = (
2063+
B90FD23220C2FF840087EF44 /* PBXTargetDependency */,
20692064
);
20702065
name = xdgTestHelper;
20712066
productName = xdgTestHelper;
@@ -2195,6 +2190,22 @@
21952190
};
21962191
/* End PBXResourcesBuildPhase section */
21972192

2193+
/* Begin PBXShellScriptBuildPhase section */
2194+
B90FD23320C303200087EF44 /* ShellScript */ = {
2195+
isa = PBXShellScriptBuildPhase;
2196+
buildActionMask = 2147483647;
2197+
files = (
2198+
);
2199+
inputPaths = (
2200+
);
2201+
outputPaths = (
2202+
);
2203+
runOnlyForDeploymentPostprocessing = 0;
2204+
shellPath = /bin/sh;
2205+
shellScript = "cp ${BUILD_ROOT}/Debug/xdgTestHelper.app/Contents/MacOS/xdgTestHelper ${BUILD_ROOT}/Debug/TestFoundation.app/Contents/MacOS/";
2206+
};
2207+
/* End PBXShellScriptBuildPhase section */
2208+
21982209
/* Begin PBXSourcesBuildPhase section */
21992210
5B5D88581BBC938800234F36 /* Sources */ = {
22002211
isa = PBXSourcesBuildPhase;
@@ -2563,10 +2574,15 @@
25632574
target = 5B5D885C1BBC938800234F36 /* SwiftFoundation */;
25642575
targetProxy = AE2FC5941CFEFC70008F7981 /* PBXContainerItemProxy */;
25652576
};
2566-
B9F1379720B99357000B7577 /* PBXTargetDependency */ = {
2577+
B90FD23020C2FF420087EF44 /* PBXTargetDependency */ = {
25672578
isa = PBXTargetDependency;
25682579
target = 9F0DD33E1ECD734200F68030 /* xdgTestHelper */;
2569-
targetProxy = B9F1379620B99357000B7577 /* PBXContainerItemProxy */;
2580+
targetProxy = B90FD22F20C2FF420087EF44 /* PBXContainerItemProxy */;
2581+
};
2582+
B90FD23220C2FF840087EF44 /* PBXTargetDependency */ = {
2583+
isa = PBXTargetDependency;
2584+
target = 5B5D885C1BBC938800234F36 /* SwiftFoundation */;
2585+
targetProxy = B90FD23120C2FF840087EF44 /* PBXContainerItemProxy */;
25702586
};
25712587
EA993CE31BEACD8E000969A2 /* PBXTargetDependency */ = {
25722588
isa = PBXTargetDependency;

Foundation.xcodeproj/xcshareddata/xcschemes/TestFoundation.xcscheme

-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
buildConfiguration = "Debug"
6969
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
7070
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
71-
language = ""
7271
shouldUseLaunchSchemeArgsEnv = "YES">
7372
<Testables>
7473
</Testables>
@@ -88,7 +87,6 @@
8887
buildConfiguration = "Debug"
8988
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
9089
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
91-
language = ""
9290
launchStyle = "0"
9391
useCustomWorkingDirectory = "NO"
9492
ignoresPersistentStateOnLaunch = "NO"

0 commit comments

Comments
 (0)