1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
|
Description: Fix 'catch' (CTest) compatibility with glibc-2.34
The clasp package contains an embedded copy of the 'catch' v1 (CTest)
library. That copy is outdated and incompatible with glibc-2.34.
This patch updates the test sources to use the system provided versions of
'catch' instead, to fix this issue.
C.f.: https://github.com/catchorg/Catch2/issues/2178
Author: Lukas Märdian <slyon@ubuntu.com>
Origin: vendor, Ubuntu
Forwarded: no
Bug: https://github.com/potassco/clasp/issues/73
Last-Update: 2022-01-18
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- clasp-3.3.5.orig/libpotassco/tests/main.cpp
+++ clasp-3.3.5/libpotassco/tests/main.cpp
@@ -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>
--- clasp-3.3.5.orig/libpotassco/tests/test_application.cpp
+++ clasp-3.3.5/libpotassco/tests/test_application.cpp
@@ -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>
--- clasp-3.3.5.orig/libpotassco/tests/test_aspif.cpp
+++ clasp-3.3.5/libpotassco/tests/test_aspif.cpp
@@ -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>
--- clasp-3.3.5.orig/libpotassco/tests/test_options.cpp
+++ clasp-3.3.5/libpotassco/tests/test_options.cpp
@@ -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>
--- clasp-3.3.5.orig/libpotassco/tests/test_smodels.cpp
+++ clasp-3.3.5/libpotassco/tests/test_smodels.cpp
@@ -22,7 +22,7 @@
// IN THE SOFTWARE.
//
-#include "catch.hpp"
+#include <catch/catch.hpp>
#include "test_common.h"
#include <potassco/convert.h>
#include <sstream>
--- clasp-3.3.5.orig/libpotassco/tests/test_string_convert.cpp
+++ clasp-3.3.5/libpotassco/tests/test_string_convert.cpp
@@ -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>
--- clasp-3.3.5.orig/libpotassco/tests/test_text.cpp
+++ clasp-3.3.5/libpotassco/tests/test_text.cpp
@@ -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>
--- clasp-3.3.5.orig/libpotassco/tests/test_value.cpp
+++ clasp-3.3.5/libpotassco/tests/test_value.cpp
@@ -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>
--- clasp-3.3.5.orig/tests/clause_creator_test.cpp
+++ clasp-3.3.5/tests/clause_creator_test.cpp
@@ -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;
--- clasp-3.3.5.orig/tests/clause_test.cpp
+++ clasp-3.3.5/tests/clause_test.cpp
@@ -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
--- clasp-3.3.5.orig/tests/cli_test.cpp
+++ clasp-3.3.5/tests/cli_test.cpp
@@ -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;
--- clasp-3.3.5.orig/tests/decision_heuristic_test.cpp
+++ clasp-3.3.5/tests/decision_heuristic_test.cpp
@@ -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;
/////////////////////////////////////////////////////////////////////////////////////////
--- clasp-3.3.5.orig/tests/dependency_graph_test.cpp
+++ clasp-3.3.5/tests/dependency_graph_test.cpp
@@ -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;
--- clasp-3.3.5.orig/tests/dlp_builder_test.cpp
+++ clasp-3.3.5/tests/dlp_builder_test.cpp
@@ -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;
--- clasp-3.3.5.orig/tests/enumerator_test.cpp
+++ clasp-3.3.5/tests/enumerator_test.cpp
@@ -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;
--- clasp-3.3.5.orig/tests/facade_test.cpp
+++ clasp-3.3.5/tests/facade_test.cpp
@@ -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;
--- clasp-3.3.5.orig/tests/literal_test.cpp
+++ clasp-3.3.5/tests/literal_test.cpp
@@ -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) {
--- clasp-3.3.5.orig/tests/minimize_test.cpp
+++ clasp-3.3.5/tests/minimize_test.cpp
@@ -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 {
--- clasp-3.3.5.orig/tests/parser_test.cpp
+++ clasp-3.3.5/tests/parser_test.cpp
@@ -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>
--- clasp-3.3.5.orig/tests/program_builder_test.cpp
+++ clasp-3.3.5/tests/program_builder_test.cpp
@@ -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;
--- clasp-3.3.5.orig/tests/rule_test.cpp
+++ clasp-3.3.5/tests/rule_test.cpp
@@ -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));
--- clasp-3.3.5.orig/tests/satelite_test.cpp
+++ clasp-3.3.5/tests/satelite_test.cpp
@@ -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
--- clasp-3.3.5.orig/tests/solver_test.cpp
+++ clasp-3.3.5/tests/solver_test.cpp
@@ -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 {
--- clasp-3.3.5.orig/tests/test_main.cpp
+++ clasp-3.3.5/tests/test_main.cpp
@@ -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
--- clasp-3.3.5.orig/tests/unfounded_check_test.cpp
+++ clasp-3.3.5/tests/unfounded_check_test.cpp
@@ -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;
--- clasp-3.3.5.orig/tests/weight_constraint_test.cpp
+++ clasp-3.3.5/tests/weight_constraint_test.cpp
@@ -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 {
|