[PATCH yocto-autobuilder-helper 3/4] collect-results: collect "host_stats" files generated by collect-data template


sakib.sajal@...
 

collect-data template generates host_stats files which are collected.
All files are published, file names are determined by the contents:
- Files that contain "top" output are named host_stats_<number>_top.txt
- host_stats_<number>.txt otherwise

Signed-off-by: Sakib Sajal <sakib.sajal@...>
Signed-off-by: Randy MacLeod <Randy.MacLeod@...>
---
scripts/collect-results | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

diff --git a/scripts/collect-results b/scripts/collect-results
index 5db43fb..7474e36 100755
--- a/scripts/collect-results
+++ b/scripts/collect-results
@@ -17,3 +17,22 @@ if [ -e $WORKDIR/buildhistory ]; then
$WORKDIR/../scripts/buildhistory-diff -p $WORKDIR/buildhistory ab-fetchrev > $DEST/$target/buildhistory.txt
fi
fi
+
+HSFILE=$WORKDIR/tmp/buildstats/*/host_stats
+d=`date +%Y-%m-%d--%H-%M`
+
+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
--
2.25.1

Join yocto@lists.yoctoproject.org to automatically receive all group messages.