Fixing spacing on messages coming from kvm_config
PATCH 1/1 Fixing spacing on messages coming from kvm_config
During the logging conversion, when breaking long lines, a space was not add to some of the lines on kvm_config. This patch fixes this mistake.
Signed-off-by Lucas Meneghel Rodrigues <[email protected]>
--- client/tests/kvm/kvm_config.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
client/tests/kvm/kvm_config.py +4 -4
@@ -304,7 +304,7 @@ class config: if op_found: if self.debug and not restricted: self.__debug_print(indented_line, - "Parsing operator (%d dicts in current" + "Parsing operator (%d dicts in current " "context)" % len_list) (left, value) = self.split_and_strip(line, op_found) filters_and_key = self.split_and_strip(left, ":")
@@ -351,7 +351,7 @@ class config: list = filtered_list if self.debug and not restricted: self.__debug_print(indented_line, - "Parsing no/only (%d dicts in current" + "Parsing no/only (%d dicts in current " "context, %d remain)" % (len_list, len(list)))
@@ -374,7 +374,7 @@ class config: elif line == "subvariants:": if self.debug and not restricted: self.__debug_print(indented_line, - "Entering subvariants block (%d dicts in" + "Entering subvariants block (%d dicts in " "current context)" % len_list) new_list = [] # Remember current file position
@@ -422,7 +422,7 @@ class config: if self.debug and not restricted: self.__debug_print(indented_line, "Entering multi-line exception block" - "(%d dicts in current context outside" + "(%d dicts in current context outside " "exception)" % len_list) line = line.strip(":") new_list = []
Signature · 1 line
1.6.2.2
PATCH 1/1 Fix the remaining references to the old test name
Some references to the old test name, kvm_runtest_2, were fixed accordingly.
Signed-off-by Lucas Meneghel Rodrigues <[email protected]>
--- 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(-)
client/tests/kvm/BEFORE_YOU_START +1 -1
@@ -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 <rootdir> +Create those symbolic links under kvm or under <rootdir> qemu -> qemu-kvm binary (unless using kvm_install) qemu-img -> qemu-img binary (unless using kvm_install) isos/ -> isos (mount or symlink)
client/tests/kvm/control +2 -2
@@ -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
client/tests/kvm/kvm_config.py +14 -15
@@ -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()
client/tests/kvm/make_html_report.py +1 -1
@@ -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:
client/tests/kvm/scan_results.py +3 -3
@@ -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
Signature · 1 line
1.6.2.2