From bd3905d2b5db533cdadaa8718e5c77de0fd397b0 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 26 Dec 2024 17:27:06 +0300 Subject: [PATCH] Disable long dataflow tests --- .../src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsNpeTest.kt | 2 ++ .../src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsSqlTest.kt | 3 +++ .../test/kotlin/org/usvm/dataflow/jvm/impl/IfdsUnusedTest.kt | 2 ++ .../org/usvm/dataflow/jvm/impl/JodaDateTimeAnalysisTest.kt | 2 ++ 4 files changed, 9 insertions(+) diff --git a/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsNpeTest.kt b/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsNpeTest.kt index 71836d4f1..fb1273a87 100644 --- a/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsNpeTest.kt +++ b/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsNpeTest.kt @@ -28,6 +28,7 @@ import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test import org.junit.jupiter.api.TestInstance import org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS +import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.Arguments import org.junit.jupiter.params.provider.MethodSource @@ -41,6 +42,7 @@ import kotlin.time.Duration.Companion.seconds private val logger = mu.KotlinLogging.logger {} +@EnabledIfEnvironmentVariable(named = "ENABLE_JVM_DATAFLOW_LONG_TESTS", matches = "true") @TestInstance(PER_CLASS) class IfdsNpeTest : BaseAnalysisTest() { diff --git a/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsSqlTest.kt b/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsSqlTest.kt index 300967417..a3390ff5b 100644 --- a/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsSqlTest.kt +++ b/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsSqlTest.kt @@ -25,6 +25,8 @@ import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.junit.jupiter.api.TestInstance import org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS +import org.junit.jupiter.api.condition.EnabledIf +import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.Arguments import org.junit.jupiter.params.provider.MethodSource @@ -39,6 +41,7 @@ import kotlin.time.Duration.Companion.seconds private val logger = mu.KotlinLogging.logger {} +@EnabledIfEnvironmentVariable(named = "ENABLE_JVM_DATAFLOW_LONG_TESTS", matches = "true") @TestInstance(PER_CLASS) class IfdsSqlTest : BaseAnalysisTest() { diff --git a/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsUnusedTest.kt b/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsUnusedTest.kt index 1eeb3a2a6..e3b3dc940 100644 --- a/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsUnusedTest.kt +++ b/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/IfdsUnusedTest.kt @@ -23,6 +23,7 @@ import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test import org.junit.jupiter.api.TestInstance import org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS +import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.Arguments import org.junit.jupiter.params.provider.MethodSource @@ -32,6 +33,7 @@ import org.usvm.dataflow.jvm.util.JcTraits import java.util.stream.Stream import kotlin.time.Duration.Companion.seconds +@EnabledIfEnvironmentVariable(named = "ENABLE_JVM_DATAFLOW_LONG_TESTS", matches = "true") @TestInstance(PER_CLASS) class IfdsUnusedTest : BaseAnalysisTest() { diff --git a/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/JodaDateTimeAnalysisTest.kt b/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/JodaDateTimeAnalysisTest.kt index 15ca04eef..05c8d515d 100644 --- a/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/JodaDateTimeAnalysisTest.kt +++ b/usvm-jvm-dataflow/src/test/kotlin/org/usvm/dataflow/jvm/impl/JodaDateTimeAnalysisTest.kt @@ -21,6 +21,7 @@ import org.joda.time.DateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.TestInstance import org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS +import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable import org.usvm.dataflow.jvm.ifds.SingletonUnitResolver import org.usvm.dataflow.jvm.npe.jcNpeManager import org.usvm.dataflow.jvm.taint.jcTaintManager @@ -30,6 +31,7 @@ import kotlin.time.Duration.Companion.seconds private val logger = mu.KotlinLogging.logger {} +@EnabledIfEnvironmentVariable(named = "ENABLE_JVM_DATAFLOW_LONG_TESTS", matches = "true") @TestInstance(PER_CLASS) class JodaDateTimeAnalysisTest : BaseAnalysisTest() {