From patchwork Mon Jan 24 04:22:20 2011
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Lucas Meneghel Rodrigues
X-Patchwork-Id: 499961
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0O4MemE000969
for ;
Mon, 24 Jan 2011 04:22:40 GMT
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1751716Ab1AXEWc (ORCPT
);
Sun, 23 Jan 2011 23:22:32 -0500
Received: from mx1.redhat.com ([209.132.183.28]:6353 "EHLO mx1.redhat.com"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S1751346Ab1AXEWb (ORCPT );
Sun, 23 Jan 2011 23:22:31 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0O4MTtP017882
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
Sun, 23 Jan 2011 23:22:30 -0500
Received: from freedom.redhat.com (vpn-11-93.rdu.redhat.com [10.11.11.93])
by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with
ESMTP id p0O4MMua018179; Sun, 23 Jan 2011 23:22:28 -0500
From: Lucas Meneghel Rodrigues
To: autotest@test.kernel.org
Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues
Subject: [PATCH 2/3] KVM test: Infrastructure cleanups
Date: Mon, 24 Jan 2011 02:22:20 -0200
Message-Id: <1295842941-11557-3-git-send-email-lmr@redhat.com>
In-Reply-To: <1295842941-11557-1-git-send-email-lmr@redhat.com>
References: <1295842941-11557-1-git-send-email-lmr@redhat.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Sender: kvm-owner@vger.kernel.org
Precedence: bulk
List-ID:
X-Mailing-List: kvm@vger.kernel.org
X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by
milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]);
Mon, 24 Jan 2011 04:22:40 +0000 (UTC)
diff --git a/client/tests/kvm/cd_hash.py b/client/tests/kvm/cd_hash.py
index bcd14dc..04f8cbe 100755
--- a/client/tests/kvm/cd_hash.py
+++ b/client/tests/kvm/cd_hash.py
@@ -8,7 +8,7 @@ Program that calculates several hashes for a given CD image.
import os, sys, optparse, logging
import common
import kvm_utils
-from autotest_lib.client.common_lib import logging_config, logging_manager
+from autotest_lib.client.common_lib import logging_manager
from autotest_lib.client.bin import utils
diff --git a/client/tests/kvm/get_started.py b/client/tests/kvm/get_started.py
index 126d8a7..5ce7349 100755
--- a/client/tests/kvm/get_started.py
+++ b/client/tests/kvm/get_started.py
@@ -5,10 +5,10 @@ Program to help setup kvm test environment
@copyright: Red Hat 2010
"""
-import os, sys, optparse, logging, shutil
+import os, sys, logging, shutil
import common, kvm_utils
from autotest_lib.client.common_lib import logging_manager
-from autotest_lib.client.bin import utils, os_dep
+from autotest_lib.client.bin import utils
def check_iso(url, destination, hash):
diff --git a/client/tests/kvm/html_report.py b/client/tests/kvm/html_report.py
index ebc9c12..8b4b109 100755
--- a/client/tests/kvm/html_report.py
+++ b/client/tests/kvm/html_report.py
@@ -11,7 +11,7 @@ import os, sys, re, getopt, time, datetime, commands
import common
-format_css="""
+format_css = """
html,body {
padding:0;
color:#222;
@@ -180,7 +180,7 @@ font-size: 13px;}
"""
-table_js="""
+table_js = """
/**
* Copyright (c)2005-2007 Matt Kruse (javascripttoolbox.com)
*
@@ -1380,11 +1380,11 @@ function processList(ul) {
## input and create a single html formatted result page. ##
#################################################################
-stimelist=[]
+stimelist = []
def make_html_file(metadata, results, tag, host, output_file_name, dirname):
- html_prefix="""
+ html_prefix = """
@@ -1405,7 +1405,7 @@ return true;
-"""%(format_css, table_js, maketree_js)
+""" % (format_css, table_js, maketree_js)
if output_file_name:
@@ -1427,13 +1427,13 @@ return true;
total_failed = 0
total_passed = 0
for res in results:
- total_executed+=1
+ total_executed += 1
if res['status'] == 'GOOD':
- total_passed+=1
+ total_passed += 1
else:
- total_failed+=1
+ total_failed += 1
stat_str = 'No test cases executed'
- if total_executed>0:
+ if total_executed > 0:
failed_perct = int(float(total_failed)/float(total_executed)*100)
stat_str = ('From %d tests executed, %d have passed (%d%% failures)' %
(total_executed, total_passed, failed_perct))
@@ -1486,15 +1486,15 @@ id="t1" class="stats table-autosort:4 table-autofilter table-stripeclass:alterna
if res['log']:
#chop all '\n' from log text (to prevent html errors)
rx1 = re.compile('(\s+)')
- log_text = rx1.sub(' ',res['log'])
+ log_text = rx1.sub(' ', res['log'])
# allow only a-zA-Z0-9_ in html title name
# (due to bug in MS-explorer)
rx2 = re.compile('([^a-zA-Z_0-9])')
- updated_tag = rx2.sub('_',res['title'])
+ updated_tag = rx2.sub('_', res['title'])
- html_body_text = '%s%s'%(str(updated_tag),log_text)
- print >> output, 'Info | '%(str(updated_tag),str(html_body_text))
+ html_body_text = '%s%s' % (str(updated_tag), log_text)
+ print >> output, 'Info | ' % (str(updated_tag), str(html_body_text))
else:
print >> output, ' | '
# print execution time
@@ -1514,7 +1514,7 @@ id="t1" class="stats table-autosort:4 table-autofilter table-stripeclass:alterna
print >> output, '
'
print >> output, '