diff --git a/0001-tests-skip-tests-on-Win32-that-rely-on-kafka-topics..patch b/0001-tests-skip-tests-on-Win32-that-rely-on-kafka-topics..patch new file mode 100644 index 0000000000000000000000000000000000000000..1cc2142fc776123e5d81f7563e1c9207b86a5822 --- /dev/null +++ b/0001-tests-skip-tests-on-Win32-that-rely-on-kafka-topics..patch @@ -0,0 +1,69 @@ +From 65f724614c1e8a2a4d7b76c6dc26eaf514c83975 Mon Sep 17 00:00:00 2001 +From: Magnus Edenhill +Date: Tue, 13 Feb 2018 20:44:46 +0100 +Subject: [PATCH] tests: skip tests on Win32 that rely on kafka-topics.sh + +--- + tests/0011-produce_batch.c | 3 ++- + tests/0026-consume_pause.c | 3 ++- + tests/0048-partitioner.c | 3 ++- + tests/test.c | 2 +- + 4 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/tests/0011-produce_batch.c b/tests/0011-produce_batch.c +index 1796d0a2..5c550a83 100644 +--- a/tests/0011-produce_batch.c ++++ b/tests/0011-produce_batch.c +@@ -545,6 +545,7 @@ int main_0011_produce_batch (int argc, char **argv) { + test_message_partitioner_wo_per_message_flag(); + test_single_partition(); + test_partitioner(); +- test_per_message_partition_flag(); ++ if (test_can_create_topics(1)) ++ test_per_message_partition_flag(); + return 0; + } +diff --git a/tests/0026-consume_pause.c b/tests/0026-consume_pause.c +index eeb2ba80..697e0f92 100644 +--- a/tests/0026-consume_pause.c ++++ b/tests/0026-consume_pause.c +@@ -221,7 +221,8 @@ static int consume_pause (void) { + int main_0026_consume_pause (int argc, char **argv) { + int fails = 0; + +- fails += consume_pause(); ++ if (test_can_create_topics(1)) ++ fails += consume_pause(); + + if (fails > 0) + TEST_FAIL("See %d previous error(s)\n", fails); +diff --git a/tests/0048-partitioner.c b/tests/0048-partitioner.c +index 601cb4ef..46a05117 100644 +--- a/tests/0048-partitioner.c ++++ b/tests/0048-partitioner.c +@@ -281,7 +281,8 @@ static void do_test_partitioners (void) { + } + + int main_0048_partitioner (int argc, char **argv) { +- do_test_partitioners(); ++ if (test_can_create_topics(0)) ++ do_test_partitioners(); + do_test_failed_partitioning(); + return 0; + } +diff --git a/tests/test.c b/tests/test.c +index 9cff714e..98aa8c74 100644 +--- a/tests/test.c ++++ b/tests/test.c +@@ -3468,7 +3468,7 @@ void test_report_add (struct test *test, const char *fmt, ...) { + int test_can_create_topics (int skip) { + #ifdef _MSC_VER + if (skip) +- TEST_SKIP("Cannot create topics on Win32"); ++ TEST_SKIP("Cannot create topics on Win32\n"); + return 0; + #else + +-- +2.42.0.windows.2 + diff --git a/librdkafka.spec b/librdkafka.spec index ca7ff9b386bde8f10342d568991e1720328392fb..b054ed2a351f564d783355f62a6bfd0da60a59f4 100644 --- a/librdkafka.spec +++ b/librdkafka.spec @@ -1,6 +1,6 @@ Name: librdkafka Version: 0.11.4 -Release: 4 +Release: 5 Summary: C library implementation of the Apache Kafka protocol License: BSD URL: https://github.com/edenhill/librdkafka @@ -8,6 +8,8 @@ Source0: https://github.com/edenhill/librdkafka/archive/v%{version}.tar.g BuildRequires: gcc-c++ python3 openssl-devel cyrus-sasl-devel lz4-devel +Patch0001: 0001-tests-skip-tests-on-Win32-that-rely-on-kafka-topics.patch + %description ibrdkafka is a C library implementation of the Apache Kafka protocol, providing Producer, Consumer and Admin clients. It was designed with message delivery reliability and high performance in mind, @@ -53,6 +55,9 @@ make check %{_libdir}/pkgconfig/* %changelog +* Mon Dec 25 2023 liubo - 0.11.4-5 +- tests: skip tests on Win32 that rely on kafka-topics.sh + * Mon Oct 26 2020 leiju - 0.11.4-4 - Modify BuildRequires from python2 to python3