Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
39323f37
Commit
39323f37
authored
Feb 02, 2010
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ccanlint: fix scoring, add score details to --verbose.
parent
1f2fc897
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
tools/ccanlint/ccanlint.c
tools/ccanlint/ccanlint.c
+11
-2
tools/ccanlint/tests/run_tests_valgrind.c
tools/ccanlint/tests/run_tests_valgrind.c
+3
-3
No files found.
tools/ccanlint/ccanlint.c
View file @
39323f37
...
...
@@ -119,8 +119,13 @@ static bool run_test(struct ccanlint *i,
result
=
i
->
check
(
m
);
if
(
!
result
)
{
if
(
verbose
)
printf
(
" %s: OK
\n
"
,
i
->
name
);
if
(
verbose
)
{
printf
(
" %s: OK"
,
i
->
name
);
if
(
i
->
total_score
)
printf
(
" (+%u/%u)"
,
i
->
total_score
,
i
->
total_score
);
printf
(
"
\n
"
);
}
if
(
i
->
total_score
)
{
*
score
+=
i
->
total_score
;
*
total_score
+=
i
->
total_score
;
...
...
@@ -141,6 +146,10 @@ static bool run_test(struct ccanlint *i,
*
total_score
+=
i
->
total_score
;
*
score
+=
this_score
;
if
(
verbose
)
{
printf
(
" %s: FAIL (+%u/%u)
\n
"
,
i
->
name
,
this_score
,
i
->
total_score
);
}
if
(
!
quiet
)
{
printf
(
"%s
\n
"
,
i
->
describe
(
m
,
result
));
...
...
tools/ccanlint/tests/run_tests_valgrind.c
View file @
39323f37
...
...
@@ -49,7 +49,7 @@ static void *do_run_tests_vg(struct manifest *m)
list_head_init
(
list
);
list_for_each
(
&
m
->
run_tests
,
i
,
list
)
{
run_tests
.
total_score
++
;
run_tests
_vg
.
total_score
++
;
/* FIXME: timeout here */
cmdout
=
run_command
(
m
,
"valgrind -q %s"
,
i
->
compiled
);
if
(
cmdout
)
{
...
...
@@ -61,7 +61,7 @@ static void *do_run_tests_vg(struct manifest *m)
}
list_for_each
(
&
m
->
api_tests
,
i
,
list
)
{
run_tests
.
total_score
++
;
run_tests
_vg
.
total_score
++
;
/* FIXME: timeout here */
cmdout
=
run_command
(
m
,
"valgrind -q %s"
,
i
->
compiled
);
if
(
cmdout
)
{
...
...
@@ -87,7 +87,7 @@ static unsigned int score_run_tests_vg(struct manifest *m, void *check_result)
{
struct
list_head
*
list
=
check_result
;
struct
run_tests_result
*
i
;
unsigned
int
score
=
run_tests
.
total_score
;
unsigned
int
score
=
run_tests
_vg
.
total_score
;
list_for_each
(
list
,
i
,
list
)
score
--
;
...
...
Write
Preview
Markdown
is supported
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