testing: Suppress errors when checking for running hosts
authorTobias Brunner <tobias@strongswan.org>
Mon, 3 Aug 2015 10:54:09 +0000 (12:54 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 3 Aug 2015 10:54:09 +0000 (12:54 +0200)
If libvirt is not running virsh can't connect to it and will complain that
the socket does not exist.

testing/scripts/function.sh

index 2dd465c..bab2f74 100755 (executable)
@@ -163,7 +163,7 @@ running_any()
        command -v virsh >/dev/null || return 1
        for host in $*
        do
-               virsh list --name | grep "^$host$" >/dev/null && return 0
+               virsh list --name 2>/dev/null | grep "^$host$" >/dev/null && return 0
        done
        return 1
 }