tests: More useful output of make check

Instead of spilling thousands of lines of output, make check now runs the
test-suite in about 100 lines or so.  If running under make check, the output of
tests is reduced. The MAKE_CHECK environment variable is used for this, so that
when running the test manually, the full output is still shown.  Furthermore,
pa_log is used consistently instead of printf, so that all test output goes to
stderr by default.  Colored output from make check goes to stdout.
This commit is contained in:
Maarten Bosmans 2011-10-04 14:01:03 +02:00 committed by Arun Raghavan
parent 6be5515e6a
commit 681aaf7a9a
20 changed files with 144 additions and 115 deletions

View file

@ -49,19 +49,19 @@ static void the_thread(void *_q) {
switch (code) {
case OPERATION_A:
printf("Operation A\n");
pa_log_info("Operation A");
break;
case OPERATION_B:
printf("Operation B\n");
pa_log_info("Operation B");
break;
case OPERATION_C:
printf("Operation C\n");
pa_log_info("Operation C");
break;
case QUIT:
printf("quit\n");
pa_log_info("quit");
quit = 1;
break;
}
@ -79,22 +79,22 @@ int main(int argc, char *argv[]) {
pa_assert_se(t = pa_thread_new("test", the_thread, q));
printf("Operation A post\n");
pa_log_info("Operation A post");
pa_asyncmsgq_post(q, NULL, OPERATION_A, NULL, 0, NULL, NULL);
pa_thread_yield();
printf("Operation B post\n");
pa_log_info("Operation B post");
pa_asyncmsgq_post(q, NULL, OPERATION_B, NULL, 0, NULL, NULL);
pa_thread_yield();
printf("Operation C send\n");
pa_log_info("Operation C send");
pa_asyncmsgq_send(q, NULL, OPERATION_C, NULL, 0, NULL);
pa_thread_yield();
printf("Quit post\n");
pa_log_info("Quit post");
pa_asyncmsgq_post(q, NULL, QUIT, NULL, 0, NULL, NULL);
pa_thread_free(t);