diff --git a/main.py b/main.py index 672df30..bda5d83 100644 --- a/main.py +++ b/main.py @@ -407,7 +407,8 @@ def performEvaluation(issue_data) -> Result: result = run_specimin(issue_id ,specimin_command, specimin_path) print(f"{result.name} - {result.status}") - if not ("bug_type" in issue_data and issue_data["bug_type"]): + if result.status.lower() == "fail": + result.set_preservation_status("Minimization did not succeed.") return result build_system = issue_data.get("build_system", "gradle") diff --git a/resources/test_data.json b/resources/test_data.json index f55d933..57e3c7d 100644 --- a/resources/test_data.json +++ b/resources/test_data.json @@ -228,8 +228,18 @@ "cf_version": "1.9.11", "java_version": "8", "note": "java.util.stream -> com.example.stream", - "bug_type": "", - "checker_qual_required": false + "bug_type": "error", + "bug_pattern": { + "file_pattern": "Compilation unit: (.*)", + "error_pattern": "error: (Incomparable types)", + "exception_pattern": "Exception: (.+);", + "stack_trace_pattern": "Stack trace: (.+)" + }, + "build_system": "shell", + "build_flags": ["-processor", "nullness", "-AprintErrorStack"], + "build_targets": "src/**/*.java", + "cf_release_url": "https://github.com/typetools/checker-framework/releases/download", + "checker_qual_required": true }, { "issue_id" : "cf-3032", @@ -250,7 +260,14 @@ "cf_version": "3.1.0", "java_version": "11", "note": "", - "bug_type": "", + "bug_type": "error", + "bug_pattern": { + "file_pattern": "(\\w+\\.java)", + "error_pattern": "error: \\[(.+?)\\]", + "source_pattern": "(.via\\(.*\\)\\);)", + "found_pattern": "found : (.*)", + "required_pattern": "required: (.*)" + }, "checker_qual_required": false }, { @@ -390,7 +407,7 @@ "exception_pattern": "Exception: (.+);", "stack_trace_pattern": "Stack trace: (.+)" }, - "checker_qual_required": false, + "checker_qual_required": true, "build_system": "shell", "build_flags": ["-processor", "formatter", "-AprintErrorStack"], "build_targets": "src/**/*.java",