Skip to content

Commit f889bd6

Browse files
committed
update of usvm-python-runner
1 parent c808651 commit f889bd6

File tree

8 files changed

+18
-17
lines changed

8 files changed

+18
-17
lines changed

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,5 @@ org.gradle.parallel=true
135135
org.gradle.caching=true
136136
# there is no need to override the option below because parallel execution is disabled by --no-parallel
137137
org.gradle.workers.max=8
138+
139+
usvmPythonRunnerHash=0b8aff0

utbot-cli-python/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ dependencies {
2424
implementation group: 'com.github.ajalt.clikt', name: 'clikt', version: cliktVersion
2525
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: log4j2Version
2626
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: log4j2Version
27+
28+
implementation group: 'org.usvm', name: 'usvm-python-commons', version: usvmPythonRunnerHash
2729
}
2830

2931
processResources {

utbot-cli-python/src/main/kotlin/org/utbot/cli/language/python/sbft/SbftGenerateTestsCommand.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import com.github.ajalt.clikt.parameters.types.enum
1212
import com.github.ajalt.clikt.parameters.types.long
1313
import mu.KotlinLogging
1414
import org.parsers.python.PythonParser
15+
import org.usvm.python.ps.PyPathSelectorType
1516
import org.utbot.cli.language.python.CliRequirementsInstaller
1617
import org.utbot.cli.language.python.findCurrentPythonModule
1718
import org.utbot.cli.language.python.toAbsolutePath
@@ -115,6 +116,10 @@ class SbftGenerateTestsCommand : CliktCommand(
115116
.enum<InputSearchMode> { it.name }
116117
.default(InputSearchMode.BOTH)
117118

119+
private val pathSelector by option("--path-selector")
120+
.enum<PyPathSelectorType> { it.name }
121+
.default(PyPathSelectorType.BaselinePriorityDfs)
122+
118123
private val javaCmd by option(
119124
"--java-cmd",
120125
help = "(required) Path to Java command (ONLY FOR USVM)."

utbot-intellij-main/src/main/resources/settings.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2023 utbot.org
1+
# Copyright (c) 2024 utbot.org
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

utbot-junit-contest/build.gradle

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,6 @@ plugins {
33
}
44
apply plugin: 'jacoco'
55

6-
repositories {
7-
mavenLocal()
8-
mavenCentral()
9-
maven { url 'https://jitpack.io' }
10-
maven {
11-
url = uri('https://maven.pkg.github.com/UnitTestBot/usvm')
12-
credentials {
13-
username = System.getenv("GITHUB_ACTOR")
14-
password = System.getenv("GITHUB_TOKEN")
15-
}
16-
}
17-
}
18-
196
configurations {
207
fetchInstrumentationJar
218
approximations

utbot-python/build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ val kotlinLoggingVersion: String? by rootProject
33
val apacheCommonsTextVersion: String? by rootProject
44
val jacksonVersion: String? by rootProject
55
val log4j2Version: String? by rootProject
6+
val usvmPythonRunnerHash: String by rootProject
67

78
dependencies {
89
api(project(":utbot-fuzzing"))
910
api(project(":utbot-framework"))
1011
api(project(":utbot-python-parser"))
1112
api(project(":utbot-python-types"))
1213
api(project(":utbot-python-executor"))
13-
api("org.usvm:usvm-python-runner:b087c5c")
14+
api("org.usvm:usvm-python-runner:${usvmPythonRunnerHash}")
15+
api("org.usvm:usvm-python-commons:${usvmPythonRunnerHash}")
1416

1517
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1")
1618
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

utbot-python/src/main/kotlin/org/utbot/python/PythonTestGenerationConfig.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.utbot.python
22

3+
import org.usvm.python.ps.PyPathSelectorType
34
import org.utbot.framework.codegen.domain.RuntimeExceptionTestsBehaviour
45
import org.utbot.framework.codegen.domain.TestFramework
56
import org.utbot.python.coverage.CoverageOutputFormat
@@ -34,7 +35,8 @@ class PythonTestGenerationConfig(
3435
val prohibitedExceptions: List<String> = defaultProhibitedExceptions,
3536
val checkUsvm: Boolean = false,
3637
val doNotGenerateStateAssertions: Boolean = false,
37-
val inputSearchMode: InputSearchMode = InputSearchMode.BOTH
38+
val inputSearchMode: InputSearchMode = InputSearchMode.BOTH,
39+
val pathSelector: PyPathSelectorType = PyPathSelectorType.BaselinePriorityDfs
3840
) {
3941
companion object {
4042
val defaultProhibitedExceptions = listOf(

utbot-python/src/main/kotlin/org/utbot/python/engine/GlobalPythonEngine.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ class GlobalPythonEngine(
6565
configuration.usvmConfig.javaCmd,
6666
mypyConfig.mypyBuildDirectory.root.canonicalPath,
6767
configuration.sysPathDirectories,
68-
extractVenvConfig(configuration.pythonPath)
68+
extractVenvConfig(configuration.pythonPath),
69+
configuration.pathSelector
6970
)
7071
val runner = SymbolicExecutionEvaluator(
7172
method,

0 commit comments

Comments
 (0)