提交 c060f44c 编写于 作者: P Pavel Hrdina

tests.testutils: use virTestDifferenceFull in virtTestCompareToFile

Let's use the new virTestDifferenceFull function that will regenerate
the expected output and fail the test to let developer know that there
something was updated.
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
上级 781d70c0
......@@ -670,16 +670,12 @@ virtTestCompareToFile(const char *strcontent,
if (STRNEQ_NULLABLE(fixedcontent ? fixedcontent : strcontent,
filecontent)) {
if (virTestGetRegenerate()) {
if (virFileWriteStr(filename, strcontent, 0666) < 0)
goto failure;
goto out;
}
virtTestDifference(stderr, filecontent, strcontent);
virtTestDifferenceFull(stderr,
filecontent, filename,
strcontent, NULL);
goto failure;
}
out:
ret = 0;
failure:
VIR_FREE(fixedcontent);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册