diff --git a/src/Makefile.am b/src/Makefile.am index f27e4427c..8009b87c8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -476,8 +476,8 @@ remix_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) smoother_test_SOURCES = tests/smoother-test.c smoother_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la -smoother_test_CFLAGS = $(AM_CFLAGS) -smoother_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) +smoother_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS) +smoother_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS) proplist_test_SOURCES = tests/proplist-test.c proplist_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la diff --git a/src/tests/smoother-test.c b/src/tests/smoother-test.c index 4471669c5..c06f96d9a 100644 --- a/src/tests/smoother-test.c +++ b/src/tests/smoother-test.c @@ -24,12 +24,14 @@ #include #include +#include + #include #include #include -int main(int argc, char*argv[]) { +START_TEST (smoother_test) { pa_usec_t x; unsigned u = 0; pa_smoother *s; @@ -80,6 +82,24 @@ int main(int argc, char*argv[]) { } pa_smoother_free(s); - - return 0; +} +END_TEST + +int main(int argc, char *argv[]) { + int failed = 0; + Suite *s; + TCase *tc; + SRunner *sr; + + s = suite_create("Smoother"); + tc = tcase_create("smoother"); + tcase_add_test(tc, smoother_test); + 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; }