Also fixed error where rst.csv did not use the
requested output directory if the default is overridden
Change-Id: Ife7bead97e5172ee115a7d07bd4ac917046f3b31
Issue-ID: VVP-185
Signed-off-by: Lovett, Trevor <trevor.lovett@att.com>
failures = [r for r in ALL_RESULTS if r.is_failed]
generate_failure_file(outpath)
output_format = output_format.lower().strip() if output_format else "html"
failures = [r for r in ALL_RESULTS if r.is_failed]
generate_failure_file(outpath)
output_format = output_format.lower().strip() if output_format else "html"
+ generate_json(outpath, template_path, categories)
if output_format == "html":
generate_html_report(outpath, categories, template_path, failures)
elif output_format == "excel":
generate_excel_report(outpath, categories, template_path, failures)
elif output_format == "json":
if output_format == "html":
generate_html_report(outpath, categories, template_path, failures)
elif output_format == "excel":
generate_excel_report(outpath, categories, template_path, failures)
elif output_format == "json":
- generate_json(outpath, template_path, categories)
elif output_format == "csv":
generate_csv_report(outpath, categories, template_path, failures)
else:
elif output_format == "csv":
generate_csv_report(outpath, categories, template_path, failures)
else:
-def generate_rst_table(data):
+def generate_rst_table(output_dir, data):
"""Generate a formatted csv to be used in RST"""
"""Generate a formatted csv to be used in RST"""
- rst_path = os.path.join(__path__[0], "../output/rst.csv")
+ rst_path = os.path.join(output_dir, "rst.csv")
with open(rst_path, "w", newline="") as f:
out = csv.writer(f)
out.writerow(
with open(rst_path, "w", newline="") as f:
out = csv.writer(f)
out.writerow(
- generate_rst_table(build_rst_json(json.dumps(reqs)))
+ generate_rst_table(get_output_dir(config), build_rst_json(json.dumps(reqs)))