Skip to content

Commit 472d8d8

Browse files
committed
script: fix submission format
1 parent 4ff12b2 commit 472d8d8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/submit.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import os
1717
import sys
1818
import json
19+
import llvm_helper
1920

2021
method_name = os.environ["LAB_METHOD_NAME"]
2122
method_url = os.environ["LAB_METHOD_URL"]
@@ -28,13 +29,22 @@
2829
fixes = []
2930
with_hint = False
3031
for file in os.listdir(fix_dir):
32+
with open(os.path.join(llvm_helper.dataset_dir, file)) as info:
33+
info = json.load(info)
34+
if not info.get("verified", False):
35+
continue
36+
bug_id = info["bug_id"]
37+
bug_type = info["bug_type"]
38+
3139
with open(os.path.join(fix_dir, file)) as fix_file:
3240
cert = json.load(fix_file)
3341
if "knowledge" in cert:
3442
for k, v in cert["knowledge"]:
3543
if k.startswith("hint"):
3644
with_hint = True
3745
break
46+
cert["bug_id"] = bug_id
47+
cert["bug_type"] = bug_type
3848
fixes.append(cert)
3949
json.dump(
4050
{

0 commit comments

Comments
 (0)