diff --git a/SPECS/tracelogging/tracelogging-migrate-catch2-v3.patch b/SPECS/tracelogging/tracelogging-migrate-catch2-v3.patch new file mode 100644 index 00000000000..7ea7396dd4a --- /dev/null +++ b/SPECS/tracelogging/tracelogging-migrate-catch2-v3.patch @@ -0,0 +1,37 @@ +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 7d46ad3..8ed0da6 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -11,7 +11,7 @@ target_link_libraries( + PRIVATE + tracelogging + # lttng-ust-common # Needed for LTTNG 2.13+ +- Catch2::Catch2) ++ Catch2::Catch2WithMain) + + include(CTest) + include(Catch) +diff --git a/test/CatchMain.cpp b/test/CatchMain.cpp +index 9909381..a3d1a2c 100644 +--- a/test/CatchMain.cpp ++++ b/test/CatchMain.cpp +@@ -1,5 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. + // Licensed under the MIT License. + +-#define CATCH_CONFIG_MAIN +-#include ++// Catch2 v3: main() is provided by linking against Catch2::Catch2WithMain. +diff --git a/test/TestTraceLogging.cpp b/test/TestTraceLogging.cpp +index 3484db9..1325a73 100644 +--- a/test/TestTraceLogging.cpp ++++ b/test/TestTraceLogging.cpp +@@ -119,7 +119,7 @@ bool TestCpp() + return ok && err == 0; + } + +-#include ++#include + + TEST_CASE("TraceLogging workflow builds", "[tracelogging]") { + REQUIRE(TestC()); diff --git a/SPECS/tracelogging/tracelogging.spec b/SPECS/tracelogging/tracelogging.spec index 72acfea6bc9..d19b991bca8 100644 --- a/SPECS/tracelogging/tracelogging.spec +++ b/SPECS/tracelogging/tracelogging.spec @@ -1,13 +1,15 @@ Summary: tracelogging one-line structure logging API on top of LTTNG Name: tracelogging Version: 0.3.1 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT Vendor: Microsoft Corporation Distribution: Azure Linux Group: System Environment URL: https://github.com/microsoft/tracelogging Source0: https://github.com/microsoft/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# Migrate the test suite from Catch2 v2 to the Catch2 v3 API shipped by Azure Linux. +Patch0: tracelogging-migrate-catch2-v3.patch BuildRequires: cmake >= 3.6 BuildRequires: gcc BuildRequires: lttng-ust-devel >= 2.13 @@ -30,7 +32,7 @@ This package contains the headers and symlinks for instrumenting applications and libraries with tracelogging. %prep -%autosetup +%autosetup -p1 %build mkdir build && cd build @@ -65,6 +67,9 @@ mkdir build && cd build %{_libdir}/cmake/tracelogging %changelog +* Mon Jul 27 2026 Kshitiz Godara - 0.3.1-2 +- Migrate test suite from Catch2 v2 to Catch2 v3 API to fix test build. + * Wed Feb 09 2022 Francisco Huelsz Prince - 0.3.1-1 - Upgrade to 0.3.1 for lttng-ust 2.13 compatibility & fixes.