@@ -99,25 +99,8 @@ class SwiftlyTests: XCTestCase {
9999 ]
100100
101101 func baseTestConfig( ) async throws -> Config {
102- let getEnv = { varName in
103- guard let v = ProcessInfo . processInfo. environment [ varName] else {
104- throw SwiftlyTestError ( message: " environment variable \( varName) must be set in order to run tests " )
105- }
106- return v
107- }
108-
109- let name = try ? getEnv ( " SWIFTLY_PLATFORM_NAME " )
110- let nameFull = try ? getEnv ( " SWIFTLY_PLATFORM_NAME_FULL " )
111- let namePretty = try ? getEnv ( " SWIFTLY_PLATFORM_NAME_PRETTY " )
112-
113- let pd = if let name = name, let nameFull = nameFull, let namePretty = namePretty {
114- PlatformDefinition ( name: name, nameFull: nameFull, namePretty: namePretty)
115- } else {
116- try ? await Swiftly . currentPlatform. detectPlatform ( disableConfirmation: true , platform: nil )
117- }
118-
119- guard let pd = pd else {
120- throw SwiftlyTestError ( message: " unable to detect platform. please set SWIFTLY_PLATFORM_NAME, SWIFTLY_PLATFORM_NAME_FULL, and SWIFTLY_PLATFORM_NAME_PRETTY to run the tests " )
102+ guard let pd = try ? await Swiftly . currentPlatform. detectPlatform ( disableConfirmation: true , platform: nil ) else {
103+ throw SwiftlyTestError ( message: " Unable to detect the current platform. " )
121104 }
122105
123106 return Config (
@@ -146,9 +129,6 @@ class SwiftlyTests: XCTestCase {
146129 /// Create a fresh swiftly home directory, populate it with a base config, and run the provided closure.
147130 /// Any swiftly commands executed in the closure will use this new home directory.
148131 ///
149- /// This method requires the SWIFTLY_PLATFORM_NAME, SWIFTLY_PLATFORM_NAME_FULL, and SWIFTLY_PLATFORM_NAME_PRETTY
150- /// environment variables to be set.
151- ///
152132 /// The home directory will be deleted after the provided closure has been executed.
153133 func withTestHome(
154134 name: String = " testHome " ,
0 commit comments