Run scripted tests in the alphabetical order

Makes the order deterministic and makes it easier to see the progress on
running tests.
This commit is contained in:
Grzegorz Kossakowski 2016-04-07 12:48:45 +02:00
parent 5ad5591c8e
commit 89e88ff584
1 changed files with 4 additions and 4 deletions

View File

@ -147,13 +147,13 @@ final class ListTests(baseDirectory: File, accept: ScriptedTest => Boolean, log:
listTests(group).map(ScriptedTest(groupName, _))
}
}
private[this] def listTests(group: File): Set[String] =
private[this] def listTests(group: File): Seq[String] =
{
val groupName = group.getName
val allTests = list(group, filter)
val allTests = list(group, filter).sortBy(_.getName)
if (allTests.isEmpty) {
log.warn("No tests in test group " + groupName)
Set.empty
Seq.empty
} else {
val (included, skipped) = allTests.toList.partition(test => accept(ScriptedTest(groupName, test.getName)))
if (included.isEmpty)
@ -162,7 +162,7 @@ final class ListTests(baseDirectory: File, accept: ScriptedTest => Boolean, log:
log.warn("Tests skipped in group " + group.getName + ":")
skipped.foreach(testName => log.warn(" " + testName.getName))
}
Set(included.map(_.getName): _*)
Seq(included.map(_.getName): _*)
}
}
}