mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
virshtest: Drop support for testing against hardcoded strings
Now that all tests were converted, this is no longer needed. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
cf0d80344e
commit
52fc03ef21
@ -36,7 +36,6 @@ static void testFilterLine(char *buffer,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
testCompareOutputLit(const char *expectFile,
|
testCompareOutputLit(const char *expectFile,
|
||||||
const char *expectData,
|
|
||||||
const char *filter,
|
const char *filter,
|
||||||
const char *const argv[])
|
const char *const argv[])
|
||||||
{
|
{
|
||||||
@ -64,15 +63,8 @@ testCompareOutputLit(const char *expectFile,
|
|||||||
if (filter)
|
if (filter)
|
||||||
testFilterLine(actual, filter);
|
testFilterLine(actual, filter);
|
||||||
|
|
||||||
if (expectData) {
|
if (virTestCompareToFileFull(actual, expectFile, false) < 0)
|
||||||
if (virTestCompareToString(expectData, actual) < 0)
|
return -1;
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (expectFile) {
|
|
||||||
if (virTestCompareToFileFull(actual, expectFile, false) < 0)
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -103,7 +95,7 @@ static int testCompare(const void *data)
|
|||||||
abs_srcdir, info->testname);
|
abs_srcdir, info->testname);
|
||||||
}
|
}
|
||||||
|
|
||||||
return testCompareOutputLit(outfile, NULL, info->filter, info->argv);
|
return testCompareOutputLit(outfile, info->filter, info->argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user