Commit 7a9feb16 authored by Daniel Brown's avatar Daniel Brown
Browse files

more diffing updates and commit checker

parent 87744d67
......@@ -23,7 +23,7 @@
<li>{{ suite }}</li>
<ul>
{% for item in kats[suite] %}
<li><span style="display:inline-block;width: 300px">{{item[0]}}</span><a href="/finesse/view/{{view_test_id}}/diff/{{suite}}/{{item[0]}}">View Diff</a> &nbsp; Max rel diff = {{item[1]}}</li>
<li><span style="display:inline-block;width: 300px">{{item[0]}}</span><a href="/finesse/kat/{{suite}}/{{item[0]}}">View kat</a>&nbsp;<a href="/finesse/view/{{view_test_id}}/diff/{{suite}}/{{item[0]}}">View Diff</a> &nbsp; Max rel diff = {{item[1]}}</li>
{% if item[2][0] != "" %}
<ul>
<li>stdout: <pre>{{item[2][0]}}</pre></li>
......
......@@ -534,6 +534,20 @@ def finesse_view_make(view_test_id, log):
else:
return ""
@app.route('/finesse/kat/<suite>/<kat>', methods=["GET"])
def finesse_view_kat(suite, kat):
KAT_FILE = os.path.join(app.instance_path,"finesse_test","kat_test",suite,kat)
if os.path.exists(KAT_FILE):
kat_contents = open(KAT_FILE).read()
else:
kat_contents = "kat not found"
response = make_response(kat_contents)
response.headers["Content-type"] = "text/plain"
return response
@app.route('/finesse/view/<view_test_id>/diff/<suite>/<kat>/', methods=["GET"])
def finesse_view_diff(view_test_id, suite, kat):
out = kat[:-4] + ".out"
......@@ -555,7 +569,7 @@ def finesse_view_diff(view_test_id, suite, kat):
out = open(OUT_FILE, 'U').readlines()
return difflib.HtmlDiff().make_file(ref,out,REF_FILE,OUT_FILE)
return difflib.HtmlDiff().make_file(ref,out,REF_FILE,OUT_FILE,context=False)
@app.route('/finesse/view/<view_test_id>/', methods=["GET"])
......@@ -638,7 +652,7 @@ def setInterval(interval):
return decorator
@setInterval(600)
@setInterval(60)
def checkLatestCommits():
global latest_commit_id_tested
out = utils.git(["log", latest_commit_id_tested[:8] + "..HEAD",'--pretty=format:"%H"'], cwd=SRC_GIT_PATH)
......@@ -668,6 +682,11 @@ def checkLatestCommits():
for commit in commits_not_tested:
print "Trying to test " + commit
__finesse_start_test(commit)
except util.RunException as ex:
print "stderr", ex.err
pass
except Exception as ex:
exc_type, exc_value, exc_traceback = sys.exc_info()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment