diff mbox

[KVM-AUTOTEST,02/06] kvm_runtest_2.py: Use env filename specified by the 'env' parameter

Message ID 1244507691-9575-2-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues June 9, 2009, 12:34 a.m. UTC
Do not use hardcoded environment filename 'env'. Instead use the value
specified by the 'env' parameter. If unspecified, use 'env' as the
filename.

This is important for parallel execution; it may be necessary to use a
separate
environment file for each process.

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
---
 client/tests/kvm/kvm.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Lucas Meneghel Rodrigues June 10, 2009, 7:29 p.m. UTC | #1
On Mon, 2009-06-08 at 21:34 -0300, Lucas Meneghel Rodrigues wrote:
> Do not use hardcoded environment filename 'env'. Instead use the value
> specified by the 'env' parameter. If unspecified, use 'env' as the
> filename.
> 
> This is important for parallel execution; it may be necessary to use a
> separate
> environment file for each process.

Applied, thanks!

> Signed-off-by: Michael Goldish <mgoldish@redhat.com>
> ---
>  client/tests/kvm/kvm.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/client/tests/kvm/kvm.py b/client/tests/kvm/kvm.py
> index a658425..9428162 100644
> --- a/client/tests/kvm/kvm.py
> +++ b/client/tests/kvm/kvm.py
> @@ -82,7 +82,7 @@ class kvm(test.test):
>              self.write_test_keyval({key: params[key]})
>  
>          # Open the environment file
> -        env_filename = os.path.join(self.bindir, "env")
> +        env_filename = os.path.join(self.bindir, params.get("env", "env"))
>          env = load_env(env_filename, {})
>          logging.debug("Contents of environment: %s" % str(env))
>
diff mbox

Patch

diff --git a/client/tests/kvm/kvm.py b/client/tests/kvm/kvm.py
index a658425..9428162 100644
--- a/client/tests/kvm/kvm.py
+++ b/client/tests/kvm/kvm.py
@@ -82,7 +82,7 @@  class kvm(test.test):
             self.write_test_keyval({key: params[key]})
 
         # Open the environment file
-        env_filename = os.path.join(self.bindir, "env")
+        env_filename = os.path.join(self.bindir, params.get("env", "env"))
         env = load_env(env_filename, {})
         logging.debug("Contents of environment: %s" % str(env))