KT-45777: Clean up build cache tests for incremental compilation
- Clean up BuildCacheRelocationIT.testKotlinIncrementalCompilation - Delete BuildCacheIT.testKotlinCompileIncrementalBuildWithoutRelocation as it is already covered by the test in BuildCacheRelocationIT - Add BuildCacheRelocationIT.testKotlinIncrementalCompilation_withClasspathSnapshot - Updated BuildCacheRelocationIT.testKotlinIncrementalCompilation_withClasspathSnapshot
This commit is contained in:
committed by
nataliya.valtman
parent
200cc9f75f
commit
d018031cbf
+9
-1
@@ -129,7 +129,15 @@ abstract class IncrementalCompilerRunner<
|
||||
else -> providedChangedFiles
|
||||
}
|
||||
|
||||
val compilationMode = sourcesToCompile(caches, changedFiles, args, messageCollector, classpathAbiSnapshot)
|
||||
// Check whether the cache directory is populated (note that it may be deleted upon a Gradle build cache hit if the directory is
|
||||
// marked as @LocalState in the Gradle task).
|
||||
val cacheDirectoryNotPopulated = cacheDirectory.walk().none { it.isFile }
|
||||
|
||||
val compilationMode = if (cacheDirectoryNotPopulated) {
|
||||
CompilationMode.Rebuild(BuildAttribute.CACHE_DIRECTORY_NOT_POPULATED)
|
||||
} else {
|
||||
sourcesToCompile(caches, changedFiles, args, messageCollector, classpathAbiSnapshot)
|
||||
}
|
||||
|
||||
val exitCode = when (compilationMode) {
|
||||
is CompilationMode.Incremental -> {
|
||||
|
||||
+1
-1
@@ -256,7 +256,7 @@ class IncrementalJvmCompilerRunner(
|
||||
is NotAvailableDueToMissingClasspathSnapshot -> ChangesEither.Unknown(BuildAttribute.CLASSPATH_SNAPSHOT_NOT_FOUND)
|
||||
is NotAvailableForNonIncrementalRun -> ChangesEither.Unknown(BuildAttribute.UNKNOWN_CHANGES_IN_GRADLE_INPUTS)
|
||||
is ClasspathSnapshotDisabled -> reporter.measure(BuildTime.IC_ANALYZE_CHANGES_IN_DEPENDENCIES) {
|
||||
val lastBuildInfo = BuildInfo.read(lastBuildInfoFile) ?: return CompilationMode.Rebuild(BuildAttribute.IC_IS_NOT_ENABLED)
|
||||
val lastBuildInfo = BuildInfo.read(lastBuildInfoFile) ?: return CompilationMode.Rebuild(BuildAttribute.NO_BUILD_HISTORY)
|
||||
reporter.reportVerbose { "Last Kotlin Build info -- $lastBuildInfo" }
|
||||
val scopes = caches.lookupCache.lookupSymbols.map { it.scope.ifBlank { it.name } }.distinct()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user