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

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

Issue 10829005: Add android device status check and misc cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 function bb_run_gclient_hooks { 66 function bb_run_gclient_hooks {
67 echo "@@@BUILD_STEP runhooks android@@@" 67 echo "@@@BUILD_STEP runhooks android@@@"
68 gclient runhooks 68 gclient runhooks
69 } 69 }
70 70
71 # Basic setup for all bots to run after a source tree checkout. 71 # Basic setup for all bots to run after a source tree checkout.
72 # Args: 72 # Args:
73 # $1: source root. 73 # $1: source root.
74 # $2 and beyond: key value pairs which are parsed by bb_parse_args. 74 # $2 and beyond: key value pairs which are parsed by bb_parse_args.
75 function bb_baseline_setup { 75 function bb_baseline_setup {
76 echo "@@@BUILD_STEP cd into source root@@@" 76 echo "@@@BUILD_STEP Environment setup@@@"
77 SRC_ROOT="$1" 77 SRC_ROOT="$1"
78 # Remove SRC_ROOT param 78 # Remove SRC_ROOT param
79 shift 79 shift
80 80
81 bb_parse_args "$@" 81 bb_parse_args "$@"
82 82
83 if [ ! -d "${SRC_ROOT}" ] ; then 83 if [ ! -d "${SRC_ROOT}" ] ; then
84 echo "Please specify a valid source root directory as an arg" 84 echo "Please specify a valid source root directory as an arg"
85 echo '@@@STEP_FAILURE@@@' 85 echo '@@@STEP_FAILURE@@@'
86 return 1 86 return 1
87 fi 87 fi
88 cd $SRC_ROOT 88 cd $SRC_ROOT
89 89
90 if [ ! -f build/android/envsetup.sh ] ; then 90 if [ ! -f build/android/envsetup.sh ] ; then
91 echo "No envsetup.sh" 91 echo "No envsetup.sh"
92 echo "@@@STEP_FAILURE@@@" 92 echo "@@@STEP_FAILURE@@@"
93 return 1 93 return 1
94 fi 94 fi
95 95
96 echo "@@@BUILD_STEP Basic setup@@@"
97 bb_setup_environment 96 bb_setup_environment
98 97
99 for mandatory_directory in $(dirname "${ANDROID_SDK_ROOT}") \ 98 for mandatory_directory in $(dirname "${ANDROID_SDK_ROOT}") \
100 $(dirname "${ANDROID_NDK_ROOT}") ; do 99 $(dirname "${ANDROID_NDK_ROOT}") ; do
101 if [[ ! -d "${mandatory_directory}" ]]; then 100 if [[ ! -d "${mandatory_directory}" ]]; then
102 echo "Directory ${mandatory_directory} does not exist." 101 echo "Directory ${mandatory_directory} does not exist."
103 echo "Build cannot continue." 102 echo "Build cannot continue."
104 echo "@@@STEP_FAILURE@@@" 103 echo "@@@STEP_FAILURE@@@"
105 return 1 104 return 1
106 fi 105 fi
107 done 106 done
108 107
109 if [ ! "$BUILDBOT_CLOBBER" = "" ]; then 108 if [ ! "$BUILDBOT_CLOBBER" = "" ]; then
110 NEED_CLOBBER=1 109 NEED_CLOBBER=1
111 fi 110 fi
112 111
113 # Setting up a new bot? Must do this before envsetup.sh 112 # Setting up a new bot? Must do this before envsetup.sh
114 if [ ! -d "${ANDROID_NDK_ROOT}" ] ; then 113 if [ ! -d "${ANDROID_NDK_ROOT}" ] ; then
115 bb_install_build_deps $SRC_ROOT 114 bb_install_build_deps $SRC_ROOT
116 fi 115 fi
117 116
118 echo "@@@BUILD_STEP Configure with envsetup.sh@@@"
119 . build/android/envsetup.sh 117 . build/android/envsetup.sh
120 118
121 if [ "$NEED_CLOBBER" -eq 1 ]; then 119 if [ "$NEED_CLOBBER" -eq 1 ]; then
122 echo "@@@BUILD_STEP Clobber@@@" 120 echo "@@@BUILD_STEP Clobber@@@"
123 rm -rf "${SRC_ROOT}"/out 121 rm -rf "${SRC_ROOT}"/out
124 if [ -e "${SRC_ROOT}"/out ] ; then 122 if [ -e "${SRC_ROOT}"/out ] ; then
125 echo "Clobber appeared to fail? ${SRC_ROOT}/out still exists." 123 echo "Clobber appeared to fail? ${SRC_ROOT}/out still exists."
126 echo "@@@STEP_WARNINGS@@@" 124 echo "@@@STEP_WARNINGS@@@"
127 fi 125 fi
128 fi 126 fi
129 127
130 # Should be called only after envsetup is done. 128 # Should be called only after envsetup is done.
131 bb_run_gclient_hooks 129 bb_run_gclient_hooks
130
131 python build/android/device_status_check.py
132 } 132 }
133 133
134 134
135 # Setup goma. Used internally to buildbot_functions.sh. 135 # Setup goma. Used internally to buildbot_functions.sh.
136 function bb_setup_goma_internal { 136 function bb_setup_goma_internal {
137 137
138 # Quick bail if I messed things up and can't wait for the CQ to 138 # Quick bail if I messed things up and can't wait for the CQ to
139 # flush out. 139 # flush out.
140 # TODO(jrg): remove this condition when things are 140 # TODO(jrg): remove this condition when things are
141 # proven stable (4/1/12 or so). 141 # proven stable (4/1/12 or so).
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 --factory-properties "$FACTORY_PROPERTIES" \ 293 --factory-properties "$FACTORY_PROPERTIES" \
294 --build-properties "$BUILD_PROPERTIES" 294 --build-properties "$BUILD_PROPERTIES"
295 extract_exitcode=$? 295 extract_exitcode=$?
296 if (( $extract_exitcode > 1 )); then 296 if (( $extract_exitcode > 1 )); then
297 echo "@@@STEP_WARNINGS@@@" 297 echo "@@@STEP_WARNINGS@@@"
298 return 298 return
299 fi 299 fi
300 return $extract_exitcode 300 return $extract_exitcode
301 ) 301 )
302 } 302 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698