Skip to content

Commit

Permalink
lmp/bb-build: create bitbake_buildchart.svg with the buildstats colle…
Browse files Browse the repository at this point in the history
…cted data

In LmP build we have the buildstats enabled because we use the
INHERIT += "buildstats" but the output is hard to read and understand.
The openembedded-core pybootchartgui scripts can process this logs and
generates some pretty charts.

Signed-off-by: Jose Quaresma <[email protected]>
  • Loading branch information
quaresmajose authored and ricardosalveti committed Aug 2, 2023
1 parent 8eedd0a commit d62f564
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lmp/bb-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ fi
if [ -d "$BUILDSTATS_PATH" ]; then
# get the most recent folder
BUILDSTATS_PATH="$(ls -td -- $BUILDSTATS_PATH/*/ | head -n 1)"
# we need to check that because it can't be available in old containers
if command -v xvfb-run >/dev/null 2>&1 ; then
# producing bootchart.svg
run xvfb-run ../layers/openembedded-core/scripts/pybootchartgui/pybootchartgui.py \
--minutes --format=svg --output=${archive}/bitbake_buildchart $BUILDSTATS_PATH
fi
# write a summary of the buildstats to the terminal
BUILDSTATS_SUMMARY="../layers/openembedded-core/scripts/buildstats-summary"
# we need to check that because it is only available in the kirkstone branch
Expand Down
2 changes: 2 additions & 0 deletions lmp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ chown -R builder .

su builder -c $HERE/bb-config.sh
touch ${archive}/customize-target.log && chown builder ${archive}/customize-target.log
touch ${archive}/bitbake_buildchart.svg && chown builder ${archive}/bitbake_buildchart.svg
touch ${archive}/bitbake_debug.log ${archive}/bitbake_warning.log ${archive}/bitbake_buildstats.log && chown builder ${archive}/bitbake_*.log
touch ${archive}/bitbake_global_env.txt ${archive}/bitbake_image_env.txt && chown builder ${archive}/bitbake_*_env.txt
touch ${archive}/app-preload.log && chown builder ${archive}/app-preload.log
Expand Down Expand Up @@ -134,6 +135,7 @@ if [ -d "${archive}" ] ; then
mv ${archive}/bitbake_debug.log.gz ${archive}/other/
mv ${archive}/bitbake_warning.log ${archive}/other/
mv ${archive}/bitbake_buildstats.log ${archive}/other/
mv ${archive}/bitbake_buildchart.svg ${archive}/other/

# Compress and publish source tarball (for *GPL* packages)
if [ -d ${DEPLOY_DIR_IMAGE}/source-release ]; then
Expand Down

0 comments on commit d62f564

Please sign in to comment.