If the user set PYTHON when configuring, this variable is not passed
through to the tests, so it is possible the tests will fail because
they are testing the wrong version of python. By passing $PYTHON
through to the tests we ensure that we test against the same version
of python that we configured with.
(cherry picked from commit
e2249b7ce1dd0a2f8f110e0e47aca397185a6373)
# libguestfs Python bindings
-# Copyright (C) 2009 Red Hat Inc.
+# Copyright (C) 2009-2011 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
TESTS_ENVIRONMENT = \
LIBGUESTFS_PATH=$(top_builddir)/appliance \
PYTHONPATH=$(builddir):$(builddir)/.libs \
- TMPDIR=$(top_builddir)
+ TMPDIR=$(top_builddir) \
+ PYTHON=$(PYTHON)
TESTS = run-bindtests run-python-tests
#!/bin/sh -
# libguestfs Perl bindings
-# Copyright (C) 2009 Red Hat Inc.
+# Copyright (C) 2009-2011 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
set -e
-python bindtests.py > bindtests.tmp
+$PYTHON bindtests.py > bindtests.tmp
diff -u ../bindtests bindtests.tmp
#!/bin/sh -
# libguestfs Perl bindings
-# Copyright (C) 2009 Red Hat Inc.
+# Copyright (C) 2009-2011 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
set -e
for f in t/*.py; do
- python $f
+ $PYTHON $f
done