50 lines
1.3 KiB
Diff
50 lines
1.3 KiB
Diff
|
From c88ba11ced1311e91a73ffdf42114ed14a805725 Mon Sep 17 00:00:00 2001
|
||
|
From: Petr Mensik <pemensik@redhat.com>
|
||
|
Date: Thu, 14 Mar 2019 21:05:34 +0100
|
||
|
Subject: [PATCH] Workaround to kyua bug
|
||
|
|
||
|
Kyua 0.13 is not able to correctly handle whole test skipping.
|
||
|
Make workaround to it, include skipping message.
|
||
|
---
|
||
|
lib/isc/tests/timer_test.c | 11 +++++++++--
|
||
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/lib/isc/tests/timer_test.c b/lib/isc/tests/timer_test.c
|
||
|
index f69f2b3..050cf6d 100644
|
||
|
--- a/lib/isc/tests/timer_test.c
|
||
|
+++ b/lib/isc/tests/timer_test.c
|
||
|
@@ -573,14 +573,13 @@ purge(void **state) {
|
||
|
|
||
|
int
|
||
|
main(int argc, char **argv) {
|
||
|
- const struct CMUnitTest tests[] = {
|
||
|
#ifdef ISC_PLATFORM_USETHREADS
|
||
|
+ const struct CMUnitTest tests[] = {
|
||
|
cmocka_unit_test_setup_teardown(ticker, _setup, _teardown),
|
||
|
cmocka_unit_test_setup_teardown(once_life, _setup, _teardown),
|
||
|
cmocka_unit_test_setup_teardown(once_idle, _setup, _teardown),
|
||
|
cmocka_unit_test_setup_teardown(reset, _setup, _teardown),
|
||
|
cmocka_unit_test_setup_teardown(purge, _setup, _teardown),
|
||
|
-#endif
|
||
|
};
|
||
|
int c;
|
||
|
|
||
|
@@ -595,6 +594,14 @@ main(int argc, char **argv) {
|
||
|
}
|
||
|
|
||
|
return (cmocka_run_group_tests(tests, NULL, NULL));
|
||
|
+#else
|
||
|
+ UNUSED(argc);
|
||
|
+ UNUSED(argv);
|
||
|
+ UNUSED(verbose);
|
||
|
+
|
||
|
+ printf("1..0 # Skipped: threads disabled\n");
|
||
|
+ return (0);
|
||
|
+#endif
|
||
|
}
|
||
|
|
||
|
#else /* HAVE_CMOCKA */
|
||
|
--
|
||
|
2.20.1
|
||
|
|