meson support: create meson.build files
This commit contains the meson.build files necessary to build the
project and unit tests. The normal procedure is to run the command
'meson build' followed by ninja -C build. Additionally, service files
are copied to remove autoconf-style naming convention (they cannot be
removed before autoconf files are removed).
Signed-off-by: Mike Capps <mikepcapps@gmail.com>
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6cf8f5c1c923a198ad2fb4638843645479fd0498
diff --git a/presence/test/fallbacktest.cpp b/presence/test/fallbacktest.cpp
index daa0b50..de4a54d 100644
--- a/presence/test/fallbacktest.cpp
+++ b/presence/test/fallbacktest.cpp
@@ -15,7 +15,7 @@
{
namespace presence
{
-void setPresence(const Fan& fan, bool newState)
+void setPresence(const Fan&, bool newState)
{
if (newState)
{
@@ -68,7 +68,7 @@
// Validate a single sensor.
// Validate on->off->on.
pstate = -1;
- Fan fan{"/path", "name"};
+ Fan fan{"/path", "name", 0};
TestSensor ts;
ts._present = true;
std::vector<std::reference_wrapper<PresenceSensor>> sensors{ts};
@@ -99,7 +99,7 @@
// Validate both sensors on->off->on
pstate = -1;
- Fan fan{"/path", "name"};
+ Fan fan{"/path", "name", 0};
TestSensor ts1, ts2;
ts1._present = true;
ts2._present = true;
diff --git a/presence/test/meson.build b/presence/test/meson.build
new file mode 100644
index 0000000..15de777
--- /dev/null
+++ b/presence/test/meson.build
@@ -0,0 +1,20 @@
+
+test_include_directories = include_directories(
+ '../..'
+)
+
+test_deps=[
+ gmock_dep,
+ gtest_dep,
+]
+
+test(
+ 'logger_test',
+ executable(
+ 'logger_test',
+ 'fallbacktest.cpp',
+ dependencies:test_deps,
+ implicit_include_directories: false,
+ include_directories: [test_include_directories]
+ )
+)