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

Unified Diff: src/scripts/sync_build_test.sh

Issue 556060: Enable building autotests in test loop and sbt script (Closed)
Patch Set: fix 80 chars Created 10 years, 11 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
« src/scripts/run_remote_tests.sh ('K') | « src/scripts/run_remote_tests.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/sync_build_test.sh
diff --git a/src/scripts/sync_build_test.sh b/src/scripts/sync_build_test.sh
index d59109bd76aa98085fe62e2340287eb9baa9cb48..205ca142773abe0f2d2b9fd4b539a6b6b1eee5ad 100755
--- a/src/scripts/sync_build_test.sh
+++ b/src/scripts/sync_build_test.sh
@@ -62,6 +62,7 @@ buildbot"
DEFINE_string chronos_passwd "${CHRONOS_PASSWD}" \
"Use this as the chronos user passwd (defaults to \$CHRONOS_PASSWD)"
DEFINE_boolean mod_image_for_test ${FLAGS_FALSE} "Modify the image for testing"
+DEFINE_boolean build_autotest ${FLAGS_FALSE} "Build autotest"
DEFINE_boolean image_to_live ${FLAGS_FALSE} \
"Put the resulting image on live instance (requires --remote)"
DEFINE_string remote "" \
@@ -106,6 +107,9 @@ function validate_and_set_param_defaults() {
FLAGS_top=$(dirname $(dirname $(dirname $0)))
fi
+ # Canonicalize any symlinks
+ FLAGS_top=$(readlink -f "${FLAGS_top}")
+
if [[ -z "${FLAGS_repo}" ]]; then
if is_google_environment; then
FLAGS_repo="ssh://git@chromiumos-git//chromeos"
@@ -159,6 +163,10 @@ function validate_and_set_param_defaults() {
# Override any specified chronos password with the test one
local test_file=$(dirname $0)"/mod_for_test_scripts/test_account.passwd"
FLAGS_chronos_passwd=$(head -1 "${test_file}")
+ # Default to building autotests whenever we mod image for test.
+ # TODO(kmixter): Make this more efficient by either doing incremental
+ # building, or only building if the tests we're running needs to be.
sosa 2010/01/29 02:43:12 True, we probably should parametrize build_autotes
+ FLAGS_build_autotest=${FLAGS_TRUE}
fi
if [[ -n "${FLAGS_image_to_usb}" ]]; then
@@ -216,6 +224,9 @@ function describe_steps() {
echo " * Set chronos password randomly"
fi
fi
+ if [[ ${FLAGS_build_autotest} -eq ${FLAGS_TRUE} ]]; then
+ echo " * Build autotest"
+ fi
if [[ -n "${FLAGS_image_to_usb}" ]]; then
echo " * Write the image to USB device ${FLAGS_image_to_usb}"
fi
@@ -460,6 +471,11 @@ function main() {
./image_to_live.sh "--remote=${FLAGS_remote}" --update_known_hosts
fi
+ if [[ ${FLAGS_build_autotest} -eq ${FLAGS_TRUE} ]]; then
+ chdir_relative src/scripts
+ run_phase "Building autotest" ./enter_chroot.sh "./build_autotest.sh"
+ fi
+
if [[ -n "${FLAGS_test}" ]]; then
chdir_relative src/scripts
# We purposefully do not quote FLAGS_test below as we expect it may
« src/scripts/run_remote_tests.sh ('K') | « src/scripts/run_remote_tests.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698