From a8c3fbf0cc322e97d247cb880079cdd8f1842c0e Mon Sep 17 00:00:00 2001 From: FireFly Date: Wed, 9 Apr 2025 17:04:42 +0200 Subject: [PATCH] tests: ignore deprecated uses in rapidcheck There is a pull request [1] addressing these upstream--it doesn't appear likely to be merged anytime soon though... this is a no-op til we enable -Wdeprecated-declarations, but helps in the direction of #744 [1]: https://github.com/emil-e/rapidcheck/pull/325 Change-Id: I27e2c7d81df152de8674696f2a56d5f21c414ce3 --- tests/unit/libexpr-support/tests/value/context.cc | 3 +++ tests/unit/libexpr/attr-path.cc | 3 +++ tests/unit/libexpr/derived-path.cc | 3 +++ tests/unit/libexpr/value/context.cc | 3 +++ tests/unit/libstore-support/tests/derived-path.cc | 3 +++ tests/unit/libstore-support/tests/outputs-spec.cc | 3 +++ tests/unit/libstore-support/tests/outputs-spec.hh | 3 +++ tests/unit/libstore-support/tests/path.cc | 5 ++++- tests/unit/libstore-support/tests/path.hh | 3 +++ tests/unit/libstore/derived-path.cc | 3 +++ tests/unit/libstore/path.cc | 3 +++ tests/unit/libutil-support/tests/hash.cc | 3 +++ tests/unit/libutil/checked-arithmetic.cc | 3 +++ 13 files changed, 40 insertions(+), 1 deletion(-) diff --git a/tests/unit/libexpr-support/tests/value/context.cc b/tests/unit/libexpr-support/tests/value/context.cc index 8658bdaef..662702182 100644 --- a/tests/unit/libexpr-support/tests/value/context.cc +++ b/tests/unit/libexpr-support/tests/value/context.cc @@ -1,4 +1,7 @@ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include +#pragma GCC diagnostic pop #include "tests/path.hh" #include "tests/value/context.hh" diff --git a/tests/unit/libexpr/attr-path.cc b/tests/unit/libexpr/attr-path.cc index 2eb219dbb..cb08480bd 100644 --- a/tests/unit/libexpr/attr-path.cc +++ b/tests/unit/libexpr/attr-path.cc @@ -2,10 +2,13 @@ #include "lix/libexpr/attr-set.hh" #include "tests/libexpr.hh" #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include #include #include #include +#pragma GCC diagnostic pop namespace nix { diff --git a/tests/unit/libexpr/derived-path.cc b/tests/unit/libexpr/derived-path.cc index df2006e23..7257ba410 100644 --- a/tests/unit/libexpr/derived-path.cc +++ b/tests/unit/libexpr/derived-path.cc @@ -1,5 +1,8 @@ #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include +#pragma GCC diagnostic pop #include "tests/derived-path.hh" #include "tests/libexpr.hh" diff --git a/tests/unit/libexpr/value/context.cc b/tests/unit/libexpr/value/context.cc index 864e48a33..7a079972c 100644 --- a/tests/unit/libexpr/value/context.cc +++ b/tests/unit/libexpr/value/context.cc @@ -1,5 +1,8 @@ #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include +#pragma GCC diagnostic pop #include "tests/path.hh" #include "tests/libexpr.hh" diff --git a/tests/unit/libstore-support/tests/derived-path.cc b/tests/unit/libstore-support/tests/derived-path.cc index 091706dba..b8506fb8f 100644 --- a/tests/unit/libstore-support/tests/derived-path.cc +++ b/tests/unit/libstore-support/tests/derived-path.cc @@ -1,6 +1,9 @@ #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include +#pragma GCC diagnostic pop #include "tests/derived-path.hh" diff --git a/tests/unit/libstore-support/tests/outputs-spec.cc b/tests/unit/libstore-support/tests/outputs-spec.cc index e9d602203..fd0ba1178 100644 --- a/tests/unit/libstore-support/tests/outputs-spec.cc +++ b/tests/unit/libstore-support/tests/outputs-spec.cc @@ -1,6 +1,9 @@ #include "tests/outputs-spec.hh" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include +#pragma GCC diagnostic pop namespace rc { using namespace nix; diff --git a/tests/unit/libstore-support/tests/outputs-spec.hh b/tests/unit/libstore-support/tests/outputs-spec.hh index fb8ece7c9..c951d8454 100644 --- a/tests/unit/libstore-support/tests/outputs-spec.hh +++ b/tests/unit/libstore-support/tests/outputs-spec.hh @@ -1,7 +1,10 @@ #pragma once ///@file +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include +#pragma GCC diagnostic pop #include "lix/libstore/outputs-spec.hh" diff --git a/tests/unit/libstore-support/tests/path.cc b/tests/unit/libstore-support/tests/path.cc index 2c448d968..d98b5df0b 100644 --- a/tests/unit/libstore-support/tests/path.cc +++ b/tests/unit/libstore-support/tests/path.cc @@ -1,7 +1,10 @@ -#include #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#include #include +#pragma GCC diagnostic pop #include "lix/libstore/path-regex.hh" #include "lix/libstore/store-api.hh" diff --git a/tests/unit/libstore-support/tests/path.hh b/tests/unit/libstore-support/tests/path.hh index 916d50f0c..08f8d5236 100644 --- a/tests/unit/libstore-support/tests/path.hh +++ b/tests/unit/libstore-support/tests/path.hh @@ -1,7 +1,10 @@ #pragma once ///@file +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include +#pragma GCC diagnostic pop #include "lix/libstore/path.hh" diff --git a/tests/unit/libstore/derived-path.cc b/tests/unit/libstore/derived-path.cc index ffa541e9f..b351def58 100644 --- a/tests/unit/libstore/derived-path.cc +++ b/tests/unit/libstore/derived-path.cc @@ -1,7 +1,10 @@ #include #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include +#pragma GCC diagnostic pop #include "tests/derived-path.hh" #include "tests/libstore.hh" diff --git a/tests/unit/libstore/path.cc b/tests/unit/libstore/path.cc index 25887c858..8bdcb5071 100644 --- a/tests/unit/libstore/path.cc +++ b/tests/unit/libstore/path.cc @@ -1,7 +1,10 @@ #include #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include +#pragma GCC diagnostic pop #include "lix/libstore/path-regex.hh" #include "lix/libstore/store-api.hh" diff --git a/tests/unit/libutil-support/tests/hash.cc b/tests/unit/libutil-support/tests/hash.cc index a06957e4b..1a9033f02 100644 --- a/tests/unit/libutil-support/tests/hash.cc +++ b/tests/unit/libutil-support/tests/hash.cc @@ -1,7 +1,10 @@ // required due to rapidcheck generating an incomplete-return-type error due to // missing include on libc++ on macOS #include // IWYU pragma: keep +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include +#pragma GCC diagnostic pop #include "hash.hh" diff --git a/tests/unit/libutil/checked-arithmetic.cc b/tests/unit/libutil/checked-arithmetic.cc index be6dcfb8f..b6d958234 100644 --- a/tests/unit/libutil/checked-arithmetic.cc +++ b/tests/unit/libutil/checked-arithmetic.cc @@ -1,9 +1,12 @@ #include #include #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include #include #include +#pragma GCC diagnostic pop #include "lix/libutil/checked-arithmetic.hh"