mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
tests: fix rhbz1044014 to use proper paths
Test fails as it cannot find .in file. Turns out $srcdir=. (which is ./tests) and and not ./tests/regressions as supposed in script. Same apply to $abs_srcdir. Also put .out file in ./tests/regressions too. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@openvz.org>
This commit is contained in:
committed by
Richard W.M. Jones
parent
3115726aca
commit
5552ef1c46
@@ -27,36 +27,37 @@ skip_unless_backend libvirt
|
||||
skip_unless_libvirt_minimum_version 1 2 1
|
||||
|
||||
# Set the backend to the test driver.
|
||||
export LIBGUESTFS_BACKEND="libvirt:test://$abs_srcdir/rhbz1044014.xml"
|
||||
export LIBGUESTFS_BACKEND="libvirt:test://$abs_srcdir/regressions/rhbz1044014.xml"
|
||||
|
||||
rm -f rhbz1044014.out
|
||||
dir=$srcdir/regressions
|
||||
rm -f $dir/rhbz1044014.out
|
||||
|
||||
guestfish -- -run < $srcdir/rhbz1044014.in > rhbz1044014.out 2>&1 || {
|
||||
guestfish -- -run < $dir/rhbz1044014.in > $dir/rhbz1044014.out 2>&1 || {
|
||||
r=$?
|
||||
if [ $r -ne 0 ]; then
|
||||
cat rhbz1044014.out
|
||||
cat $dir/rhbz1044014.out
|
||||
exit $r
|
||||
fi
|
||||
}
|
||||
|
||||
# We are expecting this message to be printed (see commit which fixed
|
||||
# RHBZ#1044014).
|
||||
grep "libvirt needs authentication to connect to libvirt URI" rhbz1044014.out || {
|
||||
grep "libvirt needs authentication to connect to libvirt URI" $dir/rhbz1044014.out || {
|
||||
echo "$0: expecting to see message from commit which fixed RHBZ#1044014"
|
||||
echo
|
||||
echo "actual output was:"
|
||||
echo
|
||||
cat rhbz1044014.out
|
||||
cat $dir/rhbz1044014.out
|
||||
exit 1
|
||||
}
|
||||
|
||||
# This is the error we are expecting to see. If we see it then it
|
||||
# indicates that authentication was successful.
|
||||
grep "error: libvirt hypervisor doesn’t support qemu or KVM" rhbz1044014.out || {
|
||||
grep "error: libvirt hypervisor doesn’t support qemu or KVM" $dir/rhbz1044014.out || {
|
||||
echo "$0: unexpected output:"
|
||||
echo
|
||||
cat rhbz1044014.out
|
||||
cat $dir/rhbz1044014.out
|
||||
exit 1
|
||||
}
|
||||
|
||||
rm rhbz1044014.out
|
||||
rm $dir/rhbz1044014.out
|
||||
|
||||
Reference in New Issue
Block a user