yocto-autobuilder-helper/scripts/collect-results
sakib.sajal@windriver.com bbe9741d01 summarize_top_output.py: add script, use it and publish summary
summarize_top_output.py is used to summarize the top
output that is captured during autobuilder intermittent
failures.

Use the script to summarize the host top output and
publish the summary that is created instead of
the raw logfile.

Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-24 14:24:54 +01:00

978 B
Executable File

#!/bin/bash WORKDIR=$1 DEST=$2 target=$3

RESFILE=$WORKDIR/tmp/log/oeqa/testresults.json

if [ -e $RESFILE ]; then mkdir -p $DEST/$target cp $WORKDIR/tmp/log/oeqa/testresults.json $DEST/$target/ fi

if [ -e $WORKDIR/buildhistory ]; then # ab-fetchrev tag set in buildhistory-init if [ $(git -C $WORKDIR/buildhistory tag -l "ab-fetchrev") ]; then mkdir -p $DEST/$target $WORKDIR/../scripts/buildhistory-diff -p $WORKDIR/buildhistory ab-fetchrev > $DEST/$target/buildhistory.txt fi fi

HSFILE=$WORKDIR/tmp/buildstats/*/host_stats d="intermittent_failure_host_data"

mkdir -p $DEST/$target/$d

step=0 for f in $HSFILE; do if [ -e $f ]; then cp $f $DEST/$target/$d grep -m 1 "^top -" $f if [ $? -eq 0 ]; then mv $DEST/$target/$d/basename $f $DEST/$target/$d/basename $f_${step}top.txt else mv $DEST/$target/$d/basename $f $DEST/$target/$d/basename $f${step}.txt fi step=$((step+1)) fi done