提交 537698b6 编写于 作者: G Garret Rieger 提交者: Behdad Esfahbod

[subset] Don't compare actual to itself in Fix test/subset/run-tests. Print a diff on failure.

上级 4f6f7c3b
......@@ -6,6 +6,7 @@
from __future__ import print_function
import io
from difflib import unified_diff
import os
import re
import subprocess
......@@ -59,9 +60,12 @@ def run_test(test):
return fail_test(test, cli_args, "ttx (actual) returned %d" % (return_code))
expected_ttx = strip_check_sum (expected_ttx)
actual_ttx = strip_check_sum (expected_ttx)
actual_ttx = strip_check_sum (actual_ttx)
if not actual_ttx == expected_ttx:
for line in unified_diff(expected_ttx.splitlines(1), actual_ttx.splitlines(1)):
sys.stdout.write(line)
sys.stdout.flush()
return fail_test(test, cli_args, 'ttx for expected and actual does not match.')
return 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册