Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions check_compilation.bat
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ for %%t in (!issue_ids!) do (
if "!testcase!"=="jdk-8319461" set continue=1

if !continue!==0 (
cd !testcase!
if !errorlevel!==1 (
cd !testcase! || (
rem Due to how the specimin CI runs (choosing only a few test cases to run), we should
rem ignore test cases which were not run
echo !testcase! not found. Ignoring it.
Expand All @@ -76,8 +75,7 @@ for %%t in (!issue_ids!) do (
)

if !continue!==0 (
cd !min_program_dir!\
if !errorlevel!==1 (
cd !min_program_dir!\ || (
set compile_status_json=!compile_status_json!^!LF! "!testcase!": "FAIL",
set continue=1
)
Expand All @@ -104,12 +102,11 @@ for %%t in (!issue_ids!) do (
for /r %%F in (*.java) do (
set "JAVA_FILES=!JAVA_FILES! %%F"
)
if "!testcase!"=="na-97" do (
if "!testcase!"=="na-97" (
set "JAVA_FILES=!JAVA_FILES! --patch-module java.base=jdk/src"
)
javac -classpath "%SPECIMIN%\src\test\resources\shared\checker-qual-3.42.0.jar" !JAVA_FILES!
set javac_status=!errorlevel!
if !javac_status!==0 (
if !errorlevel!==0 (
echo Running javac on !testcase!/output PASSES
set compile_status_json=!compile_status_json!^!LF! "!testcase!": "PASS",
) else (
Expand All @@ -121,7 +118,9 @@ for %%t in (!issue_ids!) do (
cd !issues_root! || exit /b 1
)

if "!compile_status_json:~-1!"=="," set compile_status_json=!compile_status_json:~0,-1!
if "!compile_status_json:~-1!"=="," (
set compile_status_json=!compile_status_json:~0,-1!
)

set compile_status_json=!compile_status_json!^!LF!^}

Expand Down
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,8 @@ def performEvaluation(issue_data, isJarMode = False) -> Result:
else:
command = f"{command} compileJava --project-dir {gradle_files_destination_path}"

min_prgrm_build_status = subprocess.run(command, cwd = specimin_path, shell=True, stderr=log_file_obj)
# Don't use gradle 9: CF doesn't give file path or line number for some reason
min_prgrm_build_status = subprocess.run(command, cwd = os.path.join("resources"), shell=True, stderr=log_file_obj)
print(f"{issue_id} Minimized program gradle build status = {min_prgrm_build_status.returncode}")
if min_prgrm_build_status.returncode == 0:
print(f"{issue_id} Minimized program gradle build successful. Expected: Fail")
Expand Down
Loading