summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2013-06-12 18:07:19 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-13 17:38:10 +0100
commitb7308e7814a9a3c7dee2477acca7e4b7a176cc1d (patch)
treeb98ddd5baa325bfc3565418989c504bb66a638df /scripts
parent9d39cdc28baf8e689ce69803deefc343d3117101 (diff)
downloadast2050-yocto-poky-b7308e7814a9a3c7dee2477acca7e4b7a176cc1d.zip
ast2050-yocto-poky-b7308e7814a9a3c7dee2477acca7e4b7a176cc1d.tar.gz
scripts/contrib/build-perf-test.sh: add branch name and sizes to results
Be more descriptive about the revision we are running on in the global results file: add branch:commit and git describe fields. Also add the sizes for tmp dir not only times. (previously these were only available in the output.log) (From OE-Core rev: 769a2c8ce797ee3afa39ab0fe9d9206a60cc4ba1) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/contrib/build-perf-test.sh24
1 files changed, 17 insertions, 7 deletions
diff --git a/scripts/contrib/build-perf-test.sh b/scripts/contrib/build-perf-test.sh
index 0af2cfe..8d243f0 100755
--- a/scripts/contrib/build-perf-test.sh
+++ b/scripts/contrib/build-perf-test.sh
@@ -112,9 +112,9 @@ if [ $reqpass -ne 0 ]; then
fi
if [ -n "$commit" ]; then
- echo "git checkout $commit"
+ echo "git checkout -f $commit"
git pull > /dev/null 2>&1
- git checkout $commit || exit 1
+ git checkout -f $commit || exit 1
git pull > /dev/null 2>&1
fi
@@ -144,8 +144,9 @@ log () {
# Config stuff
#
-rev=$(git rev-parse HEAD) || exit 1
-log "Git revision is $rev"
+branch=`git branch 2>&1 | grep "^* " | tr -d "* "`
+gitcommit=$(git rev-parse HEAD) || exit 1
+log "Running on $branch:$gitcommit"
source ./oe-init-build-env $OUTDIR/build >/dev/null || exit 1
cd $OUTDIR/build
@@ -175,6 +176,8 @@ echo "CONNECTIVITY_CHECK_URIS =\"\"" >> conf/local.conf
declare -a TIMES
time_count=0
+declare -a SIZES
+size_count=0
bbtime () {
log " Timing: bitbake $1"
@@ -240,10 +243,13 @@ do_sync () {
}
write_results() {
- echo -n "`uname -n`,$rev," >> $globalres
+ echo -n "`uname -n`,$branch:$gitcommit,`git describe`," >> $globalres
for i in "${TIMES[@]}"; do
echo -n "$i," >> $globalres
done
+ for i in "${SIZES[@]}"; do
+ echo -n "$i," >> $globalres
+ done
echo >> $globalres
sed -i '$ s/,$//' $globalres
}
@@ -276,7 +282,9 @@ test1_p1 () {
do_rmsstate
do_sync
bbtime "$IMAGE"
- log "SIZE of tmp dir is: `du -sh tmp | sed 's/tmp//'`"
+ s=`du -sh tmp | sed 's/tmp//'`
+ SIZES[(( size_count++ ))]="$s"
+ log "SIZE of tmp dir is: $s"
log "Buildstats are saved in $OUTDIR/buildstats-test1"
mv tmp/buildstats $OUTDIR/buildstats-test1
}
@@ -297,7 +305,9 @@ test1_p3 () {
do_sync
bbtime "$IMAGE"
sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf
- log "SIZE of tmp dir is: `du -sh tmp | sed 's/tmp//'`"
+ s=`du -sh tmp | sed 's/tmp//'`
+ SIZES[(( size_count++ ))]="$s"
+ log "SIZE of tmp dir is: $s"
log "Buildstats are saved in $OUTDIR/buildstats-test13"
mv tmp/buildstats $OUTDIR/buildstats-test13
}
OpenPOWER on IntegriCloud