mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Only run the suite once.
This commit is contained in:
parent
467da05ab1
commit
e451eb8661
1 changed files with 12 additions and 9 deletions
|
@ -26,16 +26,19 @@ public class TestNgRunner() : GenericTestRunner() {
|
|||
}
|
||||
addAll(project.testArgs)
|
||||
|
||||
val testngXml = File(project.directory, KFiles.joinDir("src", "test", "resources", "testng.xml"))
|
||||
if (testngXml.exists()) {
|
||||
add(testngXml.absolutePath)
|
||||
} else {
|
||||
val testClasses = findTestClasses(project)
|
||||
if (testClasses.size > 0) {
|
||||
add("-testclass")
|
||||
add(testClasses.joinToString(","))
|
||||
if (project.testArgs.size == 0) {
|
||||
// No arguments, so we'll do it ourselves. Either testng.xml or the list of classes
|
||||
val testngXml = File(project.directory, KFiles.joinDir("src", "test", "resources", "testng.xml"))
|
||||
if (testngXml.exists()) {
|
||||
add(testngXml.absolutePath)
|
||||
} else {
|
||||
warn("Couldn't find any test classes for ${project.name}")
|
||||
val testClasses = findTestClasses(project)
|
||||
if (testClasses.size > 0) {
|
||||
add("-testclass")
|
||||
add(testClasses.joinToString(","))
|
||||
} else {
|
||||
warn("Couldn't find any test classes for ${project.name}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue