summaryrefslogtreecommitdiffstats
path: root/scripts
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
parentb7308e7814a9a3c7dee2477acca7e4b7a176cc1d (diff)
downloadast2050-yocto-poky-30d3c8d11e0c81a22a422346fe8c11ef37f2f33f.zip
ast2050-yocto-poky-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')
-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 8d243f0..ce0fb9a 100755
--- a/scripts/contrib/build-perf-test.sh
+++ b/scripts/contrib/build-perf-test.sh
@@ -180,12 +180,13 @@ declare -a SIZES
size_count=0
bbtime () {
- log " Timing: bitbake $1"
+ local arg="$@"
+ log " Timing: bitbake ${arg}"
if [ $verbose -eq 0 ]; then
- /usr/bin/time -v -o $resultsfile bitbake "$1" >> $bboutput
+ /usr/bin/time -v -o $resultsfile bitbake ${arg} >> $bboutput
else
- /usr/bin/time -v -o $resultsfile bitbake "$1"
+ /usr/bin/time -v -o $resultsfile bitbake ${arg}
fi
ret=$?
if [ $ret -eq 0 ]; then
@@ -206,18 +207,19 @@ bbtime () {
#we don't time bitbake here
bbnotime () {
- log " Running: bitbake $1"
+ local arg="$@"
+ log " Running: bitbake ${arg}"
if [ $verbose -eq 0 ]; then
- bitbake "$1" >> $bboutput
+ bitbake ${arg} >> $bboutput
else
- bitbake "$1"
+ bitbake ${arg}
fi
ret=$?
if [ $ret -eq 0 ]; then
- log " Finished bitbake $1"
+ log " Finished bitbake ${arg}"
else
log "ERROR: exit status was non-zero. Exit.."
- exit $?
+ exit $ret
fi
}
@@ -277,11 +279,11 @@ write_results() {
test1_p1 () {
log "Running Test 1, part 1/3: Measure wall clock of bitbake $IMAGE and size of tmp/ dir"
- bbnotime "$IMAGE -c fetchall"
+ bbnotime $IMAGE -c fetchall
do_rmtmp
do_rmsstate
do_sync
- bbtime "$IMAGE"
+ bbtime $IMAGE
s=`du -sh tmp | sed 's/tmp//'`
SIZES[(( size_count++ ))]="$s"
log "SIZE of tmp dir is: $s"
@@ -292,9 +294,9 @@ test1_p1 () {
test1_p2 () {
log "Running Test 1, part 2/3: bitbake virtual/kernel -c cleansstate and time bitbake virtual/kernel"
- bbnotime "virtual/kernel -c cleansstate"
+ bbnotime virtual/kernel -c cleansstate
do_sync
- bbtime "virtual/kernel"
+ bbtime virtual/kernel
}
test1_p3 () {
@@ -303,7 +305,7 @@ test1_p3 () {
do_rmtmp
do_rmsstate
do_sync
- bbtime "$IMAGE"
+ bbtime $IMAGE
sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf
s=`du -sh tmp | sed 's/tmp//'`
SIZES[(( size_count++ ))]="$s"
@@ -323,7 +325,7 @@ test2 () {
log "Running Test 2: Measure wall clock of bitbake $IMAGE -c rootfs with sstate"
do_rmtmp
do_sync
- bbtime "$IMAGE -c rootfs"
+ bbtime $IMAGE -c rootfs
}
@@ -340,11 +342,11 @@ test3 () {
log "Running Test 3: Parsing time metrics (bitbake -p)"
log " Removing tmp/cache && cache"
rm -rf tmp/cache cache
- bbtime "-p"
+ bbtime -p
log " Removing tmp/cache/default-eglibc/"
rm -rf tmp/cache/default-eglibc/
- bbtime "-p"
- bbtime "-p"
+ bbtime -p
+ bbtime -p
}
OpenPOWER on IntegriCloud