test: Get the print mode from the CK_VERBOSITY environment variable
authorEnric Balletbo i Serra <eballetbo@redhat.com>
Wed, 19 Apr 2023 14:40:14 +0000 (16:40 +0200)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 17 Nov 2023 10:55:47 +0000 (19:55 +0900)
commitfad1af1bf5acae787ba41aa63ca2e1712e8c5551
tree5cd39c5e30c74694786b0c7e5d36ee9e24b4ba7b
parent56c79268b3abd5b49e3406c81fcfac6bc7dedf36
test: Get the print mode from the CK_VERBOSITY environment variable

On a test run it only prints the summary and one message per failed
test. While having this behaviour by default is nice it might be
interesting in some case to have more information print. Make the print
mode configurable from the environment variable CK_VERBOSITY, which can
have the values "silent", "minimal", "normal" or "verbose" so we can have
different outputs.

    $ sudo CK_VERBOSITY=verbose ./test-libevdev
    Running suite(s): libevdev init tests
     libevdev_has_event tests
     libevdev event tests
     100%: Checks: 79, Failures: 0, Errors: 0
     test-libevdev-init.c:23:P:test_new_device:test_new_device:0: Passed
     test-libevdev-init.c:28:P:test_free_device:test_free_device:0: Passed
     [ ... ]

Note that the default print mode doesn't change after this patch.

Signed-off-by: Enric Balletbo i Serra <eballetbo@redhat.com>
test/test-main.c