Skip to content

Commit a5aec1b

Browse files
committed
Visibility fixes
1 parent d56aa84 commit a5aec1b

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

utbot-framework-test/src/main/kotlin/org/utbot/testing/CompilationAndRunUtils.kt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import org.utbot.framework.plugin.api.CodegenLanguage
44
import java.io.File
55
import java.nio.file.Path
66
import org.utbot.common.FileUtil
7-
import org.utbot.engine.logger
87
import org.utbot.framework.codegen.Junit5
98
import org.utbot.framework.codegen.TestFramework
109

@@ -33,7 +32,7 @@ fun writeTest(
3332
File(buildDirectory.toFile(), "${testClassName.substringAfterLast(".")}${generatedLanguage.extension}")
3433
)
3534

36-
org.utbot.testing.logger.info {
35+
logger.info {
3736
"File size for ${classUnderTest.testClassSimpleName}: ${FileUtil.byteCountToDisplaySize(testContents.length.toLong())}"
3837
}
3938
return writeFile(testContents, classUnderTest.generatedTestFile)
@@ -47,9 +46,9 @@ fun compileTests(
4746
val classpath = System.getProperty("java.class.path")
4847
val command = generatedLanguage.getCompilationCommand(buildDirectory, classpath, sourcesFiles)
4948

50-
org.utbot.testing.logger.trace { "Command to compile [${sourcesFiles.joinToString(" ")}]: [${command.joinToString(" ")}]" }
49+
logger.trace { "Command to compile [${sourcesFiles.joinToString(" ")}]: [${command.joinToString(" ")}]" }
5150
val exitCode = execCommandLine(command, "Tests compilation")
52-
org.utbot.testing.logger.info { "Compilation exit code: $exitCode" }
51+
logger.info { "Compilation exit code: $exitCode" }
5352
}
5453

5554
fun runTests(
@@ -74,7 +73,7 @@ fun runTests(
7473
additionalArguments
7574
)
7675

77-
org.utbot.testing.logger.trace { "Command to run test: [${command.joinToString(" ")}]" }
76+
logger.trace { "Command to run test: [${command.joinToString(" ")}]" }
7877

7978
// We use argument file to pass classpath, so we should just call execCommand.
8079
// Because of some reason, it is impossible to use the same approach with Junit4 and TestNg, therefore,
@@ -85,7 +84,7 @@ fun runTests(
8584
setClassPathAndExecCommandLine(command, "Tests execution", classpath)
8685
}
8786

88-
org.utbot.testing.logger.info { "Run for [${testsNames.joinToString(" ")}] completed with exit code: $exitCode" }
87+
logger.info { "Run for [${testsNames.joinToString(" ")}] completed with exit code: $exitCode" }
8988
}
9089

9190
/**
@@ -105,13 +104,13 @@ private fun constructProcess(command: List<String>, classpath: String? = null):
105104
private fun generateReportByProcess(process: Process, executionName: String, command: List<String>): Int {
106105
val report = process.inputStream.reader().readText()
107106

108-
org.utbot.testing.logger.info { "$executionName report: [$report]" }
107+
logger.info { "$executionName report: [$report]" }
109108

110109
val exitCode = process.waitFor()
111110

112111
if (exitCode != 0) {
113-
org.utbot.testing.logger.warn { "Exit code for process run: $exitCode" }
114-
org.utbot.testing.logger.warn { "The command line led to the pipeline failure: [${command.joinToString(" ")}]" }
112+
logger.warn { "Exit code for process run: $exitCode" }
113+
logger.warn { "The command line led to the pipeline failure: [${command.joinToString(" ")}]" }
115114
throw RuntimeException("$executionName failed with non-zero exit code = $exitCode")
116115
}
117116

utbot-framework-test/src/main/kotlin/org/utbot/testing/TestCodeGeneratorPipeline.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import java.io.File
2727
import java.nio.file.Path
2828
import kotlin.reflect.KClass
2929

30-
private val logger = KotlinLogging.logger {}
30+
internal val logger = KotlinLogging.logger {}
3131

3232
class TestCodeGeneratorPipeline(private val testFrameworkConfiguration: TestFrameworkConfiguration) {
3333

utbot-framework-test/src/main/kotlin/org/utbot/testing/TestSpecificTestCaseGenerator.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import org.utbot.framework.plugin.api.util.id
2020
import org.utbot.framework.plugin.services.JdkInfoDefaultProvider
2121
import org.utbot.framework.util.Conflict
2222
import org.utbot.framework.util.jimpleBody
23-
import org.utbot.testing.conflictTriggers
2423
import java.nio.file.Path
2524

2625
/**

utbot-framework-test/src/main/kotlin/org/utbot/testing/UtModelTestCaseChecker.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import org.utbot.framework.plugin.api.util.jClass
3333
import org.utbot.framework.plugin.api.util.withUtContext
3434
import org.utbot.framework.util.Conflict
3535
import org.utbot.testcheckers.ExecutionsNumberMatcher
36-
import org.utbot.testing.conflictTriggers
3736
import java.nio.file.Path
3837
import kotlin.reflect.KClass
3938
import kotlin.reflect.KFunction

0 commit comments

Comments
 (0)