All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Lucas Meneghel Rodrigues <mrodrigu@redhat.com>
Cc: kvm@vger.kernel.org
Subject: [PATCH KVM-AUTOTEST 1/2] Replace subprocess 'rm *.ppm' by equivalent Python code
Date: Wed, 12 Aug 2009 12:34:44 +0300	[thread overview]
Message-ID: <1250069685-17727-2-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1250069685-17727-1-git-send-email-avi@redhat.com>

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 client/tests/kvm/kvm_preprocessing.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py
index d118826..c3772a3 100644
--- a/client/tests/kvm/kvm_preprocessing.py
+++ b/client/tests/kvm/kvm_preprocessing.py
@@ -1,4 +1,4 @@
-import sys, os, time, commands, re, logging, signal
+import sys, os, time, commands, re, logging, signal, glob
 from autotest_lib.client.bin import test
 from autotest_lib.client.common_lib import error
 import kvm_vm, kvm_utils, kvm_subprocess
@@ -269,8 +269,8 @@ def postprocess(test, params, env):
     if params.get("keep_ppm_files") != "yes":
         logging.debug("'keep_ppm_files' not specified; removing all PPM files"
                       " from debug dir...")
-        rm_cmd = "rm -vf %s" % os.path.join(test.debugdir, "*.ppm")
-        kvm_subprocess.run_fg(rm_cmd, logging.debug, "(rm) ", timeout=5.0)
+        for f in glob.glob(os.path.join(test.debugdir, '*.ppm')):
+            os.unlink(f)
 
     # Execute any post_commands
     if params.get("post_command"):
-- 
1.6.3.3


  reply	other threads:[~2009-08-12  9:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-12  9:34 [PATCH KVM-AUTOTEST 0/2] Remove some external command callouts Avi Kivity
2009-08-12  9:34 ` Avi Kivity [this message]
2009-08-12  9:34 ` [PATCH KVM-AUTOTEST 2/2] Convert images to JPEG using PIL instead of an external program Avi Kivity
2009-08-12 12:44   ` Lucas Meneghel Rodrigues
2009-08-12 13:00     ` Avi Kivity
2009-08-12 13:26       ` Lucas Meneghel Rodrigues
2009-08-12 13:33         ` Avi Kivity
2009-08-12 15:01           ` Lucas Meneghel Rodrigues
2009-08-12 15:05             ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1250069685-17727-2-git-send-email-avi@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mrodrigu@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.