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
fece6c23
Commit
fece6c23
authored
Jan 10, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tap: add fail callback
This is useful for failtest, so we can abort on first failure.
parent
73650a93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
ccan/tap/tap.c
ccan/tap/tap.c
+3
-0
ccan/tap/tap.h
ccan/tap/tap.h
+7
-0
No files found.
ccan/tap/tap.c
View file @
fece6c23
...
...
@@ -179,6 +179,9 @@ _gen_result(int ok, const char *func, const char *file, unsigned int line,
UNLOCK
;
if
(
!
ok
&&
tap_fail_callback
)
tap_fail_callback
();
/* We only care (when testing) that ok is positive, but here we
specifically only want to return 1 or 0 */
return
ok
?
1
:
0
;
...
...
ccan/tap/tap.h
View file @
fece6c23
...
...
@@ -243,4 +243,11 @@ void plan_no_plan(void);
*/
void
plan_skip_all
(
const
char
*
reason
);
/**
* tap_fail_callback - function to call when we fail
*
* This can be used to ease debugging, or exit on the first failure.
*/
void
(
*
tap_fail_callback
)(
void
);
#endif
/* C99 or gcc */
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