diff --git a/Sources/Configuration/ConfigurationManager.swift b/Sources/Configuration/ConfigurationManager.swift index d3f46c9..617e3b2 100644 --- a/Sources/Configuration/ConfigurationManager.swift +++ b/Sources/Configuration/ConfigurationManager.swift @@ -214,7 +214,7 @@ public class ConfigurationManager { let fn = NSString(string: file) let pathURL: URL - #if os(Linux) + #if os(Linux) && !swift(>=3.1) let isAbsolutePath = fn.absolutePath #else let isAbsolutePath = fn.isAbsolutePath diff --git a/Sources/TestProgram/main.swift b/Sources/TestProgram/main.swift index 33dfd82..a262cf9 100644 --- a/Sources/TestProgram/main.swift +++ b/Sources/TestProgram/main.swift @@ -24,7 +24,7 @@ import Foundation import Configuration var exitCode: Int32 = 0 -var testsExecuted = 0 +var testsExecuted: Int32 = 0 var manager: ConfigurationManager diff --git a/Tests/ConfigurationTests/ConfigurationManagerTest.swift b/Tests/ConfigurationTests/ConfigurationManagerTest.swift index c66b7a9..66f76da 100644 --- a/Tests/ConfigurationTests/ConfigurationManagerTest.swift +++ b/Tests/ConfigurationTests/ConfigurationManagerTest.swift @@ -60,7 +60,7 @@ class ConfigurationManagerTest: XCTestCase { // Helper function to run shell commands // Tip from http://stackoverflow.com/a/26973384 func shell(_ args: String..., environment: [String: String] = [:]) -> (Pipe, Pipe, Int32) { - #if os(Linux) + #if os(Linux) && !swift(>=3.1) let process = Task() #else let process = Process() @@ -189,6 +189,6 @@ class ConfigurationManagerTest: XCTestCase { print(output ?? "No stdout from test executable") XCTAssertEqual(exitCode, 0, "One or more external load assertions failed") - XCTAssertEqual(error, "", "External load test has non-empty error stream: \(error)") + XCTAssertEqual(error, "", "External load test has non-empty error stream: \(String(describing: error))") } }