Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
tor-browser-bundle-testsuite
Commits
e86db639
Unverified
Commit
e86db639
authored
Aug 11, 2014
by
boklm
Browse files
Add logs of failing tests in the index
parent
3def2b43
Changes
6
Hide whitespace changes
Inline
Side-by-side
TBBTestSuite/Reports.pm
View file @
e86db639
...
...
@@ -25,6 +25,7 @@ BEGIN {
my
%template_functions
=
(
is_test_error
=>
\
&
TBBTestSuite::Tests::
is_test_error
,
is_test_warning
=>
\
&
TBBTestSuite::Tests::
is_test_warning
,
test_by_name
=>
\
&
TBBTestSuite::Tests::
test_by_name
,
);
sub
set_report_dir
{
...
...
TBBTestSuite/Tests.pm
View file @
e86db639
...
...
@@ -74,6 +74,14 @@ sub is_success {
return
1
;
}
sub
test_by_name
{
my
(
$tests
,
$name
)
=
@_
;
foreach
my
$test
(
@$tests
)
{
return
$test
if
$test
->
{
name
}
eq
$name
;
}
return
undef
;
}
sub
matching_tbbfile
{
my
$o
=
tbb_filename_infos
(
$_
[
0
]);
return
$o
->
{
type
}
eq
'
browserbundle
'
&&
$o
->
{
os
}
eq
$options
->
{
os
}
...
...
tmpl/details_xpcshell.html
View file @
e86db639
[% IF ! from_index %]
[% IF test.results.failed.size %]
Failed tests:
<ul>
...
...
@@ -7,4 +8,5 @@ Failed tests:
</ul>
[% END %]
<a
href=
"javascript:togglecontent('logs_[% test.name %]');"
>
xpcshell logs
</a>
<pre
id=
"logs_[% test.name %]"
style=
"display:none"
>
[% test.results.out %]
</pre>
[% END %]
<pre
[%
IF
!
from_index
%
]id=
"logs_[% report_name %][% test.name %]"
style=
"display:none"
[%
END
%]
>
[% test.results.out %]
</pre>
tmpl/report.html
View file @
e86db639
...
...
@@ -12,15 +12,7 @@
color
:
#FF0000
;
}
</style>
<script
language=
"JavaScript"
type=
"text/javascript"
>
function
togglecontent
(
id
)
{
if
(
document
.
getElementById
(
id
).
style
.
display
==
"
none
"
)
{
document
.
getElementById
(
id
).
style
.
display
=
''
;
}
else
{
document
.
getElementById
(
id
).
style
.
display
=
"
none
"
;
}
}
</script>
[% INCLUDE togglecontent.js %]
</head>
<body>
[% IF tbbfiles.$tbbfile.type == 'browserunit' %]
...
...
tmpl/reports_index_browserunit.html
View file @
e86db639
...
...
@@ -22,6 +22,7 @@
font-size
:
small
;
}
</style>
[% INCLUDE togglecontent.js %]
</head>
<body>
<h1>
Tor Browser Unit Test Reports
</h1>
...
...
@@ -49,7 +50,12 @@
<li><b>
[% diff.fail_tests.size %] new failing tests
</b>
<ul>
[% FOREACH t IN diff.fail_tests.sort %]
<li>
[% t %]
</li>
<li><a
href=
"javascript:togglecontent('fail_test_[% report %]_[% t %]');"
>
[% t %]
</a>
<div
id=
"fail_test_[% report %]_[% t %]"
style=
"display:none"
>
[% SET test = test_by_name(tbbfiles.$tbbfile.tests, t); %]
[% SET type = test.type; INCLUDE "details_${type}.html" from_index=1 %]
</div>
</li>
[% END %]
</ul>
</li>
...
...
@@ -66,6 +72,11 @@
<li>
[% js %]
</li>
[% END %]
</ul>
<a
href=
"javascript:togglecontent('js_fail_test_[% report %]_[% t %]');"
>
logs
</a>
<div
id=
"js_fail_test_[% report %]_[% t %]"
style=
"display:none"
>
[% SET test = test_by_name(tbbfiles.$tbbfile.tests, t); %]
[% SET type = test.type; INCLUDE "details_${type}.html" from_index=1 %]
</div>
</li>
[% END %]
</ul>
...
...
tmpl/togglecontent.js
0 → 100644
View file @
e86db639
<
script
language
=
"
JavaScript
"
type
=
"
text/javascript
"
>
function
togglecontent
(
id
)
{
if
(
document
.
getElementById
(
id
).
style
.
display
==
"
none
"
)
{
document
.
getElementById
(
id
).
style
.
display
=
''
;
}
else
{
document
.
getElementById
(
id
).
style
.
display
=
"
none
"
;
}
}
<
/script
>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment