mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Logging clean up.
This commit is contained in:
parent
8a672ad764
commit
8805e1c130
62 changed files with 336 additions and 320 deletions
|
@ -1,7 +1,7 @@
|
|||
package com.beust.kobalt
|
||||
|
||||
import com.beust.kobalt.misc.KFiles
|
||||
import com.beust.kobalt.misc.log
|
||||
import com.beust.kobalt.misc.kobaltLog
|
||||
import org.testng.Assert
|
||||
import org.testng.annotations.Test
|
||||
import java.io.File
|
||||
|
@ -69,9 +69,9 @@ class VerifyKobaltZipTest : KobaltTest() {
|
|||
if (!foundWrapperJar) {
|
||||
throw KobaltException("Couldn't find wrapper jar in $zipFilePath")
|
||||
}
|
||||
log(1, "$zipFilePath looks correct")
|
||||
kobaltLog(1, "$zipFilePath looks correct")
|
||||
} else {
|
||||
log(1, "Couldn't find $zipFilePath, skipping test")
|
||||
kobaltLog(1, "Couldn't find $zipFilePath, skipping test")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ class VerifyKobaltZipTest : KobaltTest() {
|
|||
if (file.exists()) {
|
||||
assertExistsInJarInputStream(JarInputStream(FileInputStream(file)), *fileNames)
|
||||
} else {
|
||||
log(1, "Couldn't find $file, skipping test")
|
||||
kobaltLog(1, "Couldn't find $file, skipping test")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.beust.kobalt.internal
|
||||
|
||||
import com.beust.kobalt.misc.Topological
|
||||
import com.beust.kobalt.misc.log
|
||||
import com.beust.kobalt.misc.kobaltLog
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.testng.Assert
|
||||
import org.testng.annotations.Test
|
||||
|
@ -29,7 +29,7 @@ class DynamicGraphTest {
|
|||
override val priority = 0
|
||||
override val name: String get() = "[Worker " + runNodes.map { it.toString() }.joinToString(",") + "]"
|
||||
override fun call() : TaskResult2<T> {
|
||||
log(2, "Running node $n")
|
||||
kobaltLog(2, "Running node $n")
|
||||
runNodes.add(n)
|
||||
return TaskResult2(errorFunction(n), null, n)
|
||||
}
|
||||
|
@ -159,27 +159,27 @@ class DynamicGraphTest {
|
|||
addEdge("b", "c")
|
||||
addEdge("b", "d")
|
||||
addNode("e")
|
||||
log(VERBOSE, dump())
|
||||
kobaltLog(VERBOSE, dump())
|
||||
Assert.assertEquals(freeNodes, setOf("c", "d", "e"))
|
||||
|
||||
removeNode("c")
|
||||
log(VERBOSE, dump())
|
||||
kobaltLog(VERBOSE, dump())
|
||||
Assert.assertEquals(freeNodes, setOf("d", "e"))
|
||||
|
||||
removeNode("d")
|
||||
log(VERBOSE, dump())
|
||||
kobaltLog(VERBOSE, dump())
|
||||
Assert.assertEquals(freeNodes, setOf("b", "e"))
|
||||
|
||||
removeNode("e")
|
||||
log(VERBOSE, dump())
|
||||
kobaltLog(VERBOSE, dump())
|
||||
Assert.assertEquals(freeNodes, setOf("b"))
|
||||
|
||||
removeNode("b")
|
||||
log(VERBOSE, dump())
|
||||
kobaltLog(VERBOSE, dump())
|
||||
Assert.assertEquals(freeNodes, setOf("a"))
|
||||
|
||||
removeNode("a")
|
||||
log(VERBOSE, dump())
|
||||
kobaltLog(VERBOSE, dump())
|
||||
Assert.assertTrue(freeNodes.isEmpty())
|
||||
Assert.assertTrue(nodes.isEmpty())
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class TaskManagerTest : BaseTest() {
|
|||
// alwaysRunAfter = TreeMultimap.create<String, String>().apply {
|
||||
// put("postCompile", "compile")
|
||||
// })
|
||||
// log(1, "GRAPH RUN: " + result)
|
||||
// kobaltLog((1, "GRAPH RUN: " + result)
|
||||
// return result
|
||||
// }
|
||||
//
|
||||
|
@ -84,7 +84,7 @@ class TaskManagerTest : BaseTest() {
|
|||
dependsOn, reverseDependsOn, runBefore, runAfter, alwaysRunAfter,
|
||||
{ it }, { t -> true })
|
||||
val result = DryRunGraphExecutor(graph).run()
|
||||
// log(1, "GRAPH RUN: $result")
|
||||
// kobaltLog((1, "GRAPH RUN: $result")
|
||||
return result
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue