1 # Copyright (C) 2009 The Android Open Source Project
3 # Licensed under the Apache License, Version 2.0 (the 'License');
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an 'AS IS' BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 # Source this file into your environment. Then:
20 # $ golden_builds sdk-sdk generic-eng generic-userdebug dream-eng
22 # will build a set of combos. This might take a while. Then you can
23 # go make changes, and run:
25 # $ check_builds sdk-sdk generic-eng generic-userdebug dream-eng
27 # Go get dinner, and when you get back, there will be a file
28 # test-builds/sizes.html that has a pretty chart of which files are
29 # in which tree, and how big they are. In that chart, cells for files
30 # that are missing are red, and rows where the file sizes are not all
31 # the same will be blue.
34 TEST_BUILD_DIR=test-builds
42 rm -rf $TEST_BUILD_DIR/$PREFIX-$1
43 make PRODUCT-$(echo $1 | sed "s/-.*//" )-installclean
44 make -j16 PRODUCT-$1 dist DIST_DIR=$TEST_BUILD_DIR/$PREFIX-$1
45 if [ $? -ne 0 ] ; then
53 function golden_builds
55 rm -rf $TEST_BUILD_DIR/golden-* $TEST_BUILD_DIR/dist-*
59 function compare_builds
64 inputs="$inputs $TEST_BUILD_DIR/golden-$1/installed-files.txt"
65 inputs="$inputs $TEST_BUILD_DIR/dist-$1/installed-files.txt"
68 build/tools/compare_fileslist.py $inputs > $TEST_BUILD_DIR/sizes.html
73 rm -rf $TEST_BUILD_DIR/dist-*
83 diff $TEST_BUILD_DIR/golden-$1/installed-files.txt $TEST_BUILD_DIR/dist-$1/installed-files.txt &> /dev/null
85 echo =========== $1 ===========
86 diff $TEST_BUILD_DIR/golden-$1/installed-files.txt $TEST_BUILD_DIR/dist-$1/installed-files.txt
90 build/tools/compare_fileslist.py $inputs > $TEST_BUILD_DIR/sizes.html