-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
executable file
·42 lines (33 loc) · 1.17 KB
/
run.py
File metadata and controls
executable file
·42 lines (33 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import argparse
import sys
from argparse import Namespace
from pathlib import Path
from src.core.debug_agent import DebugAgent
root = Path(__file__).resolve().parent
sys.path.append(str(root))
from src.config import BugInfo
from src.interfaces.d4j import get_failed_tests, get_properties
def main(proj, bug_id, config_file):
args = Namespace(project=proj, bugID=bug_id, config=config_file)
bug_info = BugInfo(args)
# collect basic bug information from cache
# for preprocessing please run `preprocess.py`
get_properties(bug_info)
test_failure_obj = get_failed_tests(bug_info)
# run the debug agent
debug_agent = DebugAgent(bug_info)
debug_agent.run(test_failure_obj)
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Run the debug agent")
parser.add_argument(
"--project", type=str, help="project name", default="Chart"
)
parser.add_argument("--bugID", type=str, help="bug id", default="1")
parser.add_argument(
"--config",
type=str,
help="config file",
default="config/default.yml",
)
args = parser.parse_args()
main(args.project, args.bugID, args.config)