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:
Hung Nguyen
2022-01-30 13:38:26 +03:00
committed by nataliya.valtman
parent 200cc9f75f
commit d018031cbf
16 changed files with 133 additions and 214 deletions
@@ -16,6 +16,7 @@ enum class BuildAttributeKind : Serializable {
}
enum class BuildAttribute(val kind: BuildAttributeKind, val readableString: String) : Serializable {
CACHE_DIRECTORY_NOT_POPULATED(BuildAttributeKind.REBUILD_REASON, "Cache directory not populated"),
NO_BUILD_HISTORY(BuildAttributeKind.REBUILD_REASON, "Build history file not found"),
NO_ABI_SNAPSHOT(BuildAttributeKind.REBUILD_REASON, "ABI snapshot not found"),
CLASSPATH_SNAPSHOT_NOT_FOUND(BuildAttributeKind.REBUILD_REASON, "Classpath snapshot not found"),
@@ -288,13 +288,13 @@ data class LookupSymbol(val name: String, val scope: String) : Comparable<Lookup
}
/**
* Wrapper of a [LookupMap] which tracks changes to the map after the initialization of this [TrackedLookupMap] instance, (unless
* Wrapper of a [LookupMap] which tracks changes to the map after the initialization of this [TrackedLookupMap] instance (unless
* [trackChanges] is set to `false`).
*/
private class TrackedLookupMap(private val lookupMap: LookupMap, private val trackChanges: Boolean) {
// Note that there may be multiple operations on the same key, and the following sets contain the *latest* differences with the original
// set of keys in the map. For example, if a key is added then removed, or vice versa, it will not be present in either set.
// Note that there may be multiple operations on the same key, and the following sets contain the *aggregated* differences with the
// original set of keys in the map. For example, if a key is added then removed, or vice versa, it will not be present in either set.
val addedKeys = if (trackChanges) mutableSetOf<LookupSymbolKey>() else null
val removedKeys = if (trackChanges) mutableSetOf<LookupSymbolKey>() else null