@@ -23,8 +23,8 @@ def test_help():
2323
2424def run_bug (bid : str , fixed : bool , act_cache_dir : str = "./act-cache" ):
2525 # Setup temporary directory
26- temp_dir = os . path . join (tempfile .gettempdir (), bid , str (uuid .uuid4 ()))
27- output_dir = os . path . join (temp_dir , "gitbug-java-output" , str ( uuid . uuid4 ()) )
26+ temp_dir = Path (tempfile .gettempdir (), bid , str (uuid .uuid4 ()))
27+ output_dir = Path (temp_dir , ". gitbug-java" )
2828
2929 try :
3030 # Checkout the bug and check correctness
@@ -38,15 +38,14 @@ def run_bug(bid: str, fixed: bool, act_cache_dir: str = "./act-cache"):
3838 return
3939
4040 # Run the bug and check results
41- run = run_command (
42- f"gitbug-java run { temp_dir } --act_cache_dir={ act_cache_dir } --output={ output_dir } "
43- )
44- if not Path (output_dir , f"{ bid } .json" ).exists ():
41+ run = run_command (f"gitbug-java run { temp_dir } --act_cache_dir={ act_cache_dir } " )
42+ test_results_path = Path (output_dir , "test-results.json" )
43+ if not test_results_path .exists ():
4544 print (f"{ bid } ({ fixed } ) failed to find report" )
4645 print (run .stdout .decode ("utf-8" ))
4746 print (run .stderr .decode ("utf-8" ))
4847 return False
49- with open (os . path . join ( output_dir , f" { bid } .json" ) , "r" ) as f :
48+ with open (test_results_path , "r" ) as f :
5049 report = json .loads (f .read ())
5150
5251 if fixed and run .returncode != 0 :
0 commit comments