summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnric Balletbo i Serra <eballetbo@redhat.com>2023-04-19 16:40:14 +0200
committerEnric Balletbo i Serra <eballetbo@redhat.com>2023-04-19 16:40:14 +0200
commitbb4404dd91fad78ca80936ead54183be5c679e30 (patch)
treef0ee04843bf0b4e672c6dd5f0f9f2b97fb4daf54
parentdb0d4271edfcc47dbcbbb38f0e7b82e646027d47 (diff)
downloadlibevdev-bb4404dd91fad78ca80936ead54183be5c679e30.tar.gz
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>
-rw-r--r--test/test-main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test-main.c b/test/test-main.c
index 9535740..e1fea71 100644
--- a/test/test-main.c
+++ b/test/test-main.c
@@ -108,7 +108,7 @@ int main(void)
srunner_add_suite(sr, t->setup());
}
- srunner_run_all(sr, CK_NORMAL);
+ srunner_run_all(sr, CK_ENV);
failed = srunner_ntests_failed(sr);
srunner_free(sr);