Fix 'catch' & 'catch2' compatibility with glibc-2.34
authorLukas Märdian <slyon@ubuntu.com>
Sat, 19 Nov 2022 10:33:48 +0000 (10:33 +0000)
committerAdrian Bunk <bunk@debian.org>
Sat, 19 Nov 2022 10:33:48 +0000 (10:33 +0000)
Origin: vendor, Ubuntu
Bug: https://github.com/potassco/libpotassco/issues/12 (only catch1 part)
Last-Update: 2022-01-18

The gringo package contains several embedded copies of the 'catch' (CTest)
library. All of those copies are outdated and incompatible with glibc-2.34.
This patch updates the test sources to use the system provided versions of
'catch' and 'catch2' instead, to fix this issue.
C.f.: https://github.com/catchorg/Catch2/issues/2178
Last-Update: 2022-01-18
Gbp-Pq: Name use-system-catch-for-glibc-2.34-compat.patch

32 files changed:
clasp/libpotassco/tests/main.cpp
clasp/libpotassco/tests/test_application.cpp
clasp/libpotassco/tests/test_aspif.cpp
clasp/libpotassco/tests/test_options.cpp
clasp/libpotassco/tests/test_smodels.cpp
clasp/libpotassco/tests/test_string_convert.cpp
clasp/libpotassco/tests/test_text.cpp
clasp/libpotassco/tests/test_value.cpp
clasp/tests/clause_creator_test.cpp
clasp/tests/clause_test.cpp
clasp/tests/cli_test.cpp
clasp/tests/decision_heuristic_test.cpp
clasp/tests/dependency_graph_test.cpp
clasp/tests/dlp_builder_test.cpp
clasp/tests/enumerator_test.cpp
clasp/tests/facade_test.cpp
clasp/tests/literal_test.cpp
clasp/tests/minimize_test.cpp
clasp/tests/parser_test.cpp
clasp/tests/program_builder_test.cpp
clasp/tests/rule_test.cpp
clasp/tests/satelite_test.cpp
clasp/tests/solver_test.cpp
clasp/tests/test_main.cpp
clasp/tests/unfounded_check_test.cpp
clasp/tests/weight_constraint_test.cpp
libclingo/tests/main.cc
libclingo/tests/tests.hh
libgringo/tests/main.cc
libgringo/tests/tests.hh
libreify/tests/main.cc
libreify/tests/program.cc

