[Gradle] Add log level control for K/Native compiler arguments

Just like it was done for other Compile tasks.

^KT-64848 Verification Pending
This commit is contained in:
Anton Lakotka
2024-01-09 16:29:46 +01:00
committed by Space Team
parent 480b8ec516
commit be1819da58
8 changed files with 103 additions and 22 deletions
@@ -1072,4 +1072,28 @@ class GeneralNativeIT : KGPBaseTest() {
}
}
}
@DisplayName("Test compiler arguments for K/Native Tasks")
@GradleTest
fun testCompilerArgumentsLogLevel(gradleVersion: GradleVersion) {
nativeProject("native-libraries", gradleVersion) {
val updatedBuildOptions = buildOptions.copy(
compilerArgumentsLogLevel = "warning"
)
build("assemble", buildOptions = updatedBuildOptions) {
val tasksWithNativeCompilerArguments = listOf(
":compileCommonMainKotlinMetadata", // it is shared native metadata, which is compiled by konan
":compileKotlinLinux64",
":linkMainDebugStaticLinux64",
)
for (task in tasksWithNativeCompilerArguments) {
val taskOutput = getOutputForTask(task, LogLevel.INFO)
assertTrue(
taskOutput.contains("Arguments = "),
"Arguments were not logged by Task $task"
)
}
}
}
}
}