test: unit test parse_led.py

Providing a test for parse_led.py since it was refactored.

Testing that various keys in the yaml are available in the cpp literal.

Change-Id: I94d03eb2a4d2bd3129971c4acbe75edd74449ed4
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/test/meson.build b/test/meson.build
index ae1b8e6..010f7f4 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -19,15 +19,37 @@
   endif
 endif
 
+test_yamls = [
+  'test-group-priority',
+  'test-led-priority'
+]
+
 test_sources = [
   '../manager/manager.cpp',
-  '../utils.cpp'
+  '../utils.cpp',
 ]
 
+foreach yaml : test_yamls
+  gen_hpp = custom_target(
+    yaml + '.hpp',
+    command : [
+        prog_python,
+        meson.project_source_root() + '/scripts/parse_led.py',
+        '--filename', meson.project_source_root() + '/test/config/' + yaml + '.yaml',
+        '-o', meson.current_build_dir(),
+        '--output-filename', yaml + '.hpp'
+    ],
+    output : yaml + '.hpp')
+
+  test_sources += [ gen_hpp ]
+endforeach
+
 tests = [
   'utest.cpp',
   'utest-led-json.cpp',
   'utest-group-priority.cpp',
+  'utest-led-yaml-group-priority.cpp',
+  'utest-led-yaml-led-priority.cpp',
 ]
 if get_option('persistent-led-asserted').allowed()
   test_sources += [