index 36731dcc6f85a293d39582291528cce384e334de..13b872268b6b5d4278b3a856dbfa199e665260f3 100644 (file)
@@ -16,4 +16,4 @@ int enableDebugHeap() {
 static int eh = enableDebugHeap();
 #endif
 #define CATCH_CONFIG_MAIN  // This tells Catch to provide a main() - only do this in one cpp file
-#include "catch.hpp"
+#include <catch/catch.hpp>
index 6097360384a13ee9fca53f065bea95bdad970355..fd7ffe53bcda55f1849c201861a405413e8d3fb2 100644 (file)
@@ -18,7 +18,7 @@
 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 // IN THE SOFTWARE.
-#include "catch.hpp"
+#include <catch/catch.hpp>
 #include <potassco/application.h>
 #include <potassco/program_opts/typed_value.h>
 #include <signal.h>
index 00762f8b9d8a8fa922b961874a93e3c99c580529..fdb0a2f3100c4cdcb5d4c821c2964b355c61ddd9 100644 (file)
@@ -24,7 +24,7 @@
 #ifdef _MSC_VER
 #pragma warning (disable : 4996)
 #endif
-#include "catch.hpp"
+#include <catch/catch.hpp>
 #include "test_common.h"
 #include <potassco/aspif.h>
 #include <potassco/rule_utils.h>
index 32d9d4d6d5b6cf627b3002e4aafa0eb3ce3d9067..a9215d29eff7d9a4d6296a94975690b8a0da817d 100644 (file)
@@ -18,7 +18,7 @@
 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 // IN THE SOFTWARE.
-#include "catch.hpp"
+#include <catch/catch.hpp>
 #include <potassco/program_opts/program_options.h>
 #include <potassco/program_opts/typed_value.h>
 #include <potassco/program_opts/errors.h>
index a217c870bb3fde4420eafd33836ee21eea66cc0e..442b3e0bcbe5ef924da19425939d26059f11369b 100644 (file)
@@ -22,7 +22,7 @@
 // IN THE SOFTWARE.
 //
 
-#include "catch.hpp"
+#include <catch/catch.hpp>
 #include "test_common.h"
 #include <potassco/convert.h>
 #include <sstream>
index f853781d5fe48c93a6e5d9d5abaaf9880d7b10fe..5523a25c95ab250e6163f5b6374204852ec63cb8 100644 (file)
@@ -18,7 +18,7 @@
 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 // IN THE SOFTWARE.
-#include "catch.hpp"
+#include <catch/catch.hpp>
 #include <potassco/string_convert.h>
 #include <string>
 #include <vector>
index 38b73005e08f2de1c4a4ae4fb0a3f4bfddab51a8..6439fdb672cbf48fa888f311faa728a0c498da3e 100644 (file)
@@ -22,7 +22,7 @@
 // IN THE SOFTWARE.
 //
 
-#include "catch.hpp"
+#include <catch/catch.hpp>
 #include "test_common.h"
 #include <potassco/aspif_text.h>
 #include <potassco/aspif.h>
index cd610b55b50f3f4c332ed74e82dac8f683672e96..9d449b9b00dd5839359dd4a0540b567b8ce152d7 100644 (file)
@@ -18,7 +18,7 @@
 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 // IN THE SOFTWARE.
-#include "catch.hpp"
+#include <catch/catch.hpp>
 #include <potassco/program_opts/value_store.h>
 #include <potassco/program_opts/mapped_value.h>
 #include <potassco/program_opts/typed_value.h>
index 3fe2d6318f867e2ed8499e9e2046c47e9ce8f05b..608810850b3c036fc026fc8708203b00076f6f6b 100644 (file)
@@ -24,7 +24,7 @@
 #include <clasp/clause.h>
 #include <clasp/solver.h>
 #include <algorithm>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 namespace Clasp { namespace Test {
 using namespace Clasp::mt;
 
index b279fa0357608a1d8e435a0ddde24dbba7df66cb..49139b64c8f6fa189fb7d407100fcfcda0d270a3 100644 (file)
@@ -24,7 +24,7 @@
 #include <clasp/clause.h>
 #include <clasp/solver.h>
 #include <algorithm>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 #ifdef _MSC_VER
 #pragma warning (disable : 4267) //  conversion from 'size_t' to unsigned int
 #pragma once
index 53ce51269de37638407ad6340f1ef33b947b6522..7fb003686b87b9a927910e19225d8850d798a35b 100644 (file)
@@ -26,7 +26,7 @@
 #include <clasp/unfounded_check.h>
 #include <clasp/logic_program.h>
 #include <fstream>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 namespace Clasp {
 static bool operator==(const ScheduleStrategy& lhs, const ScheduleStrategy& rhs) {
        return lhs.type == rhs.type && lhs.base == rhs.base && lhs.len == rhs.len && lhs.grow == rhs.grow;
index 566cf102c804bca110627a0b31b9a56411361930..9fe27715263f77b9e0c3a98d99da3679110a6e00 100644 (file)
@@ -27,7 +27,7 @@
 #include <clasp/clause.h>
 #include <clasp/solver.h>
 #include "lpcompare.h"
-#include "catch.hpp"
+#include <catch/catch.hpp>
 namespace Clasp { namespace Test {
 using namespace Clasp::Asp;
 /////////////////////////////////////////////////////////////////////////////////////////
index f383018b3a78c8bbd8d6bc00106de87db8001fdb..69159059893e796c66b5d42a79ee2065fbc08344 100644 (file)
@@ -24,7 +24,7 @@
 #include <clasp/dependency_graph.h>
 #include <clasp/solver.h>
 #include "lpcompare.h"
-#include "catch.hpp"
+#include <catch/catch.hpp>
 namespace Clasp { namespace Test {
 using namespace Clasp::Asp;
 
index 68cb77236d105f53761dcaabfd5285a988372681..e18befd34ce3af8797fa3d60b22f72cf79692f67 100644 (file)
@@ -26,7 +26,7 @@
 #include <clasp/unfounded_check.h>
 #include "lpcompare.h"
 #include <sstream>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 using namespace std;
 namespace Clasp { namespace Test {
 using namespace Clasp::Asp;
index ef0fd4cfef29eb2e98f4193cfcf0a77162a0da15..472705ae8dd044a152d5d91e48e9ac80231b1aef 100644 (file)
@@ -28,7 +28,7 @@
 #include <clasp/model_enumerators.h>
 #include "lpcompare.h"
 #include <sstream>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 using namespace std;
 namespace Clasp { namespace Test {
 using namespace Clasp::Asp;
index 1a711dfdafb95afca24137c5329c024792109ffe..f4998b18384af15f53e4c071a0fa08a85e1dbabb 100644 (file)
@@ -35,7 +35,7 @@
 #endif
 #include "lpcompare.h"
 #include <signal.h>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 namespace Clasp { namespace Test {
 using namespace Clasp::mt;
 
index a47e0849053a6028e2fcdbd6aedd45d1f677b97d..c51a950c1850d26bbf3a93beb963334238aacc35 100644 (file)
@@ -22,7 +22,7 @@
 // IN THE SOFTWARE.
 //
 #include <clasp/solver_types.h>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 namespace Clasp { namespace Test {
 
 static bool testBin(const Literal& p) {
index cb6e31f19f9c6d59c456e99e1942c5c996f866aa..f8661a178cac136693a678299af004ff0aab213f 100644 (file)
@@ -28,7 +28,7 @@
 #include <clasp/solver.h>
 #include <clasp/solve_algorithms.h>
 #include <algorithm>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 namespace Clasp { namespace Test {
 namespace {
 struct BranchAndBoundTest {
index 6ca85e58a852d631e68fce199c6f467633fe8a19..d5f62a5a8e0bf335b822284c6ddeab26c92f51a7 100644 (file)
@@ -29,7 +29,7 @@
 #include <potassco/smodels.h>
 #include <potassco/string_convert.h>
 #include "lpcompare.h"
-#include "catch.hpp"
+#include <catch/catch.hpp>
 namespace Clasp { namespace Test {
 
 template <class Api>
index ed79c2d3c412915569c88e56f01206c230a330f7..a698fff55a2811bb47f3aacc15c6138b67694017 100644 (file)
@@ -27,7 +27,7 @@
 #include <clasp/unfounded_check.h>
 #include <clasp/minimize_constraint.h>
 #include "lpcompare.h"
-#include "catch.hpp"
+#include <catch/catch.hpp>
 using namespace std;
 namespace Clasp { namespace Test {
 using namespace Clasp::Asp;
index dad5dd0dcb42e98ea28ced129895a8cc45d1b6a4..38284a31e08556fa05c5d28fa76afdfe61a11a32 100644 (file)
@@ -27,7 +27,7 @@
 #include <clasp/solver.h>
 #include "lpcompare.h"
 #include <utility>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 namespace Potassco {
 static bool operator==(const LitSpan& lhs, const LitSpan& rhs) {
        return lhs.size == rhs.size && std::equal(begin(lhs), end(lhs), begin(rhs));
index 6ca6dd6fb2d7ebbb30b6277328d467c865997a97..73a52d5fe5be32988ee0dc6eda4605b65e585acb 100644 (file)
@@ -27,7 +27,7 @@
 #include <clasp/clause.h>
 #include <clasp/parser.h>
 #include <algorithm>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 #ifdef _MSC_VER
 #pragma warning (disable : 4267) //  conversion from 'size_t' to unsigned int
 #pragma once
index 5897c2033f3a2c814834a2f10f9359bdc027ee10..b4ca2a7e9a5060a577c9b25a79bbc1f5146521fd 100644 (file)
@@ -25,7 +25,7 @@
 #include <clasp/clause.h>
 #include <clasp/statistics.h>
 #include <clasp/weight_constraint.h>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 namespace Clasp { namespace Test {
 using namespace Clasp::mt;
 struct TestingConstraint : public Constraint {
index 5d31d2e0ba97cc16a35c444d6f822e5789bf4f6d..e601bd2596ef1238f6287e32a384087e9a89840a 100644 (file)
@@ -22,7 +22,7 @@
 // IN THE SOFTWARE.
 //
 #define CATCH_CONFIG_RUNNER
-#include "catch.hpp"
+#include <catch/catch.hpp>
 #if defined (_MSC_VER) && _MSC_VER >= 1200
 #include <crtdbg.h>
 #endif
index b55f3696e36d3b5f48181f12f31d373dd2cfc5b6..ca7e7993cf99c952f562c27cfa8faa65ea72032d 100644 (file)
@@ -26,7 +26,7 @@
 #include <clasp/clause.h>
 #include "lpcompare.h"
 #include <memory>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 namespace Clasp { namespace Test {
 using namespace Clasp::Asp;
 
index 25e1d9e46d7364b963c02d927fd34f5e6ee01ebe..044260ae19f5a53434e8f2e79339cc31bc1df235 100644 (file)
@@ -24,7 +24,7 @@
 #include <clasp/weight_constraint.h>
 #include <clasp/solver.h>
 #include <algorithm>
-#include "catch.hpp"
+#include <catch/catch.hpp>
 using namespace std;
 
 namespace Clasp { namespace Test {
index b221d9a52b7070cb0d510c97cab9ea0dfdd2ce89..c17af0d5f230a25bc135e039b0f5b77417d47fc2 100644 (file)
@@ -23,4 +23,4 @@
 // }}}
 
 #define CATCH_CONFIG_MAIN
-#include "catch.hpp"
+#include <catch2/catch.hpp>
index 07f11472f318998aaa246629b1cad2de2386a512..bed21dc8003c80d635ebc0f64e2c036db4573dcc 100644 (file)
@@ -23,7 +23,7 @@
 // }}}
 
 #include "clingo.hh"
-#include "catch.hpp"
+#include <catch2/catch.hpp>
 
 namespace Clingo { namespace Test {
 
index 5a822a8c4f4d3cac038a9e3a80dec0b5afb9e671..efceaa4590764463585f0316abb0d924a59425d5 100644 (file)
@@ -22,4 +22,4 @@
 
 // }}}
 #define CATCH_CONFIG_MAIN
-#include "catch.hpp"
+#include <catch2/catch.hpp>
index ea86ba8645f90a131a2c87f41ef432ef26b3ff72..25d1143126b9547fcdafbc55326e992ee9dbf026 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef _GRINGO_TEST_TESTS_HH
 #define _GRINGO_TEST_TESTS_HH
 
-#include "catch.hpp"
+#include <catch2/catch.hpp>
 #include "gringo/utility.hh"
 #include "gringo/logger.hh"
 #include "gringo/base.hh"
index 0c7c351f437f5f43f3bb62beb254a9f1ecbec5a0..4ed06df1f7bea8cc18ee161389b9c3e2741b08a0 100644 (file)
@@ -1,2 +1,2 @@
 #define CATCH_CONFIG_MAIN
-#include "catch.hpp"
+#include <catch2/catch.hpp>
index 46122e0a6b8626ca431d5fcd5903135825b688e8..18430364ecede9d55af63cc58a11c5cec27c9bc1 100644 (file)
@@ -1,4 +1,4 @@
-#include "catch.hpp"
+#include <catch2/catch.hpp>
 #include <potassco/aspif_text.h>
 #include <reify/program.hh>