Files
Khem Raj 6ac6d8adbf bcc: Stop baking the build directory into the ptest binaries
tests/cc passes -DCMAKE_CURRENT_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}" to
every test object so the tests can find archive.zip, the debuginfo libraries
and dummy_proc_map.txt at runtime. That put 13 copies of the absolute build
directory into the installed test binary:

  QA Issue: File /usr/lib/bcc/ptest/tests/cc/test_libbcc_no_libbpf in package
  bcc-ptest contains reference to TMPDIR [buildpaths]

and, on autobuilders whose TMPDIR sits below $HOME, additionally:

  QA Issue: ... contains a reference to the build host HOME directory.

The recipe worked around this by installing the assets to ${D}${B}/tests/cc,
i.e. by reproducing the build path inside the image, and by demoting
buildpaths to a warning.

Add a patch introducing a TEST_ASSET_DIR cache variable, defaulting to
CMAKE_CURRENT_BINARY_DIR so the upstream default is unchanged, and point it at
${PTEST_PATH}/tests/cc. The assets are now installed next to the test binaries
and no build path is embedded, so the buildpaths overrides can go away.

Also install dummy_proc_map.txt, which the tests reference but which was never
shipped.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-07-28 22:48:28 -07:00
..