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

Unified 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: Rebase and add note to keep functions in sync Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | build/gyp_chromium » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/buildbot/buildbot_functions.sh
diff --git a/build/android/buildbot/buildbot_functions.sh b/build/android/buildbot/buildbot_functions.sh
index cc9736a95d36f9531d5285d90d916a719e9fc958..949634c460d436eec9d9c5fcde1eaa4802372f5d 100755
--- a/build/android/buildbot/buildbot_functions.sh
+++ b/build/android/buildbot/buildbot_functions.sh
@@ -47,18 +47,6 @@ function bb_baseline_setup {
shift
cd $SRC_ROOT
- if [[ $BUILDBOT_CLOBBER ]]; then
- echo "@@@BUILD_STEP Clobber@@@"
- # Sdk key expires, delete android folder.
- # crbug.com/145860
- rm -rf ~/.android
- rm -rf "${SRC_ROOT}"/out
- if [ -e "${SRC_ROOT}"/out ] ; then
- echo "Clobber appeared to fail? ${SRC_ROOT}/out still exists."
- echo "@@@STEP_WARNINGS@@@"
- fi
- fi
-
echo "@@@BUILD_STEP Environment setup@@@"
bb_parse_args "$@"
@@ -68,17 +56,44 @@ function bb_baseline_setup {
fi
export GOMA_DIR=/b/build/goma
. build/android/envsetup.sh
- adb kill-server
- adb start-server
-}
-function bb_compile_setup {
local extra_gyp_defines="$(bb_get_json_prop "$FACTORY_PROPERTIES" \
extra_gyp_defines)"
export GYP_DEFINES+=" fastbuild=1 $extra_gyp_defines"
if echo $extra_gyp_defines | grep -q clang; then
unset CXX_target
fi
+
+ adb kill-server
+ adb start-server
+
+ local build_path="${SRC_ROOT}/out/${BUILDTYPE}"
+ local landmines_triggered_path="$build_path/.landmines_triggered"
+ python "$SRC_ROOT/build/landmines.py"
+
+ if [[ $BUILDBOT_CLOBBER || -f "$landmines_triggered_path" ]]; then
+ echo "@@@BUILD_STEP Clobber@@@"
+
+ if [[ -z $BUILDBOT_CLOBBER ]]; then
+ echo "Clobbering due to triggered landmines: "
+ cat "$landmines_triggered_path"
+ else
+ # Also remove all the files under out/ on an explicit clobber
+ find "${SRC_ROOT}/out" -maxdepth 1 -type f -exec rm -f {} +
+ fi
+
+ # Sdk key expires, delete android folder.
+ # crbug.com/145860
+ rm -rf ~/.android
+ rm -rf "$build_path"
+ if [[ -e $build_path ]] ; then
+ echo "Clobber appeared to fail? $build_path still exists."
+ echo "@@@STEP_WARNINGS@@@"
+ fi
+ fi
+}
+
+function bb_compile_setup {
bb_setup_goma_internal
# Should be called only after envsetup is done.
gclient runhooks
« no previous file with comments | « DEPS ('k') | build/gyp_chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698