Commit fc96c623 authored by Yuan Zhixiang's avatar Yuan Zhixiang
Browse files

合并 有/无 用例的情况

parent 556c898a
......@@ -82,20 +82,8 @@ if gcc_retcode == 0:
# print >> sys.stderr, '==='
if input_data is None:
# 无用例输入
# 使用Valgrind运行编译后的代码
VALGRIND_EXE = os.path.join(DN, 'valgrind-3.11.0/inst/bin/valgrind')
valgrind_p = Popen(['stdbuf', '-o0', # 确保stdout不会被缓冲,以便正确追踪
VALGRIND_EXE,
'--tool=memcheck',
'--source-filename=' + FN,
'--trace-filename=' + VGTRACE_PATH,
EXE_PATH],
stdout=PIPE, stderr=PIPE)
(valgrind_stdout, valgrind_stderr) = valgrind_p.communicate()
valgrind_retcode = valgrind_p.returncode
else:
# 有用例输入
input_data = ''
# 使用Valgrind运行编译后的代码
VALGRIND_EXE = os.path.join(DN, 'valgrind-3.11.0/inst/bin/valgrind')
valgrind_p = Popen(['stdbuf', '-o0', # 确保stdout不会被缓冲,以便正确追踪
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment