Skip to content

Commit

Permalink
Add draft of run test script
Browse files Browse the repository at this point in the history
  • Loading branch information
tamarinvs19 committed Jul 18, 2023
1 parent ba40767 commit ae455a7
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 27 deletions.
13 changes: 13 additions & 0 deletions utbot-python/samples/run_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import json
import os


def parse_config(config_path: str):
with open(config_path, "r") as fin:
return json.loads(fin.read())


def run_tests(jar_path: str, sys_paths: [str], python_path: str, files: list[str], timeout: int = 20, output: str):
command = f"java -jar {jar_path} generate_python {' '.join(files)} -p {python_path} -o {output} -s {' '.join(sys_path)} --timeout {timeout * 1000}"
try:
os.system(command)
27 changes: 0 additions & 27 deletions utbot-python/samples/samples.md

This file was deleted.

42 changes: 42 additions & 0 deletions utbot-python/samples/test_configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"parts": [
{
"path": "samples.algorithms",
"files": [
{
"name": "bfs",
"groups": [
{
"function_names": [
"bfs"
],
"timeout": 10
}
]
},
{
"name": "longest_subsequence",
"groups": [
{
"function_names": [
"longest_subsequence"
],
"timeout": 10
}
]
},
{
"name": "quick_sort",
"groups": [
{
"function_names": [
"quick_sort"
],
"timeout": 10
}
]
}
]
}
]
}

0 comments on commit ae455a7

Please sign in to comment.