summaryrefslogtreecommitdiffstats
path: root/scripts/contrib/build-perf-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/contrib/build-perf-test.sh')
-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 0af2cfea0e..8d243f0f30 100755
--- a/scripts/contrib/build-perf-test.sh
+++ b/scripts/contrib/build-perf-test.sh
@@ -112,9 +112,9 @@ if [ $reqpass -ne 0 ]; then
112fi 112fi
113 113
114if [ -n "$commit" ]; then 114if [ -n "$commit" ]; then
115 echo "git checkout $commit" 115 echo "git checkout -f $commit"
116 git pull > /dev/null 2>&1 116 git pull > /dev/null 2>&1
117 git checkout $commit || exit 1 117 git checkout -f $commit || exit 1
118 git pull > /dev/null 2>&1 118 git pull > /dev/null 2>&1
119fi 119fi
120 120
@@ -144,8 +144,9 @@ log () {
144# Config stuff 144# Config stuff
145# 145#
146 146
147rev=$(git rev-parse HEAD) || exit 1 147branch=`git branch 2>&1 | grep "^* " | tr -d "* "`
148log "Git revision is $rev" 148gitcommit=$(git rev-parse HEAD) || exit 1
149log "Running on $branch:$gitcommit"
149 150
150source ./oe-init-build-env $OUTDIR/build >/dev/null || exit 1 151source ./oe-init-build-env $OUTDIR/build >/dev/null || exit 1
151cd $OUTDIR/build 152cd $OUTDIR/build
@@ -175,6 +176,8 @@ echo "CONNECTIVITY_CHECK_URIS =\"\"" >> conf/local.conf
175 176
176declare -a TIMES 177declare -a TIMES
177time_count=0 178time_count=0
179declare -a SIZES
180size_count=0
178 181
179bbtime () { 182bbtime () {
180 log " Timing: bitbake $1" 183 log " Timing: bitbake $1"
@@ -240,10 +243,13 @@ do_sync () {
240} 243}
241 244
242write_results() { 245write_results() {
243 echo -n "`uname -n`,$rev," >> $globalres 246 echo -n "`uname -n`,$branch:$gitcommit,`git describe`," >> $globalres
244 for i in "${TIMES[@]}"; do 247 for i in "${TIMES[@]}"; do
245 echo -n "$i," >> $globalres 248 echo -n "$i," >> $globalres
246 done 249 done
250 for i in "${SIZES[@]}"; do
251 echo -n "$i," >> $globalres
252 done
247 echo >> $globalres 253 echo >> $globalres
248 sed -i '$ s/,$//' $globalres 254 sed -i '$ s/,$//' $globalres
249} 255}
@@ -276,7 +282,9 @@ test1_p1 () {
276 do_rmsstate 282 do_rmsstate
277 do_sync 283 do_sync
278 bbtime "$IMAGE" 284 bbtime "$IMAGE"
279 log "SIZE of tmp dir is: `du -sh tmp | sed 's/tmp//'`" 285 s=`du -sh tmp | sed 's/tmp//'`
286 SIZES[(( size_count++ ))]="$s"
287 log "SIZE of tmp dir is: $s"
280 log "Buildstats are saved in $OUTDIR/buildstats-test1" 288 log "Buildstats are saved in $OUTDIR/buildstats-test1"
281 mv tmp/buildstats $OUTDIR/buildstats-test1 289 mv tmp/buildstats $OUTDIR/buildstats-test1
282} 290}
@@ -297,7 +305,9 @@ test1_p3 () {
297 do_sync 305 do_sync
298 bbtime "$IMAGE" 306 bbtime "$IMAGE"
299 sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf 307 sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf
300 log "SIZE of tmp dir is: `du -sh tmp | sed 's/tmp//'`" 308 s=`du -sh tmp | sed 's/tmp//'`
309 SIZES[(( size_count++ ))]="$s"
310 log "SIZE of tmp dir is: $s"
301 log "Buildstats are saved in $OUTDIR/buildstats-test13" 311 log "Buildstats are saved in $OUTDIR/buildstats-test13"
302 mv tmp/buildstats $OUTDIR/buildstats-test13 312 mv tmp/buildstats $OUTDIR/buildstats-test13
303} 313}