diff --git a/DarwinCompatibilityTests.xcodeproj/project.pbxproj b/DarwinCompatibilityTests.xcodeproj/project.pbxproj index b656535222..a6a83c6731 100644 --- a/DarwinCompatibilityTests.xcodeproj/project.pbxproj +++ b/DarwinCompatibilityTests.xcodeproj/project.pbxproj @@ -27,6 +27,8 @@ B97E7856222AF995007596B0 /* TestPropertyListEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B97E7855222AF995007596B0 /* TestPropertyListEncoder.swift */; }; B987C65E2093C8AF0026B50D /* TestImports.swift in Sources */ = {isa = PBXBuildFile; fileRef = B987C65D2093C8AF0026B50D /* TestImports.swift */; }; B98E33E02136AC120044EBE9 /* TestFileWithZeros.txt in Resources */ = {isa = PBXBuildFile; fileRef = B98E33DF2136AC120044EBE9 /* TestFileWithZeros.txt */; }; + B99EAE7023602FFA00C8FB46 /* TestsToSkip.txt in Resources */ = {isa = PBXBuildFile; fileRef = B99EAE6E23602FFA00C8FB46 /* TestsToSkip.txt */; }; + B99EAE7123602FFA00C8FB46 /* xcode-build.sh in Resources */ = {isa = PBXBuildFile; fileRef = B99EAE6F23602FFA00C8FB46 /* xcode-build.sh */; }; B9C1C63422607372002BBEA0 /* FixtureValues.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C1C63322607372002BBEA0 /* FixtureValues.swift */; }; B9C89F361F6BF89C00087AF4 /* TestScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C89EE61F6BF88F00087AF4 /* TestScanner.swift */; }; B9C89F371F6BF89C00087AF4 /* TestNSValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C89EE71F6BF88F00087AF4 /* TestNSValue.swift */; }; @@ -186,6 +188,9 @@ B97E7855222AF995007596B0 /* TestPropertyListEncoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestPropertyListEncoder.swift; path = TestFoundation/TestPropertyListEncoder.swift; sourceTree = ""; }; B987C65D2093C8AF0026B50D /* TestImports.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestImports.swift; path = TestFoundation/TestImports.swift; sourceTree = ""; }; B98E33DF2136AC120044EBE9 /* TestFileWithZeros.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TestFileWithZeros.txt; path = TestFoundation/Resources/TestFileWithZeros.txt; sourceTree = ""; }; + B99EAE6E23602FFA00C8FB46 /* TestsToSkip.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestsToSkip.txt; sourceTree = ""; }; + B99EAE6F23602FFA00C8FB46 /* xcode-build.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "xcode-build.sh"; sourceTree = ""; }; + B99EAE742360577C00C8FB46 /* TestCodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestCodable.swift; path = TestFoundation/TestCodable.swift; sourceTree = ""; }; B9C1C63322607372002BBEA0 /* FixtureValues.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = FixtureValues.swift; path = TestFoundation/FixtureValues.swift; sourceTree = ""; }; B9C89ED11F6BF67C00087AF4 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; B9C89ED71F6BF77E00087AF4 /* DarwinCompatibilityTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DarwinCompatibilityTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -252,7 +257,7 @@ B9C89F221F6BF89800087AF4 /* TestNSCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestNSCache.swift; path = TestFoundation/TestNSCache.swift; sourceTree = ""; }; B9C89F231F6BF89800087AF4 /* TestNSDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestNSDictionary.swift; path = TestFoundation/TestNSDictionary.swift; sourceTree = ""; }; B9C89F241F6BF89800087AF4 /* TestNotificationCenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestNotificationCenter.swift; path = TestFoundation/TestNotificationCenter.swift; sourceTree = ""; }; - B9C89F251F6BF89800087AF4 /* TestProcess.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestProcess.swift; path = TestFoundation/TestProcess.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; + B9C89F251F6BF89800087AF4 /* TestProcess.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestProcess.swift; path = TestFoundation/TestProcess.swift; sourceTree = ""; }; B9C89F261F6BF89900087AF4 /* TestEnergyFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestEnergyFormatter.swift; path = TestFoundation/TestEnergyFormatter.swift; sourceTree = ""; }; B9C89F271F6BF89900087AF4 /* TestNSCompoundPredicate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestNSCompoundPredicate.swift; path = TestFoundation/TestNSCompoundPredicate.swift; sourceTree = ""; }; B9C89F281F6BF89900087AF4 /* TestNotification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestNotification.swift; path = TestFoundation/TestNotification.swift; sourceTree = ""; }; @@ -322,6 +327,7 @@ B9C89EB81F6BF47D00087AF4 = { isa = PBXGroup; children = ( + B99EAE742360577C00C8FB46 /* TestCodable.swift */, B906C30322AC6E2A00FCFA2D /* FTPServer.swift */, B906C2FF22AC6CE600FCFA2D /* TestNSSortDescriptor.swift */, B906C30022AC6CE600FCFA2D /* TestURLSessionFTP.swift */, @@ -472,6 +478,8 @@ B9C89ED81F6BF77E00087AF4 /* DarwinCompatibilityTests */ = { isa = PBXGroup; children = ( + B99EAE6F23602FFA00C8FB46 /* xcode-build.sh */, + B99EAE6E23602FFA00C8FB46 /* TestsToSkip.txt */, B9F3269E1FC714DD003C3599 /* DarwinShims.swift */, B9C89EDF1F6BF79000087AF4 /* TestFoundation */, B9C89EDB1F6BF77E00087AF4 /* Info.plist */, @@ -563,6 +571,7 @@ files = ( B907F36F20BB188800013CBE /* NSString-ISO-8859-1-data.txt in Resources */, B9C89FBA1F6DCAEB00087AF4 /* NSString-UTF32-LE-data.txt in Resources */, + B99EAE7023602FFA00C8FB46 /* TestsToSkip.txt in Resources */, B9C89FBB1F6DCAEB00087AF4 /* NSKeyedUnarchiver-EdgeInsetsTest.plist in Resources */, B9C89FBC1F6DCAEB00087AF4 /* NSKeyedUnarchiver-ConcreteValueTest.plist in Resources */, B9C89FBD1F6DCAEB00087AF4 /* NSKeyedUnarchiver-RectTest.plist in Resources */, @@ -582,6 +591,7 @@ B9C89FCA1F6DCAEB00087AF4 /* NSKeyedUnarchiver-RangeTest.plist in Resources */, B9C89FCB1F6DCAEB00087AF4 /* NSXMLDocumentTestData.xml in Resources */, B9C89FCC1F6DCAEB00087AF4 /* NSKeyedUnarchiver-NotificationTest.plist in Resources */, + B99EAE7123602FFA00C8FB46 /* xcode-build.sh in Resources */, B9C89FCD1F6DCAEB00087AF4 /* PropertyList-1.0.dtd in Resources */, B9C89FCE1F6DCAEB00087AF4 /* Test.plist in Resources */, ); @@ -602,6 +612,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + B9C89F411F6BF89C00087AF4 /* TestCodable.swift in Sources */, B906C30422AC6E2A00FCFA2D /* FTPServer.swift in Sources */, B906C30122AC6CE700FCFA2D /* TestNSSortDescriptor.swift in Sources */, B906C30222AC6CE700FCFA2D /* TestURLSessionFTP.swift in Sources */, @@ -634,7 +645,6 @@ B9C89F3E1F6BF89C00087AF4 /* TestISO8601DateFormatter.swift in Sources */, B9C89F3F1F6BF89C00087AF4 /* TestNSTextCheckingResult.swift in Sources */, B9C89F401F6BF89C00087AF4 /* TestCharacterSet.swift in Sources */, - B9C89F411F6BF89C00087AF4 /* TestCodable.swift in Sources */, B9C89F421F6BF89C00087AF4 /* TestIndexPath.swift in Sources */, B9C89F431F6BF89C00087AF4 /* TestMassFormatter.swift in Sources */, B9C89F441F6BF89C00087AF4 /* TestNSSet.swift in Sources */, diff --git a/DarwinCompatibilityTests.xcodeproj/xcshareddata/xcschemes/xdgTestHelper.xcscheme b/DarwinCompatibilityTests.xcodeproj/xcshareddata/xcschemes/xdgTestHelper.xcscheme index f19768a015..cb772c5626 100644 --- a/DarwinCompatibilityTests.xcodeproj/xcshareddata/xcschemes/xdgTestHelper.xcscheme +++ b/DarwinCompatibilityTests.xcodeproj/xcshareddata/xcschemes/xdgTestHelper.xcscheme @@ -47,15 +47,27 @@ ReferencedContainer = "container:DarwinCompatibilityTests.xcodeproj"> + + + + + + + + diff --git a/DarwinCompatibilityTests/TestsToSkip.txt b/DarwinCompatibilityTests/TestsToSkip.txt new file mode 100644 index 0000000000..f903e01722 --- /dev/null +++ b/DarwinCompatibilityTests/TestsToSkip.txt @@ -0,0 +1,51 @@ +TestByteCountFormatter +TestCodable +TestDateComponents +TestDateFormatter +TestDateIntervalFormatter +TestDecimal +TestFileManager +TestHTTPCookie +TestHTTPCookieStorage +TestHTTPURLResponse +TestISO8601DateFormatter +TestIndexPath +TestIndexSet +TestJSONEncoder +TestJSONSerialization +TestLengthFormatter +TestMeasurement +TestNSArray +TestNSAttributedString +TestNSCache +TestNSData +TestNSDateComponents +TestNSDictionary +TestNSGeometry +TestNSKeyedArchiver +TestNSMutableAttributedString +TestNSNumber +TestNSOrderedSet +TestNSRegularExpression +TestNSSet +TestNSSortDescriptor +TestNSString +TestNSTextCheckingResult +TestNSURLRequest +TestNotificationQueue +TestNumberFormatter +TestObjCRuntime +TestProcess +TestProcessInfo +TestRunLoop +TestTimeZone +TestURL +TestURLComponents +TestURLProtocol +TestURLRequest +TestURLResponse +TestURLSessionFTP +TestUnit +TestUserDefaults +TestXMLDocument +TestXMLParser diff --git a/DarwinCompatibilityTests/xcode-build.sh b/DarwinCompatibilityTests/xcode-build.sh new file mode 100755 index 0000000000..02935101bb --- /dev/null +++ b/DarwinCompatibilityTests/xcode-build.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +DERIVED_DATA=dct-xcode-test-build +if [ "$1" == "--clean" ]; then + rm -rf "${DERIVED_DATA}" + shift +fi + +if [ "$1" != "" ]; then + xcodebuild -derivedDataPath $DERIVED_DATA -project DarwinCompatibilityTests.xcodeproj -scheme xdgTestHelper "-only-testing:DarwinCompatibilityTests/$1" test +else + xcodebuild -derivedDataPath $DERIVED_DATA -project DarwinCompatibilityTests.xcodeproj -scheme xdgTestHelper `sed 's/^/-skip-testing:DarwinCompatibilityTests\//g' DarwinCompatibilityTests/TestsToSkip.txt` test +fi diff --git a/Foundation.xcodeproj/project.pbxproj b/Foundation.xcodeproj/project.pbxproj index bf5d2e9b2f..bf99d9d3ca 100644 --- a/Foundation.xcodeproj/project.pbxproj +++ b/Foundation.xcodeproj/project.pbxproj @@ -424,8 +424,10 @@ B933A79F1F3055F700FE6846 /* NSString-UTF32-LE-data.txt in Resources */ = {isa = PBXBuildFile; fileRef = B933A79D1F3055F600FE6846 /* NSString-UTF32-LE-data.txt */; }; B940492D223B146800FB4384 /* TestProgressFraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = B940492C223B146800FB4384 /* TestProgressFraction.swift */; }; B951B5EC1F4E2A2000D8B332 /* TestNSLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = B951B5EB1F4E2A2000D8B332 /* TestNSLock.swift */; }; + B95FC97522AF051B005DEA0A /* xcode-build.sh in Resources */ = {isa = PBXBuildFile; fileRef = B95FC97422AF051B005DEA0A /* xcode-build.sh */; }; B95FC97622B84B0A005DEA0A /* TestNSSortDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 152EF3932283457B001E1269 /* TestNSSortDescriptor.swift */; }; B98E33DD2136AA740044EBE9 /* TestFileWithZeros.txt in Resources */ = {isa = PBXBuildFile; fileRef = B98E33DC2136AA740044EBE9 /* TestFileWithZeros.txt */; }; + B99EAE72236044C900C8FB46 /* SwiftXCTest.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = B95FC97222AF0050005DEA0A /* SwiftXCTest.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; B9C0E89620C31AB60064C68C /* CFInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B5D888A1BBC963C00234F36 /* CFInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; BB3D7558208A1E500085CFDC /* TestImports.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB3D7557208A1E500085CFDC /* TestImports.swift */; }; BD8042161E09857800487EB8 /* TestLengthFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD8042151E09857800487EB8 /* TestLengthFormatter.swift */; }; @@ -672,6 +674,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + B99EAE72236044C900C8FB46 /* SwiftXCTest.framework in CopyFiles */, 5BDC406E1BD6D8C400ED97BB /* SwiftFoundation.framework in CopyFiles */, 1550111822EA43E00088F082 /* SwiftFoundationXML.framework in CopyFiles */, 1550111C22EA43E20088F082 /* SwiftFoundationNetworking.framework in CopyFiles */, @@ -934,7 +937,7 @@ 5B6E11A81DA45EB5009B48A3 /* CFDateFormatter_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFDateFormatter_Private.h; sourceTree = ""; }; 5B6F17921C48631C00935030 /* TestNSNull.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestNSNull.swift; sourceTree = ""; }; 5B6F17931C48631C00935030 /* TestNumberFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestNumberFormatter.swift; sourceTree = ""; }; - 5B6F17941C48631C00935030 /* TestProcess.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TestProcess.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; + 5B6F17941C48631C00935030 /* TestProcess.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TestProcess.swift; sourceTree = ""; }; 5B6F17951C48631C00935030 /* TestXMLDocument.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestXMLDocument.swift; sourceTree = ""; }; 5B6F17961C48631C00935030 /* TestUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestUtils.swift; sourceTree = ""; }; 5B7818591D6CB5CD004A01F2 /* CGFloat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGFloat.swift; sourceTree = ""; }; @@ -1063,8 +1066,10 @@ B91095791EEF237800A71930 /* NSString-UTF16-BE-data.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "NSString-UTF16-BE-data.txt"; sourceTree = ""; }; B933A79C1F3055F600FE6846 /* NSString-UTF32-BE-data.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = "NSString-UTF32-BE-data.txt"; sourceTree = ""; }; B933A79D1F3055F600FE6846 /* NSString-UTF32-LE-data.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = "NSString-UTF32-LE-data.txt"; sourceTree = ""; }; - B940492C223B146800FB4384 /* TestProgressFraction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestProgressFraction.swift; path = TestFoundation/TestProgressFraction.swift; sourceTree = ""; }; + B940492C223B146800FB4384 /* TestProgressFraction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProgressFraction.swift; sourceTree = ""; }; B951B5EB1F4E2A2000D8B332 /* TestNSLock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestNSLock.swift; sourceTree = ""; }; + B95FC97222AF0050005DEA0A /* SwiftXCTest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftXCTest.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B95FC97422AF051B005DEA0A /* xcode-build.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "xcode-build.sh"; sourceTree = ""; }; B98E33DC2136AA740044EBE9 /* TestFileWithZeros.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestFileWithZeros.txt; sourceTree = ""; }; B9974B8F1EDF4A22007F15B8 /* TransferState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransferState.swift; sourceTree = ""; }; B9974B901EDF4A22007F15B8 /* MultiHandle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MultiHandle.swift; sourceTree = ""; }; @@ -1328,7 +1333,7 @@ 5B5D88531BBC938800234F36 = { isa = PBXGroup; children = ( - B940492C223B146800FB4384 /* TestProgressFraction.swift */, + B95FC97422AF051B005DEA0A /* xcode-build.sh */, B167A6641ED7303F0040B09A /* README.md */, 5BDC3F2C1BCC5DB500ED97BB /* Foundation */, EAB57B681BD1A255004AC5C5 /* CoreFoundation */, @@ -1338,6 +1343,7 @@ 5B5D89AB1BBDCD0B00234F36 /* Frameworks */, 5B5D885E1BBC938800234F36 /* Products */, 1550110A22EA266C0088F082 /* SwiftFoundation copy-Info.plist */, + B95FC97222AF0050005DEA0A /* SwiftXCTest.framework */, ); indentWidth = 4; sourceTree = ""; @@ -1819,6 +1825,7 @@ 3EA9D66F1EF0532D00B362D6 /* TestJSONEncoder.swift */, AA9E0E0C21FA6E0700963F4C /* TestPropertyListEncoder.swift */, DCA8120A1F046D13000D0C86 /* TestCodable.swift */, + B940492C223B146800FB4384 /* TestProgressFraction.swift */, C93559281C12C49F009FD6A9 /* TestAffineTransform.swift */, EA66F63C1BF1619600136161 /* TestNSArray.swift */, 294E3C1C1CC5E19300E4F44C /* TestNSAttributedString.swift */, @@ -2629,6 +2636,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + B95FC97522AF051B005DEA0A /* xcode-build.sh in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4032,6 +4040,7 @@ CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; HEADER_SEARCH_PATHS = "$(CONFIGURATION_BUILD_DIR)/usr/local/include"; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx @executable_path @executable_path/../Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -4044,6 +4053,7 @@ CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; HEADER_SEARCH_PATHS = "$(CONFIGURATION_BUILD_DIR)/usr/local/include"; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx @executable_path @executable_path/../Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; }; diff --git a/Foundation.xcodeproj/xcshareddata/xcschemes/TestFoundation.xcscheme b/Foundation.xcodeproj/xcshareddata/xcschemes/TestFoundation.xcscheme index 9c1403d33f..a5507efc2a 100644 --- a/Foundation.xcodeproj/xcshareddata/xcschemes/TestFoundation.xcscheme +++ b/Foundation.xcodeproj/xcshareddata/xcschemes/TestFoundation.xcscheme @@ -83,8 +83,6 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - + + Bool { #endif } +#if !DARWIN_COMPATIBILITY_TESTS func testCaseExpectedToFail(_ allTests: [(String, (T) -> () throws -> Void)], _ reason: String) -> XCTestCaseEntry { return testCase(allTests.map { ($0.0, testExpectedToFail($0.1, "This test suite is disabled: \(reason)")) }) } +#endif func appendTestCaseExpectedToFail(_ reason: String, _ allTests: [(String, (T) -> () throws -> Void)], into array: inout [XCTestCaseEntry]) { if shouldAttemptXFailTests(reason) { diff --git a/xcode-build.sh b/xcode-build.sh new file mode 100755 index 0000000000..4bc689ab9c --- /dev/null +++ b/xcode-build.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +DERIVED_DATA=xcode-test-build + +CLEAN=0 +CONFIG=Debug +TEST=0 +TESTCASE="" + +for i in "$@" +do + case $i in + -h) + echo "usage: $0 [--clean] [--debug|--release] [--test]" + exit 0 + ;; + + --clean) + CLEAN=1 + ;; + + --debug) + CONFIG=Debug + ;; + + --release) + CONFIG=Release + ;; + + --test) + TEST=1 +;; + *) + TESTCASE="$i" + break + ;; + esac +done + +if [ $CLEAN = 1 ]; then + echo Cleaning + rm -rf "${DERIVED_DATA}" +fi + +xcodebuild -derivedDataPath $DERIVED_DATA -workspace Foundation.xcworkspace -scheme SwiftFoundation -configuration $CONFIG build || exit 1 +xcodebuild -derivedDataPath $DERIVED_DATA -workspace Foundation.xcworkspace -scheme SwiftFoundationNetworking -configuration $CONFIG build || exit 1 + +if [ $TEST = 1 ]; then + echo Testing + xcodebuild -derivedDataPath $DERIVED_DATA -workspace Foundation.xcworkspace -scheme TestFoundation -configuration $CONFIG build || exit 1 + $DERIVED_DATA/Build/Products/$CONFIG/TestFoundation.app/Contents/MacOS/TestFoundation $TESTCASE +fi +