Skip to content
Snippets Groups Projects
Commit ca3b513c authored by Steffen Hauf's avatar Steffen Hauf
Browse files

Add report copy to docs

parent e0bba92e
No related branches found
No related tags found
1 merge request!35Feat/reproducibility
......@@ -29,3 +29,4 @@ docs/build
docs/source/_notebooks/*
docs/source/test_rsts/*
docs/source/test_results.rst
docs/source/_static/reports
......@@ -586,16 +586,16 @@ with open("test_results.rst", "w") as f:
# copy reports
pdfs = glob.glob("{}/{}/*/*.pdf".format(test_artifact_dir, commit))
if not os.path.exists("./_static/{}".format(commit)):
os.makedirs("./_static/{}".format(commit))
if not os.path.exists("./_static/reports/{}".format(commit)):
os.makedirs("./_static/reports/{}".format(commit))
reports = {}
for pdf in pdfs:
ppath = "{}/{}.pdf".format(commit, uuid4())
shutil.copyfile(pdf, "./_static/{}".format(ppath))
shutil.copyfile(pdf, "./_static/reports/{}".format(ppath))
rloc = pdf.split("/")[-2]
rlist = reports.get(rloc, [])
rname = os.path.basename(pdf).split(".")[0]
rlist.append((rname, ppath))
rlist.append((rname, "../_static/reports/{}".format(ppath)))
reports[rloc] = rlist
xmls = glob.glob("{}/{}/*/TEST*.xml".format(test_artifact_dir, commit))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment