[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:
committed by
Space Team
parent
480b8ec516
commit
be1819da58
+24
@@ -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"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user