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

@ -61,7 +61,7 @@ static void thread_func(void *data) {
pa_assert_se(pthread_setaffinity_np(pthread_self(), sizeof(mask), &mask) == 0);
#endif
/* pa_log("started up: %s", data); */
pa_log_debug("started up: %s", (char *) data);
r = pthread_barrier_wait(&barrier);
pa_assert(r == 0 || r == PTHREAD_BARRIER_SERIAL_THREAD);
@ -73,6 +73,9 @@ static void thread_func(void *data) {
int main(int argc, char *argv[]) {
unsigned n, i;
if (!getenv("MAKE_CHECK"))
pa_log_set_level(PA_LOG_DEBUG);
n_cpu = pa_ncpus();
for (n = 0; n < N_ITERATIONS; n++) {
@ -92,7 +95,7 @@ int main(int argc, char *argv[]) {
pa_thread_join(threads[i]);
pa_assert(n_run == 1);
pa_log("ran by %s", ran_by);
pa_log_info("ran by %s", ran_by);
for (i = 0; i < N_THREADS; i++) {
pa_xfree(pa_thread_get_data(threads[i]));