Add 'make extra-tests' rule and run extra tests.
[libguestfs.git] / run.in
diff --git a/run.in b/run.in
index d7b91d4..7cef715 100755 (executable)
--- a/run.in
+++ b/run.in
@@ -14,7 +14,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 #----------------------------------------------------------------------
 
@@ -37,9 +37,19 @@ b=@abs_builddir@
 export TMPDIR="$b"
 
 # Set local environment relative to this script.
-export LD_LIBRARY_PATH="$b/src/.libs"
-export LIBGUESTFS_PATH="$b/appliance"
-export PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch"
+if [ -z "$LD_LIBRARY_PATH" ]; then
+  LD_LIBRARY_PATH="$b/src/.libs"
+else
+  LD_LIBRARY_PATH="$b/src/.libs:$LD_LIBRARY_PATH"
+fi
+if [ -z "$PERL5LIB" ]; then
+  PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch"
+else
+  PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch:$PERL5LIB"
+fi
+LIBGUESTFS_PATH="$b/appliance"
+
+export LD_LIBRARY_PATH PERL5LIB LIBGUESTFS_PATH
 
 # Do we have libtool?  If we have it then we can use it to make
 # running valgrind simpler.  However don't depend on it.