]> code.ossystems Code Review - openembedded-core.git/commitdiff
bb-matrix: correct BB and PM number canonicalization
authorDarren Hart <dvhart@linux.intel.com>
Thu, 14 Jul 2011 21:05:42 +0000 (14:05 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Jul 2011 21:22:59 +0000 (22:22 +0100)
The bash string operation ${BB##*0} was greedy and in addition to converting
"02" to "2", also converted "20" to "", causing all builds for a BB value ending
in 0 to run with BB_NUMBER_THREADS=1.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/contrib/bb-perf/bb-matrix.sh

index 64d55137c8db33836d582d2112dcbd29e7081863..b9edd5ff086e23d30046f44326154ff67550a00e 100755 (executable)
@@ -62,8 +62,8 @@ for BB in $BB_RANGE; do
                echo "BB=$BB PM=$PM Logging to $BB_LOG"
 
                # Export the variables under test and run the bitbake command
-               export BB_NUMBER_THREADS="${BB##*0}"
-               export PARALLEL_MAKE="-j ${PM##*0}"
+               export BB_NUMBER_THREADS=$(echo $BB | sed 's/^0*//')
+               export PARALLEL_MAKE="-j $(echo $PM | sed 's/^0*//')"
                /usr/bin/time -f "$BB $PM $TIME_STR" -a -o $RUNTIME_LOG $BB_CMD &> $BB_LOG
                
                echo "  $(tail -n1 $RUNTIME_LOG)"