summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorilevy@chromium.org <ilevy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-20 05:34:33 +0000
committerilevy@chromium.org <ilevy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-20 05:34:33 +0000
commitd54cf816835b99455788b46070a88220bfb6ad86 (patch)
treef6000d027d210ca1a47272d69f616e8666f1d0b4 /build
parentefde810693ee7ab4c0adf45cae42be7c1aec2178 (diff)
downloadchromium_src-d54cf816835b99455788b46070a88220bfb6ad86.zip
chromium_src-d54cf816835b99455788b46070a88220bfb6ad86.tar.gz
chromium_src-d54cf816835b99455788b46070a88220bfb6ad86.tar.bz2
Adding buildbot main scripts for fyi builders and testers.
I'm removing the experimental compiler step from the builder to reduce zip size. BUG=132707 Review URL: https://chromiumcodereview.appspot.com/10533144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143149 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-xbuild/android/buildbot_functions.sh58
-rwxr-xr-xbuild/android/buildbot_fyi.sh8
-rwxr-xr-xbuild/android/buildbot_fyi_builder.sh19
-rwxr-xr-xbuild/android/buildbot_fyi_tester.sh18
4 files changed, 97 insertions, 6 deletions
diff --git a/build/android/buildbot_functions.sh b/build/android/buildbot_functions.sh
index 706d5f4..fad5899 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@@@"
@@ -239,3 +269,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"
+}
diff --git a/build/android/buildbot_fyi.sh b/build/android/buildbot_fyi.sh
index f0eb7dd..5a48c9a 100755
--- a/build/android/buildbot_fyi.sh
+++ b/build/android/buildbot_fyi.sh
@@ -9,11 +9,11 @@
# SHERIFF: there should be no need to disable this bot.
# The FYI waterfall does not close the tree.
-ROOT=$(cd "$(dirname $0)"; pwd)
-. "${ROOT}"/buildbot_functions.sh
+BB_SRC_ROOT="$(cd "$(dirname $0)/../.."; pwd)"
+. "${BB_SRC_ROOT}/build/android/buildbot_functions.sh"
-bb_baseline_setup "${ROOT}"/../..
-bb_install_build_deps "${ROOT}"/../..
+bb_baseline_setup "$BB_SRC_ROOT" "$@"
+bb_install_build_deps "$BB_SRC_ROOT"
bb_compile
bb_compile_experimental
bb_run_tests
diff --git a/build/android/buildbot_fyi_builder.sh b/build/android/buildbot_fyi_builder.sh
new file mode 100755
index 0000000..8d3046d
--- /dev/null
+++ b/build/android/buildbot_fyi_builder.sh
@@ -0,0 +1,19 @@
+#!/bin/bash -ex
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# Buildbot annotator script for the FYI waterfall builder.
+# Compiler and zip the build.
+
+# SHERIFF: there should be no need to disable this bot.
+# The FYI waterfall does not close the tree.
+
+
+BB_SRC_ROOT="$(cd "$(dirname $0)/../.."; pwd)"
+. "${BB_SRC_ROOT}/build/android/buildbot_functions.sh"
+
+bb_baseline_setup "$BB_SRC_ROOT" "$@"
+bb_install_build_deps "$BB_SRC_ROOT"
+bb_compile_apk_tests
+bb_zip_build
diff --git a/build/android/buildbot_fyi_tester.sh b/build/android/buildbot_fyi_tester.sh
new file mode 100755
index 0000000..caa1175
--- /dev/null
+++ b/build/android/buildbot_fyi_tester.sh
@@ -0,0 +1,18 @@
+#!/bin/bash -ex
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# Buildbot annotator script for a FYI waterfall tester.
+# Downloads and extracts a build from the builder and runs tests.
+
+# SHERIFF: there should be no need to disable this bot.
+# The FYI waterfall does not close the tree.
+
+BB_SRC_ROOT="$(cd "$(dirname $0)/../.."; pwd)"
+. "${BB_SRC_ROOT}/build/android/buildbot_functions.sh"
+
+bb_baseline_setup "$BB_SRC_ROOT" "$@"
+bb_install_build_deps "$BB_SRC_ROOT"
+bb_extract_build
+bb_run_apk_tests