mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-22 08:56:52 -05:00
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:
parent
6be5515e6a
commit
681aaf7a9a
20 changed files with 144 additions and 115 deletions
|
|
@ -46,14 +46,14 @@ static pa_once once = PA_ONCE_INIT;
|
|||
static void thread_func(void *data) {
|
||||
pa_tls_set(tls, data);
|
||||
|
||||
pa_log("thread_func() for %s starting...", (char*) pa_tls_get(tls));
|
||||
pa_log_info("thread_func() for %s starting...", (char*) pa_tls_get(tls));
|
||||
|
||||
pa_mutex_lock(mutex);
|
||||
|
||||
for (;;) {
|
||||
int k, n;
|
||||
|
||||
pa_log("%s waiting ...", (char*) pa_tls_get(tls));
|
||||
pa_log_info("%s waiting ...", (char*) pa_tls_get(tls));
|
||||
|
||||
for (;;) {
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ static void thread_func(void *data) {
|
|||
|
||||
pa_cond_signal(cond2, 0);
|
||||
|
||||
pa_log("%s got number %i", (char*) pa_tls_get(tls), k);
|
||||
pa_log_info("%s got number %i", (char*) pa_tls_get(tls), k);
|
||||
|
||||
/* Spin! */
|
||||
for (n = 0; n < k; n++)
|
||||
|
|
@ -88,13 +88,16 @@ quit:
|
|||
|
||||
pa_mutex_unlock(mutex);
|
||||
|
||||
pa_log("thread_func() for %s done...", (char*) pa_tls_get(tls));
|
||||
pa_log_info("thread_func() for %s done...", (char*) pa_tls_get(tls));
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
int i, k;
|
||||
pa_thread* t[THREADS_MAX];
|
||||
|
||||
if (!getenv("MAKE_CHECK"))
|
||||
pa_log_set_level(PA_LOG_DEBUG);
|
||||
|
||||
mutex = pa_mutex_new(FALSE, FALSE);
|
||||
cond1 = pa_cond_new();
|
||||
cond2 = pa_cond_new();
|
||||
|
|
@ -113,7 +116,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
magic_number = (int) rand() % 0x10000;
|
||||
|
||||
pa_log("iteration %i (%i)", k, magic_number);
|
||||
pa_log_info("iteration %i (%i)", k, magic_number);
|
||||
|
||||
pa_cond_signal(cond1, 0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue