summaryrefslogtreecommitdiff
path: root/tests/virsh-output
blob: aa2d386c397b40579735458088676b7524ed5ac0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

. "$(dirname $0)/test-lib.sh"

test_expensive

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