summaryrefslogtreecommitdiffstats
path: root/scripts/contrib
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2013-06-12 18:07:20 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-13 17:38:10 +0100
commit30d3c8d11e0c81a22a422346fe8c11ef37f2f33f (patch)
tree319a131e329e03fa2a50ee59e6376362936ba6f2 /scripts/contrib
parentb7308e7814a9a3c7dee2477acca7e4b7a176cc1d (diff)
downloadpoky-30d3c8d11e0c81a22a422346fe8c11ef37f2f33f.tar.gz
scripts/contrib/build-perf-test.sh: fix passing arguments
Don't pass arguments to bitbake as a single one, because this will break when the bitbake double-exec is removed. (From OE-Core rev: db13f10d233873148156880ab709ec76f8d3c329) 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/contrib')
-rwxr-xr-xscripts/contrib/build-perf-test.sh36
1 files changed, 19 insertions, 17 deletions
diff --git a/scripts/contrib/build-perf-test.sh b/scripts/contrib/build-perf-test.sh
index 8d243f0f30..ce0fb9afd8 100755
--- a/scripts/contrib/build-perf-test.sh
+++ b/scripts/contrib/build-perf-test.sh
@@ -180,12 +180,13 @@ declare -a SIZES
180size_count=0 180size_count=0
181 181
182bbtime () { 182bbtime () {
183 log " Timing: bitbake $1" 183 local arg="$@"
184 log " Timing: bitbake ${arg}"
184 185
185 if [ $verbose -eq 0 ]; then 186 if [ $verbose -eq 0 ]; then
186 /usr/bin/time -v -o $resultsfile bitbake "$1" >> $bboutput 187 /usr/bin/time -v -o $resultsfile bitbake ${arg} >> $bboutput
187 else 188 else
188 /usr/bin/time -v -o $resultsfile bitbake "$1" 189 /usr/bin/time -v -o $resultsfile bitbake ${arg}
189 fi 190 fi
190 ret=$? 191 ret=$?
191 if [ $ret -eq 0 ]; then 192 if [ $ret -eq 0 ]; then
@@ -206,18 +207,19 @@ bbtime () {
206 207
207#we don't time bitbake here 208#we don't time bitbake here
208bbnotime () { 209bbnotime () {
209 log " Running: bitbake $1" 210 local arg="$@"
211 log " Running: bitbake ${arg}"
210 if [ $verbose -eq 0 ]; then 212 if [ $verbose -eq 0 ]; then
211 bitbake "$1" >> $bboutput 213 bitbake ${arg} >> $bboutput
212 else 214 else
213 bitbake "$1" 215 bitbake ${arg}
214 fi 216 fi
215 ret=$? 217 ret=$?
216 if [ $ret -eq 0 ]; then 218 if [ $ret -eq 0 ]; then
217 log " Finished bitbake $1" 219 log " Finished bitbake ${arg}"
218 else 220 else
219 log "ERROR: exit status was non-zero. Exit.." 221 log "ERROR: exit status was non-zero. Exit.."
220 exit $? 222 exit $ret
221 fi 223 fi
222 224
223} 225}
@@ -277,11 +279,11 @@ write_results() {
277 279
278test1_p1 () { 280test1_p1 () {
279 log "Running Test 1, part 1/3: Measure wall clock of bitbake $IMAGE and size of tmp/ dir" 281 log "Running Test 1, part 1/3: Measure wall clock of bitbake $IMAGE and size of tmp/ dir"
280 bbnotime "$IMAGE -c fetchall" 282 bbnotime $IMAGE -c fetchall
281 do_rmtmp 283 do_rmtmp
282 do_rmsstate 284 do_rmsstate
283 do_sync 285 do_sync
284 bbtime "$IMAGE" 286 bbtime $IMAGE
285 s=`du -sh tmp | sed 's/tmp//'` 287 s=`du -sh tmp | sed 's/tmp//'`
286 SIZES[(( size_count++ ))]="$s" 288 SIZES[(( size_count++ ))]="$s"
287 log "SIZE of tmp dir is: $s" 289 log "SIZE of tmp dir is: $s"
@@ -292,9 +294,9 @@ test1_p1 () {
292 294
293test1_p2 () { 295test1_p2 () {
294 log "Running Test 1, part 2/3: bitbake virtual/kernel -c cleansstate and time bitbake virtual/kernel" 296 log "Running Test 1, part 2/3: bitbake virtual/kernel -c cleansstate and time bitbake virtual/kernel"
295 bbnotime "virtual/kernel -c cleansstate" 297 bbnotime virtual/kernel -c cleansstate
296 do_sync 298 do_sync
297 bbtime "virtual/kernel" 299 bbtime virtual/kernel
298} 300}
299 301
300test1_p3 () { 302test1_p3 () {
@@ -303,7 +305,7 @@ test1_p3 () {
303 do_rmtmp 305 do_rmtmp
304 do_rmsstate 306 do_rmsstate
305 do_sync 307 do_sync
306 bbtime "$IMAGE" 308 bbtime $IMAGE
307 sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf 309 sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf
308 s=`du -sh tmp | sed 's/tmp//'` 310 s=`du -sh tmp | sed 's/tmp//'`
309 SIZES[(( size_count++ ))]="$s" 311 SIZES[(( size_count++ ))]="$s"
@@ -323,7 +325,7 @@ test2 () {
323 log "Running Test 2: Measure wall clock of bitbake $IMAGE -c rootfs with sstate" 325 log "Running Test 2: Measure wall clock of bitbake $IMAGE -c rootfs with sstate"
324 do_rmtmp 326 do_rmtmp
325 do_sync 327 do_sync
326 bbtime "$IMAGE -c rootfs" 328 bbtime $IMAGE -c rootfs
327} 329}
328 330
329 331
@@ -340,11 +342,11 @@ test3 () {
340 log "Running Test 3: Parsing time metrics (bitbake -p)" 342 log "Running Test 3: Parsing time metrics (bitbake -p)"
341 log " Removing tmp/cache && cache" 343 log " Removing tmp/cache && cache"
342 rm -rf tmp/cache cache 344 rm -rf tmp/cache cache
343 bbtime "-p" 345 bbtime -p
344 log " Removing tmp/cache/default-eglibc/" 346 log " Removing tmp/cache/default-eglibc/"
345 rm -rf tmp/cache/default-eglibc/ 347 rm -rf tmp/cache/default-eglibc/
346 bbtime "-p" 348 bbtime -p
347 bbtime "-p" 349 bbtime -p
348} 350}
349 351
350 352