Skip to content
Snippets Groups Projects
Commit 1bda997a authored by Mikhail Karnevskiy's avatar Mikhail Karnevskiy
Browse files

Move Test Results from section to subsection.

parent f273618d
No related branches found
No related tags found
1 merge request!39Describe common place for test data
......@@ -438,7 +438,7 @@ with open("available_notebooks.rst", "w") as f:
f.write("\n\n")
# add test results
test_artifact_dir = os.path.realpath("../../tests/artifacts")
test_artefact_dir = os.path.realpath("../../tests/artefacts")
from datetime import datetime
from dateutil.parser import parse
......@@ -559,7 +559,7 @@ def sorted_dir(folder):
header = """
Test Results
************
++++++++++++
Results are organized by git commit, and sorted descending by date.
......@@ -575,7 +575,7 @@ if not os.path.exists("./test_rsts"):
with open("test_results.rst", "w") as f:
f.write(header)
for commit, modtime in sorted_dir(test_artifact_dir):
for commit, modtime in sorted_dir(test_artefact_dir):
with open("./test_rsts/{}.rst".format(commit), "w") as fr:
rst = [".. include:: roles.rst"]
rst += [""]
......@@ -585,7 +585,7 @@ with open("test_results.rst", "w") as f:
fr.write("\n".join(rst))
# copy reports
pdfs = glob.glob("{}/{}/*/*.pdf".format(test_artifact_dir, commit))
pdfs = glob.glob("{}/{}/*/*.pdf".format(test_artefact_dir, commit))
if not os.path.exists("./_static/reports/{}".format(commit)):
os.makedirs("./_static/reports/{}".format(commit))
reports = {}
......@@ -598,7 +598,7 @@ with open("test_results.rst", "w") as f:
rlist.append((rname, "../_static/reports/{}".format(ppath)))
reports[rloc] = rlist
xmls = glob.glob("{}/{}/*/TEST*.xml".format(test_artifact_dir, commit))
xmls = glob.glob("{}/{}/*/TEST*.xml".format(test_artefact_dir, commit))
for xml in xmls:
rloc = xml.split("/")[-2]
with open(xml, "r") as xf:
......@@ -608,4 +608,4 @@ with open("test_results.rst", "w") as f:
f.write(" test_rsts/{}\n".format(commit))
def setup(app):
app.add_stylesheet('css/test_decorators.css')
\ No newline at end of file
app.add_stylesheet('css/test_decorators.css')
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