diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-08-08 12:41:54 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-08-08 12:41:54 +0100 |
commit | f7d18c84dde596699ffc5100fec2cf7b0d582450 (patch) | |
tree | 0f1a43165ed98b3d53dc8081bd6a9d456ab2d539 | |
parent | 54ea124b160eda705c96dfc664b4056848887856 (diff) | |
download | libguestfs-f7d18c84dde596699ffc5100fec2cf7b0d582450.tar.gz libguestfs-f7d18c84dde596699ffc5100fec2cf7b0d582450.tar.xz libguestfs-f7d18c84dde596699ffc5100fec2cf7b0d582450.zip |
build: Set TMPDIR for local testing.
This avoids conflicts with the globally installed libguestfs
appliance, or lets us build in multiple local directories at the same
time without conflicts.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | capitests/Makefile.am | 1 | ||||
-rw-r--r-- | cat/Makefile.am | 3 | ||||
-rw-r--r-- | caution/Makefile.am | 3 | ||||
-rw-r--r-- | df/Makefile.am | 3 | ||||
-rw-r--r-- | edit/Makefile.am | 3 | ||||
-rwxr-xr-x | fuse/test-fuse.sh | 4 | ||||
-rw-r--r-- | haskell/Makefile.am | 1 | ||||
-rw-r--r-- | images/Makefile.am | 20 | ||||
-rw-r--r-- | java/Makefile.am | 3 | ||||
-rw-r--r-- | ocaml/Makefile.am | 1 | ||||
-rw-r--r-- | perl/Makefile.am | 3 | ||||
-rw-r--r-- | python/Makefile.am | 3 | ||||
-rw-r--r-- | regressions/Makefile.am | 1 | ||||
-rw-r--r-- | resize/Makefile.am | 3 | ||||
-rw-r--r-- | ruby/Makefile.am | 3 | ||||
-rwxr-xr-x | run | 4 | ||||
-rw-r--r-- | tools/Makefile.am | 1 |
18 files changed, 44 insertions, 17 deletions
@@ -338,3 +338,4 @@ tools/virt-*.pl /build-aux /gnulib .git-module-status +.guestfs-* diff --git a/capitests/Makefile.am b/capitests/Makefile.am index 7e35872e..9802a06a 100644 --- a/capitests/Makefile.am +++ b/capitests/Makefile.am @@ -57,6 +57,7 @@ TESTS_ENVIRONMENT = \ SKIP_TEST_COMMAND=$(shell ldd test-command | grep -sq 'not a dynamic executable' || echo 1) \ SKIP_TEST_COMMAND_LINES=$(shell ldd test-command | grep -sq 'not a dynamic executable' || echo 1) \ LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) \ $(VG) #SKIP_TEST_CHECKSUM_8=$(shell if test `find ../initramfs -name squashfs.ko | wc -l` -eq 0; then echo 1; fi) diff --git a/cat/Makefile.am b/cat/Makefile.am index bf1d57ca..6022cd69 100644 --- a/cat/Makefile.am +++ b/cat/Makefile.am @@ -133,6 +133,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) TESTS = test-virt-cat.sh test-virt-filesystems.sh test-virt-ls.sh diff --git a/caution/Makefile.am b/caution/Makefile.am index f87884f4..5b31d805 100644 --- a/caution/Makefile.am +++ b/caution/Makefile.am @@ -30,7 +30,8 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) EXTRA_DIST = \ $(TESTS) diff --git a/df/Makefile.am b/df/Makefile.am index 17117985..88e32af7 100644 --- a/df/Makefile.am +++ b/df/Makefile.am @@ -79,6 +79,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) TESTS = test-virt-df.sh diff --git a/edit/Makefile.am b/edit/Makefile.am index 62b5376a..e33b33c0 100644 --- a/edit/Makefile.am +++ b/edit/Makefile.am @@ -71,6 +71,7 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) TESTS = test-virt-edit.sh diff --git a/fuse/test-fuse.sh b/fuse/test-fuse.sh index 0a429f73..cfa277aa 100755 --- a/fuse/test-fuse.sh +++ b/fuse/test-fuse.sh @@ -31,6 +31,10 @@ nr_stages=$(grep "^stage " $0 | wc -l) # and move to that directory for the initial phase of the script. top_builddir=$(cd "$top_builddir" > /dev/null; pwd) +# Set TMPDIR so the appliance doesn't conflict with globally +# installed libguestfs. +export TMPDIR=$top_builddir + # Set libguestfs up for running locally. export LIBGUESTFS_PATH="$top_builddir/appliance" diff --git a/haskell/Makefile.am b/haskell/Makefile.am index 4406712f..d8a06f3b 100644 --- a/haskell/Makefile.am +++ b/haskell/Makefile.am @@ -30,6 +30,7 @@ if HAVE_HASKELL TESTS_ENVIRONMENT = \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) \ $(VG) TESTS = run-bindtests Guestfs005Load Guestfs010Basic diff --git a/images/Makefile.am b/images/Makefile.am index 622d2881..68eb5506 100644 --- a/images/Makefile.am +++ b/images/Makefile.am @@ -173,8 +173,9 @@ $(builddir)/test-grep.txt.gz: test-grep.txt fedora.img: guest-aux/make-fedora-img.sh \ guest-aux/fedora-name.db \ guest-aux/fedora-packages.db - LIBGUESTFS_PATH=../appliance \ - LD_LIBRARY_PATH=../src/.libs \ + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ + TMPDIR=$(top_builddir) \ bash $< guest-aux/fedora-name.db: guest-aux/fedora-name.db.txt @@ -189,21 +190,24 @@ guest-aux/fedora-packages.db: guest-aux/fedora-packages.db.txt # Make a (dummy) Debian image. debian.img: guest-aux/make-debian-img.sh - LIBGUESTFS_PATH=../appliance \ - LD_LIBRARY_PATH=../src/.libs \ + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ + TMPDIR=$(top_builddir) \ bash $< # Make a (dummy) Ubuntu image. ubuntu.img: guest-aux/make-ubuntu-img.sh - LIBGUESTFS_PATH=../appliance \ - LD_LIBRARY_PATH=../src/.libs \ + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ + TMPDIR=$(top_builddir) \ bash $< # Make a (dummy) Windows image. windows.img: guest-aux/make-windows-img.sh \ guest-aux/windows-software guest-aux/windows-system - LIBGUESTFS_PATH=../appliance \ - LD_LIBRARY_PATH=../src/.libs \ + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ + TMPDIR=$(top_builddir) \ bash $< # Since users might not have the tools needed to create this, we diff --git a/java/Makefile.am b/java/Makefile.am index fe55ec25..6f2af115 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -106,7 +106,8 @@ TESTS = run-bindtests run-java-tests TESTS_ENVIRONMENT = \ JAVA=$(JAVA) \ CLASSPATH=.:t:libguestfs-$(VERSION).jar \ - LIBGUESTFS_PATH=$(top_builddir)/appliance + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) noinst_DATA = Bindtests.class $(java_tests:.java=.class) diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index 252a3370..5813f84b 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -70,6 +70,7 @@ endif TESTS_ENVIRONMENT = \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) \ $(VG) TESTS = run-bindtests \ diff --git a/perl/Makefile.am b/perl/Makefile.am index c1922900..d8167d19 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -54,7 +54,8 @@ $(TESTS): src_deps all appliance test_images TESTS_ENVIRONMENT = \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) INSTALLDIRS = site diff --git a/python/Makefile.am b/python/Makefile.am index e9959274..58847625 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -47,7 +47,8 @@ libguestfsmod_la_LDFLAGS = -avoid-version TESTS_ENVIRONMENT = \ LIBGUESTFS_PATH=$(top_builddir)/appliance \ - PYTHONPATH=$(builddir):$(builddir)/.libs + PYTHONPATH=$(builddir):$(builddir)/.libs \ + TMPDIR=$(top_builddir) TESTS = run-bindtests run-python-tests diff --git a/regressions/Makefile.am b/regressions/Makefile.am index 726fb76b..c00a615f 100644 --- a/regressions/Makefile.am +++ b/regressions/Makefile.am @@ -72,6 +72,7 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) \ PERL5LIB=$(top_builddir)/perl/blib/lib:$(top_builddir)/perl/blib/arch \ NOEXEC_CHECK="$(top_builddir)/src/.libs/libguestfs.so $(top_builddir)/daemon/guestfsd" diff --git a/resize/Makefile.am b/resize/Makefile.am index 8418cb47..fd7f71a8 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -83,7 +83,8 @@ random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) TESTS = test-virt-resize.sh diff --git a/ruby/Makefile.am b/ruby/Makefile.am index 7ef27eb1..a2e962d9 100644 --- a/ruby/Makefile.am +++ b/ruby/Makefile.am @@ -48,7 +48,8 @@ TESTS = run-bindtests run-ruby-tests TESTS_ENVIRONMENT = \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ - LIBGUESTFS_PATH=$(top_builddir)/appliance + LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) all: $(generator_built) rake build @@ -33,6 +33,10 @@ run=$(readlink -f "$0") b=$(dirname "$run") +# Set TMPDIR so the appliance doesn't conflict with globally +# installed libguestfs. +export TMPDIR=$b + # Set local environment relative to this script. export LD_LIBRARY_PATH="$b/src/.libs" export LIBGUESTFS_PATH="$b/appliance" diff --git a/tools/Makefile.am b/tools/Makefile.am index 7904f1cd..6059d351 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -61,6 +61,7 @@ TESTS_ENVIRONMENT = \ MALLOC_PERTURB_=$(random_val) \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ LIBGUESTFS_PATH=$(top_builddir)/appliance \ + TMPDIR=$(top_builddir) \ PERL5LIB=$(top_builddir)/perl/blib/lib:$(top_builddir)/perl/blib/arch TESTS = test-virt-list-filesystems.sh \ |