mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -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
|
|
@ -17,8 +17,9 @@
|
|||
#include <netinet/ip.h>
|
||||
#endif
|
||||
|
||||
#include <pulsecore/socket.h>
|
||||
#include <pulsecore/log.h>
|
||||
#include <pulsecore/macro.h>
|
||||
#include <pulsecore/socket.h>
|
||||
#include <pulsecore/ipacl.h>
|
||||
#include <pulsecore/arpa-inet.h>
|
||||
|
||||
|
|
@ -30,7 +31,7 @@ static void do_ip_acl_check(const char *s, int fd, int expected) {
|
|||
result = pa_ip_acl_check(acl, fd);
|
||||
pa_ip_acl_free(acl);
|
||||
|
||||
printf("%-20s result=%u (should be %u)\n", s, result, expected);
|
||||
pa_log_info("%-20s result=%u (should be %u)", s, result, expected);
|
||||
pa_assert(result == expected);
|
||||
}
|
||||
|
||||
|
|
@ -42,6 +43,9 @@ int main(int argc, char *argv[]) {
|
|||
int fd;
|
||||
int r;
|
||||
|
||||
if (!getenv("MAKE_CHECK"))
|
||||
pa_log_set_level(PA_LOG_DEBUG);
|
||||
|
||||
fd = socket(PF_INET, SOCK_STREAM, 0);
|
||||
pa_assert(fd >= 0);
|
||||
|
||||
|
|
@ -65,7 +69,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
#ifdef HAVE_IPV6
|
||||
if ( (fd = socket(PF_INET6, SOCK_STREAM, 0)) < 0 ) {
|
||||
printf("Unable to open IPv6 socket, IPv6 tests ignored");
|
||||
pa_log_error("Unable to open IPv6 socket, IPv6 tests ignored");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue