From patchwork Wed Jun 10 20:00:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 29405 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 n5AK2l9p003995 for ; Wed, 10 Jun 2009 20:02:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752315AbZFJUBE (ORCPT ); Wed, 10 Jun 2009 16:01:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752363AbZFJUBD (ORCPT ); Wed, 10 Jun 2009 16:01:03 -0400 Received: from mx2.redhat.com ([66.187.237.31]:58850 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752315AbZFJUBC (ORCPT ); Wed, 10 Jun 2009 16:01:02 -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 n5AK14B3020542; Wed, 10 Jun 2009 16:01:04 -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 n5AK13h5014011; Wed, 10 Jun 2009 16:01:03 -0400 Received: from localhost.localdomain (vpn-10-91.bos.redhat.com [10.16.10.91]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5AK0xHA000364; Wed, 10 Jun 2009 16:01:01 -0400 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH] Fix the remaining references to the old test name Date: Wed, 10 Jun 2009 17:00:59 -0300 Message-Id: <1244664059-25505-2-git-send-email-lmr@redhat.com> In-Reply-To: <1244664059-25505-1-git-send-email-lmr@redhat.com> References: <1244664059-25505-1-git-send-email-lmr@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 Some references to the old test name, kvm_runtest_2, were fixed accordingly. Signed-off-by: Lucas Meneghel Rodrigues --- client/tests/kvm/BEFORE_YOU_START | 2 +- client/tests/kvm/control | 4 ++-- client/tests/kvm/kvm_config.py | 29 ++++++++++++++--------------- client/tests/kvm/make_html_report.py | 2 +- client/tests/kvm/scan_results.py | 6 +++--- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/client/tests/kvm/BEFORE_YOU_START b/client/tests/kvm/BEFORE_YOU_START index 6b142fb..7478d9d 100644 --- a/client/tests/kvm/BEFORE_YOU_START +++ b/client/tests/kvm/BEFORE_YOU_START @@ -6,7 +6,7 @@ Copy kvm_tests.cfg.sample into kvm_tests.cfg Modify kvm_tests.cfg to your liking. Modify control if you prefer to "use your own kvm" (comment out kvm_install). -Create those symbolic links under kvm_runtest_2 or under +Create those symbolic links under kvm or under qemu -> qemu-kvm binary (unless using kvm_install) qemu-img -> qemu-img binary (unless using kvm_install) isos/ -> isos (mount or symlink) diff --git a/client/tests/kvm/control b/client/tests/kvm/control index 154d513..802f2aa 100644 --- a/client/tests/kvm/control +++ b/client/tests/kvm/control @@ -57,8 +57,8 @@ sys.path.append(pwd) # lines create those symlinks. # Change 'rootdir' here and/or mount appropriate directories in it # When dispatching tests on local host (client mode) one can -# either setup kvm_runtest_2 links, or same as server mode -# use rootdir and set all appropriate links/mount-points there. +# either setup kvm links, or same as server mode use rootdir and set +# all appropriate links/mount-points there. # For example, guest installation tests need to know where to # find the iso-files. # We create the links only if not already exist, so diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py index 1595761..1ae5f10 100755 --- a/client/tests/kvm/kvm_config.py +++ b/client/tests/kvm/kvm_config.py @@ -25,7 +25,7 @@ class config: """ Initialize the list and optionally parse filename. - @param filename: Path of the file that will be taken + @param filename: Path of the file that will be taken """ self.list = [{"name": "", "shortname": "", "depend": []}] self.debug = debug @@ -38,7 +38,7 @@ class config: """ Enable or disable debugging output. - @param debug: Whether debug is enabled (True) or disabled (False). + @param debug: Whether debug is enabled (True) or disabled (False). """ self.debug = debug @@ -48,7 +48,7 @@ class config: Parse filename, return the resulting list and store it in .list. If filename does not exist, raise an exception. - @param filename: Path of the configuration file. + @param filename: Path of the configuration file. """ if not os.path.exists(filename): raise IOError("File %s not found" % filename) @@ -63,7 +63,7 @@ class config: """ Parse a string, return the resulting list and store it in .list. - @param str: String that will be parsed. + @param str: String that will be parsed. """ file = StringIO.StringIO(str) self.list = self.parse(file, self.list) @@ -83,8 +83,8 @@ class config: """ Return True if dict matches filter. - @param filter: A regular expression that defines the filter. - @param dict: Dictionary that will be inspected. + @param filter: A regular expression that defines the filter. + @param dict: Dictionary that will be inspected. """ filter = re.compile("(\\.|^)" + filter + "(\\.|$)") return filter.search(dict["name"]) != None @@ -94,8 +94,8 @@ class config: """ Filter a list of dicts. - @param filter: A regular expression that will be used as a filter. - @param list: A list of dictionaries that will be filtered. + @param filter: A regular expression that will be used as a filter. + @param list: A list of dictionaries that will be filtered. """ if list == None: list = self.list @@ -111,9 +111,8 @@ class config: """ Get the indexes of a list that match a given filter. - @param filter: A regular expression that will filter the list. - @param list: List which we want to know the indexes that match - a filter. + @param filter: A regular expression that will filter the list. + @param list: List which we want to know the indexes that match a filter. """ if list == None: list = self.list @@ -138,8 +137,8 @@ class config: """ Split str and strip quotes from the resulting parts. - @param str: String that will be processed - @param sep: Separator that will be used to split the string + @param str: String that will be processed + @param sep: Separator that will be used to split the string """ temp = str.split(sep, 1) for i in range(len(temp)): @@ -152,8 +151,8 @@ class config: """ Get the next non-empty, non-comment line in a file like object. - @param file: File like object - @return: If no line is available, return None. + @param file: File like object + @return: If no line is available, return None. """ while True: line = file.readline() diff --git a/client/tests/kvm/make_html_report.py b/client/tests/kvm/make_html_report.py index 7fb54e5..2d3469f 100755 --- a/client/tests/kvm/make_html_report.py +++ b/client/tests/kvm/make_html_report.py @@ -1634,7 +1634,7 @@ def get_keyval_value(result_dir, key): Return the value of the first appearance of key in any keyval file in result_dir. If no appropriate line is found, return 'Unknown'. """ - keyval_pattern = os.path.join(result_dir, "kvm_runtest_2.*", "keyval") + keyval_pattern = os.path.join(result_dir, "kvm.*", "keyval") keyval_lines = commands.getoutput(r"grep -h '\b%s\b.*=' %s" % (key, keyval_pattern)) if not keyval_lines: diff --git a/client/tests/kvm/scan_results.py b/client/tests/kvm/scan_results.py index a92c867..14a3a7c 100755 --- a/client/tests/kvm/scan_results.py +++ b/client/tests/kvm/scan_results.py @@ -30,9 +30,9 @@ def parse_results(text): info = info_list.pop() test_name = parts[2] test_status = parts[0].split()[1] - # Remove 'kvm_runtest_2.' prefix - if test_name.startswith("kvm_runtest_2."): - test_name = test_name.split("kvm_runtest_2.")[1] + # Remove 'kvm.' prefix + if test_name.startswith("kvm."): + test_name = test_name.split("kvm.")[1] result_list.append((test_name, test_status, int(end_time - start_time), info)) # Found a FAIL/ERROR/GOOD line -- get failure/success info