From 30f9028cde739f44e82a7f8e80c57d4413c58faf Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Fri, 26 Apr 2019 04:03:34 -0400 Subject: [PATCH] Fix flank cancel --- test_runner/src/main/kotlin/ftl/config/FtlConstants.kt | 6 +++--- test_runner/src/main/kotlin/ftl/run/TestRunner.kt | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test_runner/src/main/kotlin/ftl/config/FtlConstants.kt b/test_runner/src/main/kotlin/ftl/config/FtlConstants.kt index e6f420bd48..b72c6e9972 100644 --- a/test_runner/src/main/kotlin/ftl/config/FtlConstants.kt +++ b/test_runner/src/main/kotlin/ftl/config/FtlConstants.kt @@ -30,9 +30,9 @@ object FtlConstants { val macOS: Boolean by lazy { val osName = System.getProperty("os.name") ?: "" - val isMac = osName.toLowerCase().indexOf("mac") >= 0 - println("isMacOS = $isMac ($osName)") - isMac + val isMacOS = osName.toLowerCase().indexOf("mac") >= 0 + println("isMacOS = $isMacOS ($osName)") + isMacOS } const val localhost = "http://localhost:8080" diff --git a/test_runner/src/main/kotlin/ftl/run/TestRunner.kt b/test_runner/src/main/kotlin/ftl/run/TestRunner.kt index d6c7378cc6..69a3842bf1 100644 --- a/test_runner/src/main/kotlin/ftl/run/TestRunner.kt +++ b/test_runner/src/main/kotlin/ftl/run/TestRunner.kt @@ -143,7 +143,9 @@ object TestRunner { val resultsFile = Paths.get(args.localResultDir).toFile() if (!resultsFile.exists()) return null - val scheduledRuns = resultsFile.listFiles().filter { it.isDirectory }.sortedBy { it.lastModified() } + val scheduledRuns = resultsFile.listFiles() + .filter { it.isDirectory } + .sortedByDescending { it.lastModified() } if (scheduledRuns.isEmpty()) return null return scheduledRuns.first().name