Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
finesse
pykat
Commits
7a9feb16
Commit
7a9feb16
authored
11 years ago
by
Daniel Brown
Browse files
Options
Downloads
Patches
Plain Diff
more diffing updates and commit checker
parent
87744d67
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pykat/testing/web/templates/finesse_test_view.html
+1
-1
1 addition, 1 deletion
pykat/testing/web/templates/finesse_test_view.html
pykat/testing/web/web_interface.py
+21
-2
21 additions, 2 deletions
pykat/testing/web/web_interface.py
with
22 additions
and
3 deletions
pykat/testing/web/templates/finesse_test_view.html
+
1
−
1
View file @
7a9feb16
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<li>
{{ suite }}
</li>
<li>
{{ suite }}
</li>
<ul>
<ul>
{% for item in kats[suite] %}
{% 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>
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>
<a
href=
"/finesse/view/{{view_test_id}}/diff/{{suite}}/{{item[0]}}"
>
View Diff
</a>
Max rel diff = {{item[1]}}
</li>
{% if item[2][0] != "" %}
{% if item[2][0] != "" %}
<ul>
<ul>
<li>
stdout:
<pre>
{{item[2][0]}}
</pre></li>
<li>
stdout:
<pre>
{{item[2][0]}}
</pre></li>
...
...
This diff is collapsed.
Click to expand it.
pykat/testing/web/web_interface.py
+
21
−
2
View file @
7a9feb16
...
@@ -534,6 +534,20 @@ def finesse_view_make(view_test_id, log):
...
@@ -534,6 +534,20 @@ def finesse_view_make(view_test_id, log):
else
:
else
:
return
""
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
"
])
@app.route
(
'
/finesse/view/<view_test_id>/diff/<suite>/<kat>/
'
,
methods
=
[
"
GET
"
])
def
finesse_view_diff
(
view_test_id
,
suite
,
kat
):
def
finesse_view_diff
(
view_test_id
,
suite
,
kat
):
out
=
kat
[:
-
4
]
+
"
.out
"
out
=
kat
[:
-
4
]
+
"
.out
"
...
@@ -555,7 +569,7 @@ def finesse_view_diff(view_test_id, suite, kat):
...
@@ -555,7 +569,7 @@ def finesse_view_diff(view_test_id, suite, kat):
out
=
open
(
OUT_FILE
,
'
U
'
).
readlines
()
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
"
])
@app.route
(
'
/finesse/view/<view_test_id>/
'
,
methods
=
[
"
GET
"
])
...
@@ -638,7 +652,7 @@ def setInterval(interval):
...
@@ -638,7 +652,7 @@ def setInterval(interval):
return
decorator
return
decorator
@setInterval
(
60
0
)
@setInterval
(
60
)
def
checkLatestCommits
():
def
checkLatestCommits
():
global
latest_commit_id_tested
global
latest_commit_id_tested
out
=
utils
.
git
([
"
log
"
,
latest_commit_id_tested
[:
8
]
+
"
..HEAD
"
,
'
--pretty=format:
"
%H
"'
],
cwd
=
SRC_GIT_PATH
)
out
=
utils
.
git
([
"
log
"
,
latest_commit_id_tested
[:
8
]
+
"
..HEAD
"
,
'
--pretty=format:
"
%H
"'
],
cwd
=
SRC_GIT_PATH
)
...
@@ -668,6 +682,11 @@ def checkLatestCommits():
...
@@ -668,6 +682,11 @@ def checkLatestCommits():
for
commit
in
commits_not_tested
:
for
commit
in
commits_not_tested
:
print
"
Trying to test
"
+
commit
print
"
Trying to test
"
+
commit
__finesse_start_test
(
commit
)
__finesse_start_test
(
commit
)
except
util
.
RunException
as
ex
:
print
"
stderr
"
,
ex
.
err
pass
except
Exception
as
ex
:
except
Exception
as
ex
:
exc_type
,
exc_value
,
exc_traceback
=
sys
.
exc_info
()
exc_type
,
exc_value
,
exc_traceback
=
sys
.
exc_info
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment