diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-27 06:06:27 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-27 06:06:27 +0000 |
commit | 8d5dbd847cbc704a6a06405856e94b461011afe3 (patch) | |
tree | 4d26462d027b14926335894749d2e01d982234d0 /dev-cpp/prometheus-cpp | |
parent | 5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (diff) |
gentoo resync : 27.03.2021
Diffstat (limited to 'dev-cpp/prometheus-cpp')
-rw-r--r-- | dev-cpp/prometheus-cpp/Manifest | 1 | ||||
-rw-r--r-- | dev-cpp/prometheus-cpp/files/prometheus-cpp-0.9.0-core-Skip-serialization-test-if-locale-is-not-availa.patch | 80 |
2 files changed, 0 insertions, 81 deletions
diff --git a/dev-cpp/prometheus-cpp/Manifest b/dev-cpp/prometheus-cpp/Manifest index 34dcea788437..6a8411785193 100644 --- a/dev-cpp/prometheus-cpp/Manifest +++ b/dev-cpp/prometheus-cpp/Manifest @@ -1,4 +1,3 @@ -AUX prometheus-cpp-0.9.0-core-Skip-serialization-test-if-locale-is-not-availa.patch 2180 BLAKE2B cd864a68def30f4bf64eb56afc2666ebe7e56a645da1df7e143d7874ae36ea8ecc82a2d5f8aeba5939866b67baeb6a457937355d275375c3bd93b1340bf00ac7 SHA512 3f1dbd41a953e897a1e18a97ef239b73ee1a00475d210406ada3b17686ebd52698c125670a217bb2fd75bf43437640426d48d1c5216ed313c2aceee6bc9fed68 DIST prometheus-cpp-0.12.2.tar.gz 55191 BLAKE2B f1430cf6b8ca8272c447e8c2a25af5fb0d515389cb1078f8836a9a1f1ba0e26cc43236e9c147219384df40d601b843219acb95ebc46bb1c2fce6d83a86724182 SHA512 9907658939b7956219c3623bd5997f341f4374fbce2ee606bd1d8df820779ed8dc70658a30aafbb47b9af645205c048270b23e701203e13286bc365094a441d3 EBUILD prometheus-cpp-0.12.2.ebuild 821 BLAKE2B b4a5e9817f4cb65919ad504a6d2bcc53cf41b0cc81bfdda34eaf4b335d6bc9054d7648ebf4a344afc1087239b020f073142994b8ceebc0bf77c9daa1798632e5 SHA512 4377daa3ed659ee16bb0dca9bdce029b5e68650cccce4d4a6eb6b518e8f5bfbf4e08f11779e1a45e0b0c782218b8026b1200302e27459d1b7993f931564760f1 MISC metadata.xml 987 BLAKE2B a3ee76e524e97e6577b2e71d00cd2eb29821f74230d8b8224497565ddf2e80a7358f37a95948caf1dc3a4213f7e96683a54b10836e83a71e6e5caf78d59a8268 SHA512 cfea74c7e5325514dacc13fc86213bc2c6fe758681168099fa1edb5b49503ffa40b83dc10ba6fdcbbbbe502aa064a6445caa7c07c8f1c82fe177dc574dbd75da diff --git a/dev-cpp/prometheus-cpp/files/prometheus-cpp-0.9.0-core-Skip-serialization-test-if-locale-is-not-availa.patch b/dev-cpp/prometheus-cpp/files/prometheus-cpp-0.9.0-core-Skip-serialization-test-if-locale-is-not-availa.patch deleted file mode 100644 index ced0b80e83e9..000000000000 --- a/dev-cpp/prometheus-cpp/files/prometheus-cpp-0.9.0-core-Skip-serialization-test-if-locale-is-not-availa.patch +++ /dev/null @@ -1,80 +0,0 @@ -From bf6e2ce56abe2a710181f0365a21ca2dafd2a8f5 Mon Sep 17 00:00:00 2001 -From: Gregor Jasny <gjasny@googlemail.com> -Date: Fri, 13 Mar 2020 13:16:56 +0100 -Subject: [PATCH] core: Skip serialization test if locale is not available - -Closes: #345 ---- - core/tests/raii_locale.h | 15 +++++++++++++++ - core/tests/serializer_test.cc | 21 ++++++++++++++------- - 2 files changed, 29 insertions(+), 7 deletions(-) - create mode 100644 core/tests/raii_locale.h - -diff --git a/core/tests/raii_locale.h b/core/tests/raii_locale.h -new file mode 100644 -index 0000000..592d74f ---- /dev/null -+++ b/core/tests/raii_locale.h -@@ -0,0 +1,15 @@ -+#pragma once -+ -+#include <locale> -+ -+class RAIILocale { -+ public: -+ RAIILocale(const char* name) : savedLocale_(std::locale::classic()) { -+ std::locale::global(std::locale(name)); -+ } -+ -+ ~RAIILocale() { std::locale::global(savedLocale_); } -+ -+ private: -+ const std::locale savedLocale_; -+}; -diff --git a/core/tests/serializer_test.cc b/core/tests/serializer_test.cc -index f935a3b..6cb8f0e 100644 ---- a/core/tests/serializer_test.cc -+++ b/core/tests/serializer_test.cc -@@ -1,9 +1,13 @@ - #include "prometheus/counter.h" -+#include "prometheus/detail/future_std.h" - #include "prometheus/family.h" - #include "prometheus/text_serializer.h" - -+#include "raii_locale.h" -+ - #include <gmock/gmock.h> --#include <locale> -+ -+#include <memory> - #include <sstream> - - namespace prometheus { -@@ -25,15 +29,18 @@ class SerializerTest : public testing::Test { - - #ifndef _WIN32 - TEST_F(SerializerTest, shouldSerializeLocaleIndependent) { -- // save and change locale -- const std::locale oldLocale = std::locale::classic(); -- std::locale::global(std::locale("de_DE.UTF-8")); -+ std::unique_ptr<RAIILocale> localeWithCommaDecimalSeparator; -+ -+ // ignore missing locale and skip test if setup fails -+ try { -+ localeWithCommaDecimalSeparator = -+ detail::make_unique<RAIILocale>("de_DE.UTF-8"); -+ } catch (std::runtime_error&) { -+ GTEST_SKIP(); -+ } - - const auto serialized = textSerializer.Serialize(collected); - EXPECT_THAT(serialized, testing::HasSubstr("1.0")); -- -- // restore locale -- std::locale::global(oldLocale); - } - #endif - --- -2.28.0 - |