Skip to content

Commit

Permalink
Made it compile, but test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Mar 7, 2024
1 parent c9d6397 commit 5de81ef
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repositories {

// Eclipse CDT repo --> needed for CPG
ivy {
setUrl("https://download.eclipse.org/tools/cdt/releases/11.0/cdt-11.0.0/plugins")
setUrl("https://download.eclipse.org/tools/cdt/releases/11.3/cdt-11.3.1/plugins")
metadataSources {
artifact()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ open class CPGBackend(config: BackendConfiguration) : Backend {
.processAnnotations(processAnnotations)
.failOnError(failOnError)
.useParallelFrontends(useParallelFrontends)
.typeSystemActiveInFrontend(typeSystemActiveInFrontend)
.sourceLocations(source.map { (it.toFile()) })
.symbols(symbols)
.useUnityBuild(useUnityBuild)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ private val logger = KotlinLogging.logger {}
data class CPGConfiguration(
val source: List<Path>,
val useUnityBuild: Boolean,
val typeSystemActiveInFrontend: Boolean,
val debugParser: Boolean,
val disableCleanup: Boolean,
val codeInNodes: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class BaseCpgBackend : BackendCommand<CPGBackend>("cpg") {
CPGConfiguration(
source = source,
useUnityBuild = useUnityBuild,
typeSystemActiveInFrontend = typeSystemActiveInFrontend,
debugParser = debugParser,
disableCleanup = disableCleanup,
codeInNodes = codeInNodes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class CokoCpgBackend : BackendCommand<CokoBackend>("cokoCpg") {
CPGConfiguration(
source = source,
useUnityBuild = useUnityBuild,
typeSystemActiveInFrontend = typeSystemActiveInFrontend,
debugParser = debugParser,
disableCleanup = disableCleanup,
codeInNodes = codeInNodes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import de.fraunhofer.aisec.codyze.specificationLanguages.coko.core.dsl.Order
import de.fraunhofer.aisec.codyze.specificationLanguages.coko.core.ordering.*
import de.fraunhofer.aisec.cpg.graph.*
import de.fraunhofer.aisec.cpg.graph.declarations.VariableDeclaration
import de.fraunhofer.aisec.cpg.graph.statements.expressions.DeclaredReferenceExpression
import de.fraunhofer.aisec.cpg.graph.statements.expressions.Reference
import io.github.oshai.kotlinlogging.KotlinLogging
import kotlin.reflect.full.createType
import kotlin.reflect.full.declaredMemberFunctions
Expand Down Expand Up @@ -164,7 +164,7 @@ class OrderEvaluator(val baseNodes: Collection<Node>, val order: Order) : Evalua
nodeToRelevantMethod = nodesToOp,
consideredBases = baseNodes.flatMap { node ->
node.followNextDFGEdgesUntilHit { next ->
next is VariableDeclaration || next is DeclaredReferenceExpression
next is VariableDeclaration || next is Reference
}.fulfilled.mapNotNull { path ->
path.lastOrNull()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class CPGConfigurationTest {
val expectedCpgConfiguration = CPGConfiguration(
source = listOf(),
useUnityBuild = true,
typeSystemActiveInFrontend = false,
debugParser = false,
disableCleanup = false,
codeInNodes = true,
Expand All @@ -46,7 +45,6 @@ class CPGConfigurationTest {
val cpgConfiguration = CPGConfiguration(
source = listOf(),
useUnityBuild = true,
typeSystemActiveInFrontend = false,
debugParser = false,
disableCleanup = false,
codeInNodes = true,
Expand Down Expand Up @@ -74,7 +72,6 @@ class CPGConfigurationTest {
val expectedCpgConfiguration = CPGConfiguration(
source = listOf(),
useUnityBuild = false,
typeSystemActiveInFrontend = false,
debugParser = false,
disableCleanup = false,
codeInNodes = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ import com.github.ajalt.clikt.core.MultiUsageError
import com.github.ajalt.clikt.core.NoOpCliktCommand
import com.github.ajalt.clikt.parameters.groups.provideDelegate
import de.fraunhofer.aisec.codyze.core.config.combineSources
import de.fraunhofer.aisec.cpg.passes.CallResolver
import de.fraunhofer.aisec.cpg.passes.EdgeCachePass
import de.fraunhofer.aisec.cpg.passes.FilenameMapper
import de.fraunhofer.aisec.cpg.passes.Pass
import de.fraunhofer.aisec.cpg.passes.*
import io.github.oshai.kotlinlogging.KotlinLogging
import org.junit.jupiter.api.*
import org.junit.jupiter.api.Test
Expand Down Expand Up @@ -86,7 +83,7 @@ class CpgOptionGroupTest {
fun passesTest() {
val edgeCachePassName = EdgeCachePass::class.qualifiedName
val filenameMapperName = FilenameMapper::class.qualifiedName
val callResolverName = CallResolver::class.qualifiedName
val callResolverName = SymbolResolver::class.qualifiedName
assertNotNull(edgeCachePassName)
assertNotNull(filenameMapperName)
assertNotNull(callResolverName)
Expand All @@ -106,7 +103,7 @@ class CpgOptionGroupTest {
)

val expectedPassesNames =
listOf(EdgeCachePass::class, FilenameMapper::class, CallResolver::class).map { p ->
listOf(EdgeCachePass::class, FilenameMapper::class, SymbolResolver::class).map { p ->
p.qualifiedName
}
val actualPassesNames = cli.cpgOptions.passes.map { p -> p.qualifiedName }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ fun createCpgConfiguration(vararg sourceFile: Path) =
CPGConfiguration(
source = listOf(*sourceFile),
useUnityBuild = false,
typeSystemActiveInFrontend = true,
debugParser = false,
disableCleanup = false,
codeInNodes = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class CokoCpgIntegrationTest {
CPGConfiguration(
source = sourceFiles,
useUnityBuild = false,
typeSystemActiveInFrontend = true,
debugParser = false,
disableCleanup = false,
codeInNodes = true,
Expand Down

0 comments on commit 5de81ef

Please sign in to comment.