-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun.py
35 lines (26 loc) · 1017 Bytes
/
run.py
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
import argparse
import os
from pathlib import Path
from run_test.run_test import run as run_test
from run_fl.run_fault_localize import run as run_fault_localize
from run_patch_generator.run_patch_generator import run as run_patch_generator
from run_validator.run_validator import run as run_validator
CUR_DIR = Path(os.getcwd())
def run(src_dir, config):
run_test(config)
run_fault_localize(config)
# src_dir = os.getcwd() + "/example/real/src"
try:
run_patch_generator(src_dir, config)
except AssertionError:
pass
# src_dir = os.getcwd() + "/example/real/src"
run_validator(src_dir, config)
def main() :
parser = argparse.ArgumentParser()
parser.add_argument("-s", "--source-directory", dest="src_dir", action="store", required=True, type=Path)
parser.add_argument("-c", "--config-file", dest="config", action="store", required=True, type=Path)
args = parser.parse_args()
run(args.src_dir, args.config)
if __name__ == "__main__" :
main()