summaryrefslogtreecommitdiff
path: root/test/utils/test_env.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-09-12 14:39:05 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-09-13 14:41:00 +0200
commitd0d5921cf92ea15464f9ff4856c34b026a30ffb0 (patch)
tree1593302ecd9ef1d5274a55e50fd3e4f5a8f60179 /test/utils/test_env.hpp
parent5fb67de531fead44123ff30ee5cf37340fc63a0b (diff)
downloadjustbuild-d0d5921cf92ea15464f9ff4856c34b026a30ffb0.tar.gz
Remove Compatibility flag from tests
Diffstat (limited to 'test/utils/test_env.hpp')
-rw-r--r--test/utils/test_env.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/utils/test_env.hpp b/test/utils/test_env.hpp
index fc6ac739..ec03a9ee 100644
--- a/test/utils/test_env.hpp
+++ b/test/utils/test_env.hpp
@@ -40,10 +40,12 @@
return properties;
}
-static inline void ReadCompatibilityFromEnv() {
- auto* compatible = std::getenv("COMPATIBLE");
- if (compatible != nullptr) {
- ProtocolTraits::Instance().SetCompatible();
+[[nodiscard]] static inline auto ReadCompatibilityFromEnv() noexcept
+ -> std::optional<bool> {
+ try {
+ return std::getenv("COMPATIBLE") != nullptr;
+ } catch (...) {
+ return std::nullopt;
}
}