mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-03 06:08:00 +02:00
test: parse the LITEST_VERBOSE environment variable
--verbose only works when running a specific test, sometimes we need make check to be more verbose. Set this by default for make check, the log becomes a lot more expressive that way Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
b6eb43b537
commit
d05363316c
3 changed files with 17 additions and 0 deletions
|
|
@ -63,4 +63,16 @@ $ CK_RUN_SUITE="device:wheel" CK_RUN_CASE="wheel only" ./test/test-device
|
|||
|
||||
Check and litest currently do not provide a way to run a specific test
|
||||
function only.
|
||||
|
||||
@section test-verbosity Controlling test output
|
||||
|
||||
Each test supports the `--verbose` commandline option to enable debugging
|
||||
output, see libinput_log_set_priority() for details. The `LITEST_VERBOSE`
|
||||
environment variable, if set, also enables verbose mode.
|
||||
|
||||
@code
|
||||
$ ./test/test-device --verbose
|
||||
$ LITEST_VERBOSE=1 make check
|
||||
@endcode
|
||||
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -118,6 +118,8 @@ test_build_linker_LDADD = $(top_builddir)/src/libinput.la $(top_builddir)/src/li
|
|||
test_build_cxx_SOURCES = build-cxx.cc
|
||||
test_build_cxx_CXXFLAGS = -Wall -Wextra -Wno-unused-parameter $(AM_CXXFLAGS)
|
||||
|
||||
AM_TESTS_ENVIRONMENT= LITEST_VERBOSE=1; export LITEST_VERBOSE;
|
||||
|
||||
if HAVE_VALGRIND
|
||||
VALGRIND_FLAGS=--leak-check=full \
|
||||
--quiet \
|
||||
|
|
|
|||
|
|
@ -500,6 +500,9 @@ litest_run(int argc, char **argv) {
|
|||
}
|
||||
}
|
||||
|
||||
if (getenv("LITEST_VERBOSE"))
|
||||
verbose = 1;
|
||||
|
||||
srunner_run_all(sr, CK_ENV);
|
||||
failed = srunner_ntests_failed(sr);
|
||||
srunner_free(sr);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue