diff options
Diffstat (limited to 'scripts/contrib/build-perf-test.sh')
-rwxr-xr-x | scripts/contrib/build-perf-test.sh | 24 |
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 | |||
112 | fi | 112 | fi |
113 | 113 | ||
114 | if [ -n "$commit" ]; then | 114 | if [ -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 |
119 | fi | 119 | fi |
120 | 120 | ||
@@ -144,8 +144,9 @@ log () { | |||
144 | # Config stuff | 144 | # Config stuff |
145 | # | 145 | # |
146 | 146 | ||
147 | rev=$(git rev-parse HEAD) || exit 1 | 147 | branch=`git branch 2>&1 | grep "^* " | tr -d "* "` |
148 | log "Git revision is $rev" | 148 | gitcommit=$(git rev-parse HEAD) || exit 1 |
149 | log "Running on $branch:$gitcommit" | ||
149 | 150 | ||
150 | source ./oe-init-build-env $OUTDIR/build >/dev/null || exit 1 | 151 | source ./oe-init-build-env $OUTDIR/build >/dev/null || exit 1 |
151 | cd $OUTDIR/build | 152 | cd $OUTDIR/build |
@@ -175,6 +176,8 @@ echo "CONNECTIVITY_CHECK_URIS =\"\"" >> conf/local.conf | |||
175 | 176 | ||
176 | declare -a TIMES | 177 | declare -a TIMES |
177 | time_count=0 | 178 | time_count=0 |
179 | declare -a SIZES | ||
180 | size_count=0 | ||
178 | 181 | ||
179 | bbtime () { | 182 | bbtime () { |
180 | log " Timing: bitbake $1" | 183 | log " Timing: bitbake $1" |
@@ -240,10 +243,13 @@ do_sync () { | |||
240 | } | 243 | } |
241 | 244 | ||
242 | write_results() { | 245 | write_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 | } |