Skip to content

Commit

Permalink
SERVER-25558 Burn-in report should include associated task
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Grundy committed Oct 24, 2016
1 parent c0fe749 commit b579550
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions buildscripts/burn_in_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,19 @@ def _load_tests_file(pathname):
return json.load(fstream)


def _save_report_data(saved_data, pathname):
def _save_report_data(saved_data, pathname, task):
"""
Read in the report file from the previous resmoke.py run if it exists. We'll concat it to the
passed saved_data dict.
"""
if not os.path.isfile(pathname):
return None

with open(pathname, "r") as fstream:
current_data = json.load(fstream)
for result in current_data["results"]:
result["test_file"] += ":" + task

saved_data["failures"] += current_data["failures"]
saved_data["results"] += current_data["results"]

Expand Down Expand Up @@ -408,11 +412,11 @@ def main():
" ".join(tests_by_task[task]["tests"]), shell=True)
except subprocess.CalledProcessError as err:
print "Resmoke returned an error with task:", task
_save_report_data(test_results, values.report_file)
_save_report_data(test_results, values.report_file, task)
_write_report_file(test_results, values.report_file)
sys.exit(err.returncode)

_save_report_data(test_results, values.report_file)
_save_report_data(test_results, values.report_file, task)
_write_report_file(test_results, values.report_file)

sys.exit(0)
Expand Down

0 comments on commit b579550

Please sign in to comment.