Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
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
Container Registry
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
Julien Lopez
QueryR
Commits
cabd5e6d
Commit
cabd5e6d
authored
7 years ago
by
Florian Angerer
Browse files
Options
Downloads
Patches
Plain Diff
Detect and parse RUnit test protocol.
parent
547c202e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mx.fastr/mx_fastr_pkgs.py
+17
-3
17 additions, 3 deletions
mx.fastr/mx_fastr_pkgs.py
with
17 additions
and
3 deletions
mx.fastr/mx_fastr_pkgs.py
+
17
−
3
View file @
cabd5e6d
...
@@ -556,9 +556,9 @@ def handle_output_file(file, test_output_file_contents):
...
@@ -556,9 +556,9 @@ def handle_output_file(file, test_output_file_contents):
if
"
testthat results
"
in
test_output_file_contents
[
i
]:
if
"
testthat results
"
in
test_output_file_contents
[
i
]:
mx
.
log
(
"
Detected testthat summary in {!s}
"
.
format
(
file
))
mx
.
log
(
"
Detected testthat summary in {!s}
"
.
format
(
file
))
return
_parse_testthat_result
(
test_output_file_contents
,
i
)
return
_parse_testthat_result
(
test_output_file_contents
,
i
)
elif
"
RUNIT TEST PROTOCOL
"
in
test_output_file_contents
[
i
]:
# TODO parse RUnit test protocol
mx
.
log
(
"
Detected RUNIT test protocol in {!s}
"
.
format
(
file
))
return
_parse_runit_result
(
test_output_file_contents
,
i
)
# if this test did not use one of the known test frameworks, take the report from the fuzzy compare
# if this test did not use one of the known test frameworks, take the report from the fuzzy compare
return
None
,
None
,
None
return
None
,
None
,
None
...
@@ -579,6 +579,20 @@ def _parse_testthat_result(lines, i):
...
@@ -579,6 +579,20 @@ def _parse_testthat_result(lines, i):
return
(
_testthat_parse_part
(
ok_part
),
_testthat_parse_part
(
skipped_part
),
_testthat_parse_part
(
failed_part
))
return
(
_testthat_parse_part
(
ok_part
),
_testthat_parse_part
(
skipped_part
),
_testthat_parse_part
(
failed_part
))
raise
Exception
(
"
Could not parse testthat status line {0}
"
.
format
(
result_line
))
raise
Exception
(
"
Could not parse testthat status line {0}
"
.
format
(
result_line
))
def
_parse_runit_result
(
lines
,
i
):
'''
RUNIT TEST PROTOCOL -- Thu Feb 08 10:54:42 2018
***********************************************
Number of test functions: 20
Number of errors: 0
Number of failures: 0
:param lines:
:param i:
:return:
'''
def
_testthat_parse_part
(
part
):
def
_testthat_parse_part
(
part
):
'''
'''
parses a part like
"
OK: 2
"
parses a part like
"
OK: 2
"
...
...
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