Add argument for errors.hpp to pdmgen.py, fix race

pdmgen.py is now given a "-e" argument to specify where to write
errors.hpp.

Previously it was hardcoded to 'errors.hpp', this could
hit a race where the src/test run of pdmgen.py could overwrite
the actual errors.hpp with an empty file.
That resulted in missing definitions with a compile error such as
...phosphor-dbus-monitor/1.0+gitAUTOINC+413a485715-r1/recipe-sysroot/usr/include/c++/12.1.0/type_traits:1447:38: error: invalid use of incomplete type 'struct sdbusplus::xyz::openbmc_project::Sensor::Threshold::Error::CriticalHigh'

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Change-Id: Ib982631e506ade18c587a3e6552e4109760758ef
diff --git a/src/test/meson.build b/src/test/meson.build
index 40f8406..a1ae8e3 100644
--- a/src/test/meson.build
+++ b/src/test/meson.build
@@ -28,6 +28,7 @@
         '-p', meson.project_source_root() + '/src/test/templates',
         '-d', meson.project_source_root() + '/src/test/yaml/pathgentest',
         '-o', meson.current_build_dir() + '/pathgentest.hpp',
+        '-e', meson.current_build_dir() + '/pathgentest-errors.hpp',
         'generate-cpp'
     ],
     input: [
@@ -62,6 +63,7 @@
         '-p', meson.project_source_root() + '/src/test/templates',
         '-d', meson.project_source_root() + '/src/test/yaml/propertygentest',
         '-o', meson.current_build_dir() + '/propertygentest.hpp',
+        '-e', meson.current_build_dir() + '/propertygentest-errors.hpp',
         'generate-cpp'
     ],
     input: [
@@ -96,6 +98,7 @@
         '-p', meson.project_source_root() + '/src/test/templates',
         '-d', meson.project_source_root() + '/src/test/yaml/propertywatchgentest',
         '-o', meson.current_build_dir() + '/propertywatchgentest.hpp',
+        '-e', meson.current_build_dir() + '/propertywatchgentest-errors.hpp',
         'generate-cpp'
     ],
     input: [
@@ -130,6 +133,7 @@
         '-p', meson.project_source_root() + '/src/test/templates',
         '-d', meson.project_source_root() + '/src/test/yaml/callbackgentest',
         '-o', meson.current_build_dir() + '/callbackgentest.hpp',
+        '-e', meson.current_build_dir() + '/callbackgentest-errors.hpp',
         'generate-cpp'
     ],
     input: [
@@ -164,6 +168,7 @@
         '-p', meson.project_source_root() + '/src/test/templates',
         '-d', meson.project_source_root() + '/src/test/yaml/callbackgroupgentest',
         '-o', meson.current_build_dir() + '/callbackgroupgentest.hpp',
+        '-e', meson.current_build_dir() + '/callbackgroupgentest-errors.hpp',
         'generate-cpp'
     ],
     input: [
@@ -197,6 +202,7 @@
         '-p', meson.project_source_root() + '/src/test/templates',
         '-d', meson.project_source_root() + '/src/test/yaml/conditiongentest',
         '-o', meson.current_build_dir() + '/conditiongentest.hpp',
+        '-e', meson.current_build_dir() + '/conditiongentest-errors.hpp',
         'generate-cpp'
     ],
     input: [
@@ -259,6 +265,7 @@
         '-p', meson.project_source_root() + '/src/test/templates',
         '-d', meson.project_source_root() + '/src/test/yaml/interfaceaddtest',
         '-o', meson.current_build_dir() + '/interfaceaddtest.hpp',
+        '-e', meson.current_build_dir() + '/interfaceaddtest-errors.hpp',
         'generate-cpp'
     ],
     input: [