Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Verlässliche Systemsoftware
projects
osv
Commits
44d95271
Commit
44d95271
authored
12 years ago
by
Avi Kivity
Browse files
Options
Downloads
Patches
Plain Diff
testrunner: report completion status when all tests end
parent
5c5b95fe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/testrunner.c
+8
-2
8 additions, 2 deletions
tests/testrunner.c
with
8 additions
and
2 deletions
tests/testrunner.c
+
8
−
2
View file @
44d95271
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
extern
void
dlclose_by_path_np
(
const
char
*
filename
);
extern
void
dlclose_by_path_np
(
const
char
*
filename
);
static
unsigned
nr_tests
,
nr_failures
;
void
load_test
(
char
*
path
,
char
*
argv0
)
void
load_test
(
char
*
path
,
char
*
argv0
)
{
{
void
*
handle
;
void
*
handle
;
...
@@ -20,11 +22,14 @@ void load_test(char *path, char *argv0)
...
@@ -20,11 +22,14 @@ void load_test(char *path, char *argv0)
handle
=
dlopen
(
path
,
0
);
handle
=
dlopen
(
path
,
0
);
test_main
=
dlsym
(
handle
,
"main"
);
test_main
=
dlsym
(
handle
,
"main"
);
++
nr_tests
;
ret
=
test_main
(
1
,
&
argv0
);
ret
=
test_main
(
1
,
&
argv0
);
if
(
ret
)
if
(
ret
)
{
++
nr_failures
;
printf
(
"failed.
\n
"
);
printf
(
"failed.
\n
"
);
else
}
else
{
printf
(
"ok.
\n
"
);
printf
(
"ok.
\n
"
);
}
dlclose_by_path_np
(
path
);
dlclose_by_path_np
(
path
);
}
}
...
@@ -64,6 +69,7 @@ int osv_main(int argc, char **argv)
...
@@ -64,6 +69,7 @@ int osv_main(int argc, char **argv)
perror
(
"failed to close testdir"
);
perror
(
"failed to close testdir"
);
return
EXIT_FAILURE
;
return
EXIT_FAILURE
;
}
}
printf
(
"All tests complete - %d/%d failures"
,
nr_failures
,
nr_tests
);
return
0
;
return
0
;
}
}
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