Optimize invocation of the tests to share one 'virsh' binary as they don't influence each other. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- tests/virshtest.c | 11 +---------- tests/virshtestdata/echo-split.in | 5 +++++ tests/virshtestdata/echo-split.out | 24 ++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 tests/virshtestdata/echo-split.in create mode 100644 tests/virshtestdata/echo-split.out diff --git a/tests/virshtest.c b/tests/virshtest.c index 376fb861ed..51314859b9 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -682,16 +682,7 @@ mymain(void) DO_TEST(47, "a\n", "\\# ignored;echo a\n'#also' ignored"); /* test of splitting in vshStringToArray */ - DO_TEST(48, "a\nb,c,\nd,,e,,\nf,,,e\n", - "-q", "echo", "--split", "a,b,,c,,,d,,,,e,,,,,f,,,,,,e"); - DO_TEST(49, "\na\nb,c,\nd,,e,,\nf,,,e\n\n", - "-q", "echo", "--split", ",a,b,,c,,,d,,,,e,,,,,f,,,,,,e,"); - DO_TEST(50, ",a\nb,c,\nd,,e,,\nf,,,e,\n", - "-q", "echo", "--split", ",,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,"); - DO_TEST(51, ",\na\nb,c,\nd,,e,,\nf,,,e,\n\n", - "-q", "echo", "--split", ",,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,,"); - DO_TEST(52, ",,a\nb,c,\nd,,e,,\nf,,,e,,\n", - "-q", "echo", "--split", ",,,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,,,"); + DO_TEST_SCRIPT("echo-split", NULL, VIRSH_DEFAULT, "-q"); # undef DO_TEST VIR_FREE(custom_uri); diff --git a/tests/virshtestdata/echo-split.in b/tests/virshtestdata/echo-split.in new file mode 100644 index 0000000000..2df9f4da97 --- /dev/null +++ b/tests/virshtestdata/echo-split.in @@ -0,0 +1,5 @@ +echo --split a,b,,c,,,d,,,,e,,,,,f,,,,,,e +echo --split ,a,b,,c,,,d,,,,e,,,,,f,,,,,,e, +echo --split ,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,, +echo --split ,,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,, +echo --split ,,,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,,, diff --git a/tests/virshtestdata/echo-split.out b/tests/virshtestdata/echo-split.out new file mode 100644 index 0000000000..88bf09c225 --- /dev/null +++ b/tests/virshtestdata/echo-split.out @@ -0,0 +1,24 @@ +a +b,c, +d,,e,, +f,,,e + +a +b,c, +d,,e,, +f,,,e + +,a +b,c, +d,,e,, +f,,,e, +, +a +b,c, +d,,e,, +f,,,e, + +,,a +b,c, +d,,e,, +f,,,e,, -- 2.44.0 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx