Revision 06c9d4db snf-tools/synnefo_tools/burnin/logger.py

b/snf-tools/synnefo_tools/burnin/logger.py
63 63
SECTION_SEPARATOR = \
64 64
    "-- -------------------------------------------------------------------"
65 65
SECTION_PREFIX = "-- "
66
SECTION_RUNNED = "Tests Runned"
66
SECTION_RUNNED = "Tests Run"
67 67
SECTION_RESULTS = "Results"
68 68
SECTION_NEW = "__ADD_NEW_SECTION__"
69 69
SECTION_PASSED = "  * Passed:"
......
164 164

  
165 165
    """
166 166
    if section == SECTION_PASSED:
167
        line = contents[-2]
168
        new_line = line.rstrip() + " " + testsuite + ",\n"
167
        line = contents[-2].rstrip()
168
        if line.endswith(":"):
169
            new_line = line + " " + testsuite + "\n"
170
        else:
171
            new_line = line + ", " + testsuite + "\n"
169 172
        contents[-2] = new_line
170 173
    elif section == SECTION_FAILED:
171
        line = contents[-1]
172
        new_line = line.rstrip() + " " + testsuite + ",\n"
174
        line = contents[-1].rstrip()
175
        if line.endswith(":"):
176
            new_line = line.rstrip() + " " + testsuite + "\n"
177
        else:
178
            new_line = line.rstrip() + ", " + testsuite + "\n"
173 179
        contents[-1] = new_line
174 180
    else:
175 181
        sys.stderr.write("Unknown section %s in _add_testsuite_results\n"

Also available in: Unified diff