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

Unified Diff: build/android/buildbot_functions.sh

Issue 10533144: Buildbot enhancements: Builder/Tester split (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switched build to APK build/tests and fixed zip to correctly get svn revision Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/buildbot_fyi.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/buildbot_functions.sh
diff --git a/build/android/buildbot_functions.sh b/build/android/buildbot_functions.sh
index 4c26610d897bff73aa67db603a59263dbb1db5b6..29020f19be32e4dbc40e445b4eeb261fd5315c5b 100755
--- a/build/android/buildbot_functions.sh
+++ b/build/android/buildbot_functions.sh
@@ -13,6 +13,28 @@ JOBS="${JOBS:-4}"
# Clobber build? Overridden by bots with BUILDBOT_CLOBBER.
NEED_CLOBBER="${NEED_CLOBBER:-0}"
+
+# Parse named arguments passed into the annotator script
+# and assign them global variable names.
+function bb_parse_args {
+ while [[ $1 ]]; do
+ case "$1" in
+ --factory-properties=*)
+ FACTORY_PROPERTIES="$(echo "$1" | sed 's/^[^=]*=//')"
+ ;;
+ --build-properties=*)
+ BUILD_PROPERTIES="$(echo "$1" | sed 's/^[^=]*=//')"
+ ;;
+ *)
+ echo "@@@STEP_WARNINGS@@@"
+ echo "Warning, unparsed input argument: '$1'"
+ ;;
+ esac
+ shift
+ done
+}
+
+
# Setup environment for Android build.
# Called from bb_baseline_setup.
# Moved to top of file so it is easier to find.
@@ -30,6 +52,7 @@ function bb_install_build_deps {
if [[ -f "$script" ]]; then
"$script"
else
+ echo "@@@STEP_WARNINGS@@@"
echo "Cannot find $script; why?"
fi
}
@@ -41,10 +64,17 @@ function bb_force_bot_green_and_exit {
}
# Basic setup for all bots to run after a source tree checkout.
-# $1: source root.
+# Args:
+# $1: source root.
+# $2 and beyond: key value pairs which are parsed by bb_parse_args.
function bb_baseline_setup {
echo "@@@BUILD_STEP cd into source root@@@"
SRC_ROOT="$1"
+ # Remove SRC_ROOT param
+ shift
+
+ bb_parse_args "$@"
+
if [ ! -d "${SRC_ROOT}" ] ; then
echo "Please specify a valid source root directory as an arg"
echo '@@@STEP_FAILURE@@@'
@@ -77,7 +107,7 @@ function bb_baseline_setup {
# Setting up a new bot? Must do this before envsetup.sh
if [ ! -d "${ANDROID_NDK_ROOT}" ] ; then
- bb_install_build_deps $1
+ bb_install_build_deps $SRC_ROOT
fi
echo "@@@BUILD_STEP Configure with envsetup.sh@@@"
@@ -237,3 +267,27 @@ function bb_run_apk_tests {
echo "@@@BUILD_STEP Run APK Tests on actual hardware@@@"
build/android/run_tests.py --xvfb --verbose --apk=True
}
+
+# Zip and archive a build.
+function bb_zip_build {
+ echo "@@@BUILD_STEP Zip build@@@"
+ python ../../../../scripts/slave/zip_build.py \
+ --src-dir "$SRC_ROOT" \
+ --factory-properties "$FACTORY_PROPERTIES" \
+ --build-properties "$BUILD_PROPERTIES"
+}
+
+# Download and extract a build.
+function bb_extract_build {
+ echo "@@@BUILD_STEP Download and extract build@@@"
+ if [[ -z $FACTORY_PROPERTIES || -z $BUILD_PROPERTIES ]]; then
+ return 1
+ fi
+
+ python ../../../../scripts/slave/extract_build.py \
+ --build-dir "$SRC_ROOT" \
+ --build-output-dir "out" \
+ --target Release \
+ --factory-properties "$FACTORY_PROPERTIES" \
+ --build-properties "$BUILD_PROPERTIES"
+}
« no previous file with comments | « no previous file | build/android/buildbot_fyi.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698