From patchwork Wed Aug 12 09:34:44 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 40827 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7C9YpF6002425 for ; Wed, 12 Aug 2009 09:34:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755100AbZHLJes (ORCPT ); Wed, 12 Aug 2009 05:34:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755197AbZHLJer (ORCPT ); Wed, 12 Aug 2009 05:34:47 -0400 Received: from mx2.redhat.com ([66.187.237.31]:40654 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754359AbZHLJer (ORCPT ); Wed, 12 Aug 2009 05:34:47 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7C9Ymlr028540 for ; Wed, 12 Aug 2009 05:34:48 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7C9YlF4025519; Wed, 12 Aug 2009 05:34:47 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7C9YkSS022891; Wed, 12 Aug 2009 05:34:46 -0400 Received: from localhost.localdomain (cleopatra.tlv.redhat.com [10.35.255.11]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id E0348250AD7; Wed, 12 Aug 2009 12:34:45 +0300 (IDT) From: Avi Kivity To: Lucas Meneghel Rodrigues 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 Message-Id: <1250069685-17727-2-git-send-email-avi@redhat.com> In-Reply-To: <1250069685-17727-1-git-send-email-avi@redhat.com> References: <1250069685-17727-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Signed-off-by: Avi Kivity --- 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"):