[PL][tests] Fix: Properly count test steps in KLIB ABI compatibility tests
This commit is contained in:
committed by
Space Team
parent
c38d0d7359
commit
dc05683f59
@@ -87,7 +87,7 @@ object KlibABITestUtils {
|
||||
val (moduleInfo, moduleTestDir, moduleBuildDirs, klibFile) = modulesMap[moduleName]
|
||||
?: fail { "No module $moduleName found on step ${projectStep.id}" }
|
||||
|
||||
val moduleStep = moduleInfo.steps[projectStep.id]
|
||||
val moduleStep = moduleInfo.steps.getValue(projectStep.id)
|
||||
|
||||
moduleStep.modifications.forEach { modification ->
|
||||
modification.execute(moduleTestDir, moduleBuildDirs.sourceDir)
|
||||
|
||||
@@ -52,7 +52,7 @@ class ModuleInfo(val moduleName: String) {
|
||||
val rebuildKlib: Boolean
|
||||
)
|
||||
|
||||
val steps = mutableListOf<ModuleStep>()
|
||||
val steps = hashMapOf</* step ID */ Int, ModuleStep>()
|
||||
}
|
||||
|
||||
const val PROJECT_INFO_FILE = "project.info"
|
||||
@@ -276,7 +276,9 @@ class ModuleInfoParser(infoFile: File) : InfoParser<ModuleInfo>(infoFile) {
|
||||
if (stepMatcher.matches()) {
|
||||
val firstId = Integer.parseInt(stepMatcher.group(1))
|
||||
val lastId = stepMatcher.group(2)?.let { Integer.parseInt(it) } ?: firstId
|
||||
result.steps += parseSteps(firstId, lastId)
|
||||
parseSteps(firstId, lastId).forEach { step ->
|
||||
result.steps[step.id] = step
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ abstract class AbstractInvalidationTest(
|
||||
val moduleTestDir = File(testDir, module)
|
||||
val moduleSourceDir = File(sourceDir, module)
|
||||
val moduleInfo = moduleInfos[module] ?: error("No module info found for $module")
|
||||
val moduleStep = moduleInfo.steps[projStepId]
|
||||
val moduleStep = moduleInfo.steps.getValue(projStepId)
|
||||
val deletedFiles = mutableSetOf<String>()
|
||||
for (modification in moduleStep.modifications) {
|
||||
modification.execute(moduleTestDir, moduleSourceDir) { deletedFiles.add(it.name) }
|
||||
|
||||
Reference in New Issue
Block a user