aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/check-xl-disk-parse
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-10-07 11:05:47 +0100
committerIan Campbell <ian.campbell@citrix.com>2011-10-07 11:05:47 +0100
commit5631ee13f8a3c27f73019fc96b80e9a4f5a87a7d (patch)
tree20b0c5c0b8cefbc7df5f5ce6e49ffbbeee5c4af4 /tools/libxl/check-xl-disk-parse
parent93e240f0966324dee6b02d249f3e3a9e5ecf9d19 (diff)
downloadxen-5631ee13f8a3c27f73019fc96b80e9a4f5a87a7d.tar.gz
xen-5631ee13f8a3c27f73019fc96b80e9a4f5a87a7d.tar.bz2
xen-5631ee13f8a3c27f73019fc96b80e9a4f5a87a7d.zip
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>
Diffstat (limited to 'tools/libxl/check-xl-disk-parse')
-rwxr-xr-xtools/libxl/check-xl-disk-parse10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/libxl/check-xl-disk-parse b/tools/libxl/check-xl-disk-parse
index 729926cf62..fec86bee15 100755
--- a/tools/libxl/check-xl-disk-parse
+++ b/tools/libxl/check-xl-disk-parse
@@ -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=$?