mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
tests: modify rtpoll-test to use 'check' framework
This commit is contained in:
parent
c02214dac5
commit
d9841a9431
2 changed files with 28 additions and 5 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <check.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <pulsecore/poll.h>
|
||||
|
|
@ -41,7 +42,7 @@ static int worker(pa_rtpoll_item *w) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
START_TEST (rtpoll_test) {
|
||||
pa_rtpoll *p;
|
||||
pa_rtpoll_item *i, *w;
|
||||
struct pollfd *pollfd;
|
||||
|
|
@ -80,6 +81,28 @@ int main(int argc, char *argv[]) {
|
|||
pa_rtpoll_item_free(w);
|
||||
|
||||
pa_rtpoll_free(p);
|
||||
|
||||
return 0;
|
||||
}
|
||||
END_TEST
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
int failed = 0;
|
||||
Suite *s;
|
||||
TCase *tc;
|
||||
SRunner *sr;
|
||||
|
||||
s = suite_create("RT Poll");
|
||||
tc = tcase_create("rtpoll");
|
||||
tcase_add_test(tc, rtpoll_test);
|
||||
/* the default timeout is too small,
|
||||
* set it to a reasonable large one.
|
||||
*/
|
||||
tcase_set_timeout(tc, 60 * 60);
|
||||
suite_add_tcase(s, tc);
|
||||
|
||||
sr = srunner_create(s);
|
||||
srunner_run_all(sr, CK_NORMAL);
|
||||
failed = srunner_ntests_failed(sr);
|
||||
srunner_free(sr);
|
||||
|
||||
return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue