代码拉取完成,页面将自动刷新
同步操作将从 Lyupa Anastasia/llvm-test-suite 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/python
import os
import sys
DBG_OUTPUT_FILE="Output/" + sys.argv[1] + ".dbg.ml"
OPT_DBG_OUTPUT_FILE="Output/" + sys.argv[1] + ".dbg.opt.ml"
NATIVE_DBG_OUTPUT_FILE="Output/" + sys.argv[1] + ".native.dbg.ml"
NATIVE_OPT_DBG_OUTPUT_FILE="Output/" + sys.argv[1] + ".native.dbg.opt.ml"
XFAIL_FILE=sys.argv[2] + "/lineinfo.xfail"
REPORT_FILE="Output/" + sys.argv[1] + ".dbg.missing_lines.report.txt"
def read_inputfile(filename, dict):
f = open(filename, "r")
lines = f.readlines()
for l in range(len(lines)):
columns = lines[l].split()
s = dict.get(columns[0])
if s is None:
s = set()
s.add(columns[1])
dict[columns[0]] = s
f.close()
return
dbg_lines = {}
read_inputfile(DBG_OUTPUT_FILE, dbg_lines)
dbg_opt_lines = {}
read_inputfile(OPT_DBG_OUTPUT_FILE, dbg_opt_lines)
native_dbg_lines = {}
read_inputfile(NATIVE_DBG_OUTPUT_FILE, native_dbg_lines)
native_dbg_opt_lines = {}
read_inputfile(NATIVE_OPT_DBG_OUTPUT_FILE, native_dbg_opt_lines)
xfailed_lines = {}
read_inputfile(XFAIL_FILE, xfailed_lines)
dbg_line_items = dbg_lines.items()
for fname, fset in dbg_line_items:
optset = dbg_opt_lines.get(fname)
nativeoptset = native_dbg_opt_lines.get(fname)
xfailedset = xfailed_lines.get(os.path.basename(fname))
if optset is not None:
src = open(fname, "r")
srclines = src.readlines()
src_output = open("Output/" + sys.argv[1] + ".lineinfo", "w")
for l in range(len(srclines)):
l1 = l + 1
l1s = str(l1)
if l1s in fset:
if l1s in optset:
if nativeoptset is not None and l1s in nativeoptset:
src_output.write(".|")
else:
src_output.write("+|")
else:
if nativeoptset is not None and l1s in nativeoptset:
if xfailedset is not None and l1s in xfailedset:
src_output.write(" |")
else:
src_output.write("x|")
else:
src_output.write("-|")
else:
src_output.write(" |")
src_output.write(srclines[l])
src.close()
src_output.close()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。