Skip to content
Snippets Groups Projects
Commit 87346dd9 authored by Daniel Brown's avatar Daniel Brown
Browse files

added ref and out file viewing

parent b10bb46b
No related branches found
No related tags found
No related merge requests found
......@@ -23,8 +23,10 @@
<li>{{ suite }}</li>
<ul>
{% for item in kats[suite] %}
<li><span style="display:inline-block;width: 300px">
{{item[0]}}</span> <a href="/finesse/kat/{{suite}}/{{item[0]}}">Kat</a>
<li><span style="display:inline-block;width: 300px">{{item[0]}}</span>
&nbsp; <a href="/finesse/kat/{{suite}}/{{item[0]}}">Kat</a>
&nbsp; <a href="/finesse/out/{{view_test_id}}/{{suite}}/{{item[0]}}">Out</a>
&nbsp; <a href="/finesse/ref/{{suite}}/{{item[0]}}">Ref</a>
&nbsp; <a href="/finesse/view/{{view_test_id}}/diff/{{suite}}/{{item[0]}}">Diff</a>
&nbsp; <a href="/finesse/kat_history/{{suite}}/{{item[0]}}">History</a>
&nbsp; Max rel diff = {{item[1]}}</li>
......
......@@ -610,6 +610,36 @@ def finesse_view_kat(suite, kat):
return response
@app.route('/finesse/out/<test_id>/<suite>/<out>', methods=["GET"])
def finesse_view_out(test_id,suite, out):
out = str(out).replace(".kat",".out")
OUT_FILE = os.path.join(app.instance_path,"tests",str(test_id),"outputs",suite,out)
if os.path.exists(OUT_FILE):
contents = open(OUT_FILE).read()
else:
contents = "out file not found"
response = make_response(contents)
response.headers["Content-type"] = "text/plain"
return response
@app.route('/finesse/ref/<suite>/<out>', methods=["GET"])
def finesse_view_ref(suite, out):
out = str(out).replace(".kat",".out")
OUT_FILE = os.path.join(app.instance_path,"finesse_test","kat_test",suite,"reference",out)
if os.path.exists(OUT_FILE):
kat_contents = open(OUT_FILE).read()
else:
kat_contents = "out file not found"
response = make_response(kat_contents)
response.headers["Content-type"] = "text/plain"
return response
@app.route('/finesse/kat_history/<suite>/<kat>', methods=["GET"])
def finesse_view_kat_history(suite, kat):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment