Run more scripted tests on windows

Given that there are io differences between windows and posix systems,
we should aim to run the tests that do a lot of io on windows. There are
a few tests that don't work because of some platform specific issues so
I added a filter that excludes these tests on windows in ScriptedTests.
This commit is contained in:
Ethan Atkins 2019-05-11 17:19:48 -07:00
parent 8f54ecd536
commit 4b915ff69e
2 changed files with 22 additions and 8 deletions

View File

@ -23,7 +23,7 @@ install:
- SET PATH=C:\sbt\sbt\bin;%PATH%
- SET SBT_OPTS=-XX:MaxPermSize=2g -Xmx4g -Dsbt.supershell=never -Dfile.encoding=UTF8
test_script:
- sbt "scripted actions/*" "testOnly sbt.ServerSpec"
- sbt "scripted actions/* classloader-cache/* nio/* watch/*" "testOnly sbt.ServerSpec"
cache:
- '%USERPROFILE%\.ivy2\cache'

View File

@ -129,13 +129,16 @@ final class ScriptedTests(
case s => s
}
val (launcherBasedTests, runFromSourceBasedTests) = labelsAndDirs.partition {
case (testName, _) =>
determineRemoteSbtCreatorKind(testName) match {
case RemoteSbtCreatorKind.LauncherBased => true
case RemoteSbtCreatorKind.RunFromSourceBased => false
}
}
val (launcherBasedTestsUnfiltered, runFromSourceBasedTestsUnfiltered) =
labelsAndDirs.partition {
case (testName, _) =>
determineRemoteSbtCreatorKind(testName) match {
case RemoteSbtCreatorKind.LauncherBased => true
case RemoteSbtCreatorKind.RunFromSourceBased => false
}
}
val launcherBasedTests = launcherBasedTestsUnfiltered.filterNot(windowsExclude)
val runFromSourceBasedTests = runFromSourceBasedTestsUnfiltered.filterNot(windowsExclude)
def logTests(size: Int, how: String) =
log.info(
@ -163,6 +166,17 @@ final class ScriptedTests(
}
}
private[this] val windowsExclude: (((String, String), File)) => Boolean =
if (scala.util.Properties.isWin) {
case (testName, _) =>
testName match {
case ("classloader-cache", "jni") => true // no native lib is built for windows
case ("classloader-cache", "snapshot") =>
true // the test overwrites a jar that is being used which is verboten in windows
case ("nio", "make-clone") => true // uses gcc which isn't set up on all systems
case _ => false
}
} else _ => false
private def determineRemoteSbtCreatorKind(testName: (String, String)): RemoteSbtCreatorKind = {
import RemoteSbtCreatorKind._
val (group, name) = testName