Only build tests if -Dtests=enabled specified

A meson build option named 'tests' is defined for this repository.  It
indicates whether gtest/gmock tests should be built.

However, some tests are currently always built even if -Dtests=enabled
isn't specified.  This causes build errors in some environments where
gtest and gmock are not available.

Modify meson.build files to only descend into 'test' subdirectories and
build test cases if -Dtests=enabled was specified.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Ic0da2326e3d9c273ff76d54b5ac27cbe00d78876
diff --git a/meson.build b/meson.build
index d44ef75..bc697ff 100644
--- a/meson.build
+++ b/meson.build
@@ -88,5 +88,7 @@
 subdir('power-supply')
 subdir('phosphor-power-supply')
 subdir('tools/power-utils')
-subdir('test')
+if get_option('tests').enabled()
+    subdir('test')
+endif
 subdir('cold-redundancy')