1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Task management fixes.

This commit is contained in:
Cedric Beust 2016-04-21 05:53:58 -08:00
parent 1d8587278b
commit d08fe21e24
2 changed files with 46 additions and 33 deletions

View file

@ -43,9 +43,10 @@ class TaskManagerTest @Inject constructor(val taskManager: TaskManager) {
return result
}
@Test
@Test(enabled = true)
fun graphTest() {
// KobaltLogger.LOG_LEVEL = 3
val t = runCompileTasks(listOf("compile"))
Assert.assertEquals(runCompileTasks(listOf("compile")), listOf("compile", "postCompile"))
Assert.assertEquals(runCompileTasks(listOf("postCompile")), listOf("postCompile"))
Assert.assertEquals(runCompileTasks(listOf("compile", "postCompile")), listOf("compile", "postCompile"))
@ -84,6 +85,16 @@ class TaskManagerTest @Inject constructor(val taskManager: TaskManager) {
@Test
fun exampleInTheDocTest() {
Assert.assertEquals(runTasks(listOf("assemble"),
dependsOn = TreeMultimap.create<String, String>().apply {
put("assemble", "compile")
},
reverseDependsOn = TreeMultimap.create<String, String>().apply {
put("compile", "copyVersionForWrapper")
put("copyVersionForWrapper", "assemble")
}),
listOf("compile", "copyVersionForWrapper", "assemble"))
Assert.assertEquals(runTasks(listOf("compile"),
dependsOn = TreeMultimap.create<String, String>().apply {
put("compile", "clean")