mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 19:45:21 +00:00
ed46c9921f
The test uses a script and compares the output against a template file. VIR_TEST_REGENREATE_OUTPUT can be used on test failures. This test will be marked as expensive once the refactors it guards are done. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
28 lines
519 B
Bash
Executable File
28 lines
519 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. "$(dirname $0)/test-lib.sh"
|
|
|
|
if [ ! -x /bin/bash ]; then
|
|
echo skipping test - no bash
|
|
exit 77
|
|
fi
|
|
|
|
mock_xdg_ || framework_failure
|
|
|
|
export LIBVIRT_DEFAULT_URI='test:///default'
|
|
ln -s $abs_top_builddir/tools/virsh virsh
|
|
|
|
$abs_top_srcdir/tests/virsh-output-commands > out 2>&1
|
|
|
|
echo end >> out
|
|
|
|
if compare $abs_top_srcdir/tests/virsh-output.out out; then
|
|
exit 0
|
|
else
|
|
if [ "x$VIR_TEST_REGENERATE_OUTPUT" = "x1" ]; then
|
|
cp out $abs_top_srcdir/tests/virsh-output.out
|
|
fi
|
|
|
|
exit 1
|
|
fi
|