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

@ -35,6 +35,9 @@ static void dump_block(const pa_sample_spec *ss, const pa_memchunk *chunk) {
void *d;
unsigned i;
if (getenv("MAKE_CHECK"))
return;
d = pa_memblock_acquire(chunk->memblock);
switch (ss->format) {
@ -202,7 +205,8 @@ int main(int argc, char *argv[]) {
pa_sample_spec a;
pa_cvolume v;
pa_log_set_level(PA_LOG_DEBUG);
if (!getenv("MAKE_CHECK"))
pa_log_set_level(PA_LOG_DEBUG);
pa_assert_se(pool = pa_mempool_new(FALSE, 0));
@ -217,7 +221,7 @@ int main(int argc, char *argv[]) {
pa_mix_info m[2];
void *ptr;
printf("=== mixing: %s\n", pa_sample_format_to_string(a.format));
pa_log_debug("=== mixing: %s\n", pa_sample_format_to_string(a.format));
/* Generate block */
i.memblock = generate_block(pool, &a);