mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xl: allow check-xl-disk-parse to run against installed xl as well as build dir
I can't run from the current directory since my build box isn't running Xen so if ./xl doesn't exist use the installed version on the assumption that I've copied the script to a test host. I think running from the build dir needs the blktap2 libraries, so update LD_LIBRARY_PATH as appropriate. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
This commit is contained in:
1 parent
93e240f096
commit
5631ee13f8
1 file changed
+8
-2
@@ -2,6 +2,13 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [ -x ./xl ] ; then
|
||||
export LD_LIBRARY_PATH=.:../libxc:../xenstore:../blktap2/control
|
||||
XL=./xl
|
||||
else
|
||||
XL=xl
|
||||
fi
|
||||
|
||||
fprefix=tmp.check-xl-disk-parse
|
||||
|
||||
expected () {
|
||||
@@ -14,8 +21,7 @@ one () {
|
||||
expected_rc=$1; shift
|
||||
printf "test case %s...\n" "$*"
|
||||
set +e
|
||||
LD_LIBRARY_PATH=.:../libxc:../xenstore \
|
||||
./xl -N block-attach 0 "$@" </dev/null >$fprefix.actual 2>/dev/null
|
||||
${XL} -N block-attach 0 "$@" </dev/null >$fprefix.actual 2>/dev/null
|
||||
actual_rc=$?
|
||||
diff -u $fprefix.expected $fprefix.actual
|
||||
diff_rc=$?
|
||||
|
||||