build: meson support for unit tests
Add support for building and running existing unit tests
under meson.
Fix a few test case failures that might surface from running
as non-root or without a full OpenBMC set of applications.
Fixes: openbmc/phosphor-logging#11
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I588c0b7d8dcdc60b9a03fee0b5d373d0023b0530
diff --git a/extensions.cpp b/extensions.cpp
index ffeb059..fa68789 100644
--- a/extensions.cpp
+++ b/extensions.cpp
@@ -1,5 +1,9 @@
#include "extensions.hpp"
+// The 'extensions_test' testcase needs to define these itself.
+// Skip over the definition to avoid duplicate symbol definitions.
+#ifndef TESTCASE_extensions_test
+
namespace phosphor
{
namespace logging
@@ -14,3 +18,5 @@
} // namespace logging
} // namespace phosphor
+
+#endif