| OLD | NEW |
| 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 grab_buildbot | 508 grab_buildbot |
| 509 fi | 509 fi |
| 510 | 510 |
| 511 if [[ ${FLAGS_force_make_chroot} -eq ${FLAGS_TRUE} ]]; then | 511 if [[ ${FLAGS_force_make_chroot} -eq ${FLAGS_TRUE} ]]; then |
| 512 chdir_relative src/scripts | 512 chdir_relative src/scripts |
| 513 run_phase "Replacing chroot" ./make_chroot --replace \ | 513 run_phase "Replacing chroot" ./make_chroot --replace \ |
| 514 "--chroot=${FLAGS_chroot}" ${jobs_param} | 514 "--chroot=${FLAGS_chroot}" ${jobs_param} |
| 515 fi | 515 fi |
| 516 | 516 |
| 517 if [[ ${FLAGS_build} -eq ${FLAGS_TRUE} ]]; then | 517 if [[ ${FLAGS_build} -eq ${FLAGS_TRUE} ]]; then |
| 518 local pkg_param="" |
| 519 if [[ ${FLAGS_usepkg} -eq ${FLAGS_FALSE} ]]; then |
| 520 pkg_param="--nousepkg" |
| 521 fi |
| 522 |
| 518 chdir_relative src/scripts | 523 chdir_relative src/scripts |
| 519 # Only setup board target if the directory does not exist | 524 # Only setup board target if the directory does not exist |
| 520 if [[ ! -d "${FLAGS_top}/chroot/build/${FLAGS_board}" ]]; then | 525 if [[ ! -d "${FLAGS_top}/chroot/build/${FLAGS_board}" ]]; then |
| 521 run_phase_in_chroot "Setting up board target" \ | 526 run_phase_in_chroot "Setting up board target" \ |
| 522 ./setup_board "${board_param}" | 527 ./setup_board ${pkg_param} "${board_param}" |
| 523 fi | 528 fi |
| 524 local build_autotest_param="" | 529 local build_autotest_param="" |
| 525 if [[ ${FLAGS_build_autotest} -eq ${FLAGS_TRUE} ]]; then | 530 if [[ ${FLAGS_build_autotest} -eq ${FLAGS_TRUE} ]]; then |
| 526 build_autotest_param="--withautotest" | 531 build_autotest_param="--withautotest" |
| 527 fi | 532 fi |
| 528 local pkg_param="" | |
| 529 if [[ ${FLAGS_usepkg} -eq ${FLAGS_FALSE} ]]; then | |
| 530 pkg_param="--nousepkg" | |
| 531 fi | |
| 532 | 533 |
| 533 run_phase_in_chroot "Building packages" \ | 534 run_phase_in_chroot "Building packages" \ |
| 534 ./build_packages "${board_param}" \ | 535 ./build_packages "${board_param}" \ |
| 535 ${jobs_param} ${withdev_param} ${build_autotest_param} \ | 536 ${jobs_param} ${withdev_param} ${build_autotest_param} \ |
| 536 ${pkg_param} | 537 ${pkg_param} |
| 537 | 538 |
| 538 run_phase_in_chroot "Building unit tests" ./build_tests.sh ${board_param} | 539 run_phase_in_chroot "Building unit tests" ./build_tests.sh ${board_param} |
| 539 if [[ "${FLAGS_board}" == "x86-generic" ]]; then | 540 if [[ "${FLAGS_board}" == "x86-generic" ]]; then |
| 540 run_phase_in_chroot "Running unit tests" ./run_tests.sh ${board_param} | 541 run_phase_in_chroot "Running unit tests" ./run_tests.sh ${board_param} |
| 541 fi | 542 fi |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 fi | 588 fi |
| 588 | 589 |
| 589 trap - EXIT | 590 trap - EXIT |
| 590 echo "Successfully used ${FLAGS_top} to:" | 591 echo "Successfully used ${FLAGS_top} to:" |
| 591 describe_steps | 592 describe_steps |
| 592 show_duration | 593 show_duration |
| 593 } | 594 } |
| 594 | 595 |
| 595 | 596 |
| 596 main $@ | 597 main $@ |
| OLD | NEW |