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

Side by Side Diff: sync_build_test.sh

Issue 2810035: Add --nousepkg option for build_packages to sbt (Closed) Base URL: ssh://git@chromiumos-git//crosutils.git
Patch Set: Created 10 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
« 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 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Script to sync your checkout, build a Chromium OS image, and test it all 7 # Script to sync your checkout, build a Chromium OS image, and test it all
8 # with one command. Can also check out a new Chromium OS checkout and 8 # with one command. Can also check out a new Chromium OS checkout and
9 # perform a subset of the above operations. 9 # perform a subset of the above operations.
10 # 10 #
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 DEFINE_boolean mod_image_for_test ${FLAGS_FALSE} "Modify the image for testing" 72 DEFINE_boolean mod_image_for_test ${FLAGS_FALSE} "Modify the image for testing"
73 DEFINE_string remote "" \ 73 DEFINE_string remote "" \
74 "Use this hostname/IP for live updating and running tests" 74 "Use this hostname/IP for live updating and running tests"
75 DEFINE_string repo "${CHROMIUMOS_REPO}" "gclient repo for chromiumos" 75 DEFINE_string repo "${CHROMIUMOS_REPO}" "gclient repo for chromiumos"
76 DEFINE_boolean sync ${FLAGS_TRUE} "Sync the checkout" 76 DEFINE_boolean sync ${FLAGS_TRUE} "Sync the checkout"
77 DEFINE_string test "" \ 77 DEFINE_string test "" \
78 "Test the built image with the given params to run_remote_tests" 78 "Test the built image with the given params to run_remote_tests"
79 DEFINE_string top "" \ 79 DEFINE_string top "" \
80 "Root directory of your checkout (defaults to determining from your cwd)" 80 "Root directory of your checkout (defaults to determining from your cwd)"
81 DEFINE_boolean withdev ${FLAGS_TRUE} "Build development packages" 81 DEFINE_boolean withdev ${FLAGS_TRUE} "Build development packages"
82 DEFINE_boolean usepkg ${FLAGS_TRUE} "Use binary packages"
82 DEFINE_boolean unittest ${FLAGS_TRUE} "Run unit tests" 83 DEFINE_boolean unittest ${FLAGS_TRUE} "Run unit tests"
83 84
84 85
85 # Returns a heuristic indicating if we believe this to be a google internal 86 # Returns a heuristic indicating if we believe this to be a google internal
86 # development environment. 87 # development environment.
87 # Returns: 88 # Returns:
88 # 0 if so, 1 otherwise 89 # 0 if so, 1 otherwise
89 function is_google_environment() { 90 function is_google_environment() {
90 hostname | egrep -q .google.com\$ 91 hostname | egrep -q .google.com\$
91 return $? 92 return $?
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 chdir_relative src/scripts 510 chdir_relative src/scripts
510 # Only setup board target if the directory does not exist 511 # Only setup board target if the directory does not exist
511 if [[ ! -d "${FLAGS_top}/chroot/build/${FLAGS_board}" ]]; then 512 if [[ ! -d "${FLAGS_top}/chroot/build/${FLAGS_board}" ]]; then
512 run_phase_in_chroot "Setting up board target" \ 513 run_phase_in_chroot "Setting up board target" \
513 ./setup_board "${board_param}" 514 ./setup_board "${board_param}"
514 fi 515 fi
515 local build_autotest_param="" 516 local build_autotest_param=""
516 if [[ ${FLAGS_build_autotest} -eq ${FLAGS_TRUE} ]]; then 517 if [[ ${FLAGS_build_autotest} -eq ${FLAGS_TRUE} ]]; then
517 build_autotest_param="--withautotest" 518 build_autotest_param="--withautotest"
518 fi 519 fi
520 local pkg_param=""
521 if [[ ${FLAGS_usepkg} -eq ${FLAGS_FALSE} ]]; then
522 pkg_param="--nousepkg"
523 fi
519 524
520 run_phase_in_chroot "Building packages" \ 525 run_phase_in_chroot "Building packages" \
521 ./build_packages "${board_param}" \ 526 ./build_packages "${board_param}" \
522 ${jobs_param} ${withdev_param} ${build_autotest_param} 527 ${jobs_param} ${withdev_param} ${build_autotest_param} \
528 ${pkg_param}
523 529
524 run_phase_in_chroot "Building unit tests" ./build_tests.sh ${board_param} 530 run_phase_in_chroot "Building unit tests" ./build_tests.sh ${board_param}
525 if [[ "${FLAGS_board}" == "x86-generic" ]]; then 531 if [[ "${FLAGS_board}" == "x86-generic" ]]; then
526 run_phase_in_chroot "Running unit tests" ./run_tests.sh ${board_param} 532 run_phase_in_chroot "Running unit tests" ./run_tests.sh ${board_param}
527 fi 533 fi
528 fi 534 fi
529 535
530 if [[ ${FLAGS_master} -eq ${FLAGS_TRUE} ]]; then 536 if [[ ${FLAGS_master} -eq ${FLAGS_TRUE} ]]; then
531 chdir_relative src/scripts 537 chdir_relative src/scripts
532 if [[ -n "${FLAGS_chronos_passwd}" ]]; then 538 if [[ -n "${FLAGS_chronos_passwd}" ]]; then
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 fi 573 fi
568 574
569 trap - EXIT 575 trap - EXIT
570 echo "Successfully used ${FLAGS_top} to:" 576 echo "Successfully used ${FLAGS_top} to:"
571 describe_steps 577 describe_steps
572 show_duration 578 show_duration
573 } 579 }
574 580
575 581
576 main $@ 582 main $@
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