Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: build/android/buildbot/buildbot_functions.sh

Issue 11175016: Selective build clobbering feature (landmines.py and android build scripts). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Total rewrite :). Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DEPS ('k') | build/gyp_chromium » ('j') | build/gyp_helper.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 # 5 #
6 # Bash functions used by buildbot annotator scripts for the android 6 # Bash functions used by buildbot annotator scripts for the android
7 # build of chromium. Executing this script should not perform actions 7 # build of chromium. Executing this script should not perform actions
8 # other than setting variables and defining of functions. 8 # other than setting variables and defining of functions.
9 9
10 # Number of jobs on the compile line; e.g. make -j"${JOBS}" 10 # Number of jobs on the compile line; e.g. make -j"${JOBS}"
(...skipping 29 matching lines...) Expand all
40 # Basic setup for all bots to run after a source tree checkout. 40 # Basic setup for all bots to run after a source tree checkout.
41 # Args: 41 # Args:
42 # $1: source root. 42 # $1: source root.
43 # $2 and beyond: key value pairs which are parsed by bb_parse_args. 43 # $2 and beyond: key value pairs which are parsed by bb_parse_args.
44 function bb_baseline_setup { 44 function bb_baseline_setup {
45 SRC_ROOT="$1" 45 SRC_ROOT="$1"
46 # Remove SRC_ROOT param 46 # Remove SRC_ROOT param
47 shift 47 shift
48 cd $SRC_ROOT 48 cd $SRC_ROOT
49 49
50 if [[ $BUILDBOT_CLOBBER ]]; then 50 echo "@@@BUILD_STEP Parse args@@@"
51 bb_parse_args "$@"
52
53 local out_path="${SRC_ROOT}/out/${BUILDTYPE}"
54 local trigger_path="$out_path/.landmines_triggered"
55
56 if [[ $BUILDBOT_CLOBBER || -f "$trigger_path" ]]; then
51 echo "@@@BUILD_STEP Clobber@@@" 57 echo "@@@BUILD_STEP Clobber@@@"
58
59 if [[ -f "$trigger_path" ]]; then
60 echo "Clobbering due to triggered landmines: "
61 cat "$trigger_path"
62 fi
63
52 # Sdk key expires, delete android folder. 64 # Sdk key expires, delete android folder.
53 # crbug.com/145860 65 # crbug.com/145860
54 rm -rf ~/.android 66 rm -rf ~/.android
55 rm -rf "${SRC_ROOT}"/out 67 rm -rf "$out_path"
56 if [ -e "${SRC_ROOT}"/out ] ; then 68 if [ -e "$out_path" ] ; then
57 echo "Clobber appeared to fail? ${SRC_ROOT}/out still exists." 69 echo "Clobber appeared to fail? $out_path still exists."
58 echo "@@@STEP_WARNINGS@@@" 70 echo "@@@STEP_WARNINGS@@@"
59 fi 71 fi
60 fi 72 fi
61 73
62 echo "@@@BUILD_STEP Environment setup@@@" 74 echo "@@@BUILD_STEP Environment setup@@@"
63 bb_parse_args "$@"
64 75
65 local BUILDTOOL=$(bb_get_json_prop "$FACTORY_PROPERTIES" buildtool) 76 local BUILDTOOL=$(bb_get_json_prop "$FACTORY_PROPERTIES" buildtool)
66 if [[ $BUILDTOOL = ninja ]]; then 77 if [[ $BUILDTOOL = ninja ]]; then
67 export GYP_GENERATORS=ninja 78 export GYP_GENERATORS=ninja
68 fi 79 fi
69 export GOMA_DIR=/b/build/goma 80 export GOMA_DIR=/b/build/goma
70 . build/android/envsetup.sh 81 . build/android/envsetup.sh
71 adb kill-server 82 adb kill-server
72 } 83 }
73 84
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 ) 310 )
300 } 311 }
301 312
302 # Retrieve a packed json property using python 313 # Retrieve a packed json property using python
303 function bb_get_json_prop { 314 function bb_get_json_prop {
304 local JSON="$1" 315 local JSON="$1"
305 local PROP="$2" 316 local PROP="$2"
306 317
307 python -c "import json; print json.loads('$JSON').get('$PROP', '')" 318 python -c "import json; print json.loads('$JSON').get('$PROP', '')"
308 } 319 }
OLDNEW
« no previous file with comments | « DEPS ('k') | build/gyp_chromium » ('j') | build/gyp_helper.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698