]> code.ossystems Code Review - openembedded-core.git/commitdiff
bb-matrix: Clean before, rather than after, building
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Fri, 6 Sep 2013 16:12:17 +0000 (18:12 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 12 Sep 2013 15:48:38 +0000 (16:48 +0100)
This makes sure the the first build starts from a clean state. Otherwise
one could have the first build affected by any leftover state from
a previous build.

This also leaves a working state behind after the final build.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/contrib/bb-perf/bb-matrix.sh

index 37721fe268b34a1599b6fecfc39f9e54b894dd39..106456584dd66889da2716bffb8e7aa3a9c7deb5 100755 (executable)
@@ -63,6 +63,10 @@ for BB in $BB_RANGE; do
                date
                echo "BB=$BB PM=$PM Logging to $BB_LOG"
 
+               echo -n "  Preparing the work directory... "
+               rm -rf pseudodone tmp sstate-cache tmp-eglibc &> /dev/null
+               echo "done"
+
                # Export the variables under test and run the bitbake command
                # Strip any leading zeroes before passing to bitbake
                export BB_NUMBER_THREADS=$(echo $BB | sed 's/^0*//')
@@ -70,12 +74,6 @@ for BB in $BB_RANGE; do
                /usr/bin/time -f "$BB $PM $TIME_STR" -a -o $RUNTIME_LOG $BB_CMD &> $BB_LOG
 
                echo "  $(tail -n1 $RUNTIME_LOG)"
-               echo -n "  Cleaning up..."
-               mv tmp/buildstats $RUNDIR/$BB-$PM-buildstats
-               rm -f pseudodone &> /dev/null
-               rm -rf tmp &> /dev/null
-               rm -rf sstate-cache &> /dev/null
-               rm -rf tmp-eglibc &> /dev/null
-               echo "done"
+               cp -a tmp/buildstats $RUNDIR/$BB-$PM-buildstats
        done
 done