From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amos Kong Subject: Re: [PATCH 1/7] KVM test: Move test utilities to client/tools Date: Fri, 11 Mar 2011 14:47:40 +0800 Message-ID: <20110311064740.GA4456@t400> References: <1299662470-3017-1-git-send-email-lmr@redhat.com> <1299662470-3017-2-git-send-email-lmr@redhat.com> Reply-To: Amos Kong Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: autotest@test.kernel.org, kvm@vger.kernel.org To: Lucas Meneghel Rodrigues Return-path: Content-Disposition: inline In-Reply-To: <1299662470-3017-2-git-send-email-lmr@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org On Wed, Mar 09, 2011 at 06:21:04AM -0300, Lucas Meneghel Rodrigues wrote: > The programs cd_hash, html_report, scan_results can be > used by other users of autotest, so move them to the > tools directory inside the client directory. > > Signed-off-by: Lucas Meneghel Rodrigues > --- > client/tools/cd_hash.py | 48 ++ > client/tools/html_report.py | 1727 ++++++++++++++++++++++++++++++++++++++++++ > client/tools/scan_results.py | 97 +++ > 3 files changed, 1872 insertions(+), 0 deletions(-) > create mode 100644 client/tools/__init__.py > create mode 100755 client/tools/cd_hash.py > create mode 100755 client/tools/html_report.py > create mode 100755 client/tools/scan_results.py > > diff --git a/client/tools/__init__.py b/client/tools/__init__.py > new file mode 100644 > index 0000000..e69de29 > diff --git a/client/tools/cd_hash.py b/client/tools/cd_hash.py > new file mode 100755 > index 0000000..04f8cbe > --- /dev/null > +++ b/client/tools/cd_hash.py > @@ -0,0 +1,48 @@ > +#!/usr/bin/python > +""" > +Program that calculates several hashes for a given CD image. > + > +@copyright: Red Hat 2008-2009 > +""" > + > +import os, sys, optparse, logging > +import common > +import kvm_utils is it allowed to execute tools singlely? and kvm_utils.py has been dropped. # client/tools/scanf_results.py .... (ok) # client/tools/cd_hash.py (failed) Traceback (most recent call last): File "client/tools/cd_hash.py", line 9, in import common ImportError: No module named common > +from autotest_lib.client.common_lib import logging_manager > +from autotest_lib.client.bin import utils > + > + > +if __name__ == "__main__": > + parser = optparse.OptionParser("usage: %prog [options] [filenames]") > + options, args = parser.parse_args() > + > + logging_manager.configure_logging(kvm_utils.KvmLoggingConfig()) > + > + if args: > + filenames = args > + else: > + parser.print_help() > + sys.exit(1) .... > diff --git a/client/tools/html_report.py b/client/tools/html_report.py I've executed a serial tests, but no result.html produced. > new file mode 100755 > index 0000000..8b4b109 > --- /dev/null > +++ b/client/tools/html_report.py > @@ -0,0 +1,1727 @@ > +#!/usr/bin/python > +""" > +Script used to parse the test results and generate an HTML report. > + > +@copyright: (c)2005-2007 Matt Kruse (javascripttoolbox.com) > +@copyright: Red Hat 2008-2009 > +@author: Dror Russo (drusso@redhat.com) > +""" ....