On IRC, someone complained that a system without xmllint installed
failed a number of tests.
* tests/schematestutils.sh: Probe for xmllint.
Signed-off-by: Eric Blake <eblake@redhat.com>
'make check' fails since commit 470d5c46 on any system with dash
as /bin/sh, because '<<<' is a bash extension. For example:
nwfilterschematest: 23: /home/eblake/libvirt/tests/schematestutils.sh: Syntax error: redirection unexpected
Also, there is no need to spawn a grep process when shell globbing
can do the same.
* tests/schematestutils.sh: Replace bashism and subprocess with a
faster and portable construct.
Signed-off-by: Eric Blake <eblake@redhat.com>
Currently, using an invalid XML in tests fails, because
the schema test expects all of them to be valid.
Treat files with -invalid.xml suffix as invalid and expect
them to fail validation.
Commit 6fdbce12 attempted to sort the list of tests, but failed
(without quotes, echo merges all the tests into a single line,
so there was nothing to sort).
* tests/schematestutils.sh: Fix thinko in previous patch.
Having a test that depends on file system timestamps and/or inode
allocation order gives non-deterministic output.
* tests/schematestutils.sh: Run test in deterministic order.
* tests/test-lib.sh: "echo -n" is not portable. Use printf instead.
Remove unnecessary uses of "eval-in-subshell" (subshell is sufficient).
Remove uses of tests' -a operator; it is not portable.
Instead, use "test cond && test cond2".
* tests/schematestutils.sh: Replace use of test's -a.
Only print out '.' for each test case, full test output can be
re-enabled with VIR_TEST_VERBOSE=1, or VIR_TEST_DEBUG=XXXX
Sample output now looks like
TEST: statstest
........................................ 40
................................... 75 OK
PASS: statstest
TEST: qparamtest
................................ 32 OK
PASS: qparamtest
TEST:
............ 12 OK