Add optional do_report task for ibm-logging
This task will generate a single JSON file containing all of
the errors across all of the *.errors.yaml files.
It also compares this error list to the errors in the policy
table and shows which errors are in one but are missing in
the other.
Change-Id: Ic81b4625bf66bd603f15e5a647857b41fec12a52
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/logging/ibm-logging.bb b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/logging/ibm-logging.bb
index 9c8a3db..2945688 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/logging/ibm-logging.bb
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/logging/ibm-logging.bb
@@ -9,8 +9,10 @@
inherit autotools
inherit pkgconfig
+inherit pythonnative
inherit obmc-phosphor-dbus-service
inherit obmc-phosphor-systemd
+inherit phosphor-dbus-yaml
DEPENDS += " \
ibm-dbus-interfaces \
@@ -50,3 +52,28 @@
-p ${WORKDIR}/policyTable.json \
-c ${D}/${datadir}/ibm-logging/policy.json
}
+
+#An optional task to generate a report on all of the errors
+#created by OpenBMC, and compare these errors to what is
+#in the error policy table
+do_report(){
+
+ ${S}/create_error_reports.py \
+ -p ${D}/${datadir}/ibm-logging/policy.json \
+ -y ${STAGING_DIR_NATIVE}${yaml_dir} \
+ -e ${WORKDIR}/build/all_errors.json \
+ -x ${WORKDIR}/build/policy_crosscheck.txt
+
+}
+
+addtask report
+
+#Collect all of the error YAML files into our recipe-sysroot-native dir.
+do_report[depends] = " \
+ ibm-logging:do_install \
+ phosphor-logging-error-logs-native:do_populate_sysroot \
+ phosphor-dbus-interfaces-native:do_populate_sysroot \
+ openpower-dbus-interfaces-native:do_populate_sysroot \
+ openpower-occ-control-native:do_populate_sysroot \
+ openpower-debug-collector-native:do_populate_sysroot \
+ "