H A D | meson.build | diff 47c773420ce1bc961ae020c05084a4115e89b38e Wed Jul 07 20:27:58 CDT 2021 Tim Lee <timlee660101@gmail.com> build: meson fix python command parameter
Symptom: Callout related test items got failed when running test test_association.robot
Root cause: According content get from /xyz/openbmc_project/logging/entry/1. We found that "Associations" data content doesn't include "callout" property. And "AdditionalData" data content doesn't add "CALLOUT_DEVICE_PATH_TEST" association correctly. Then cause test_association.robot got failed.
https://10.103.152.249/xyz/openbmc_project/logging/entry/1 "data": { "AdditionalData": [ "_PID=1858", ], "Associations": [],
Before using meson build for phosphor-logging, we didn't meet this issue. We found g_errMetaMap didn't include below mapping in build\elog-lookup.cpp {"example.xyz.openbmc_project.Example.Device.Callout", {"CALLOUT_ERRNO_TEST","CALLOUT_DEVICE_PATH_TEST"}},
Also found meta didn't include below mapping in build\elog-process-metadata.cpp {"CALLOUT_DEVICE_PATH_TEST", metadata::associations::build <example::xyz::openbmc_project::Example::Device:: Callout::CALLOUT_DEVICE_PATH_TEST>},
The problem is cause by meson.build python wrong parameter Then cause python cannot find example yaml file location to generate correct mapping in elog-lookup.cpp and elog-process-metadata.cpp
Solution: Fix python command parameter '-u' with 'tools/' instead of '../tools/' in meson.build about generating elog-lookup.cpp and elog-process-metadata.cpp command: [ python_prog, '@input0@', '-t', '', '-m', '@input1@', '-y', yamldir, '-u', meson.current_source_dir() / 'tools/', '-o', '@OUTPUT0@', ],
Tested: Verified content of https://10.103.152.249/xyz/openbmc_project/logging/entry/1 with correct "Associations" and "AdditionalData" as below: "AdditionalData": [ "_PID=1070", "CALLOUT_DEVICE_PATH_TEST=/sys/devices/platform/ahb/ahb:apb/f0082000.i2c/..", "CALLOUT_ERRNO_TEST=0", "DEV_ADDR=0x0DEADEAD" ], "Associations": [ "callout", "fault", "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" ]
And run robot test PASS at below related test items robot -t Create Test Error Callout And Verify robot -t Create Test Error Callout And Verify AdditionalData robot -t Create Test Error Callout And Verify Associations robot -t Create Test Error Callout And Delete
Signed-off-by: Tim Lee <timlee660101@gmail.com> Change-Id: If8e8a133ae8becac32c260b66e5d2d21887a2886
|