OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 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 build the set of binary packages needed by Chrome OS. It will | 7 # Script to build the set of binary packages needed by Chrome OS. It will |
8 # cross compile all of the packages into the given targets root and build | 8 # cross compile all of the packages into the given targets root and build |
9 # binary packages as a side-effect. The output packages will be picked up | 9 # binary packages as a side-effect. The output packages will be picked up |
10 # by the build_image script to put together a bootable Chrome OS image. | 10 # by the build_image script to put together a bootable Chrome OS image. |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 get_default_board | 22 get_default_board |
23 | 23 |
24 # Flags | 24 # Flags |
25 DEFINE_string board "$DEFAULT_BOARD" \ | 25 DEFINE_string board "$DEFAULT_BOARD" \ |
26 "The board to build packages for." | 26 "The board to build packages for." |
27 DEFINE_boolean usepkg $FLAGS_FALSE \ | 27 DEFINE_boolean usepkg $FLAGS_FALSE \ |
28 "Use binary packages to bootstrap when possible." | 28 "Use binary packages to bootstrap when possible." |
29 DEFINE_boolean withdev $FLAGS_TRUE \ | 29 DEFINE_boolean withdev $FLAGS_TRUE \ |
30 "Build useful developer friendly utilities." | 30 "Build useful developer friendly utilities." |
| 31 DEFINE_boolean withautotest $FLAGS_FALSE \ |
| 32 "Build autotest client code." |
31 DEFINE_integer jobs -1 \ | 33 DEFINE_integer jobs -1 \ |
32 "How many packages to build in parallel at maximum." | 34 "How many packages to build in parallel at maximum." |
33 | 35 |
34 # Parse command line | 36 # Parse command line |
35 FLAGS "$@" || exit 1 | 37 FLAGS "$@" || exit 1 |
36 eval set -- "${FLAGS_ARGV}" | 38 eval set -- "${FLAGS_ARGV}" |
37 | 39 |
38 # Die on any errors. | 40 # Die on any errors. |
39 set -e | 41 set -e |
40 | 42 |
(...skipping 17 matching lines...) Expand all Loading... |
58 EMERGE_FLAGS="${EMERGE_FLAGS} --jobs=$FLAGS_jobs" | 60 EMERGE_FLAGS="${EMERGE_FLAGS} --jobs=$FLAGS_jobs" |
59 fi | 61 fi |
60 | 62 |
61 sudo emerge -uDNv $EMERGE_FLAGS world | 63 sudo emerge -uDNv $EMERGE_FLAGS world |
62 | 64 |
63 if [[ $FLAGS_withdev -eq $FLAGS_TRUE ]]; then | 65 if [[ $FLAGS_withdev -eq $FLAGS_TRUE ]]; then |
64 sudo emerge-${FLAGS_board} -uDNv $EMERGE_FLAGS chromeos-base/chromeos-dev | 66 sudo emerge-${FLAGS_board} -uDNv $EMERGE_FLAGS chromeos-base/chromeos-dev |
65 else | 67 else |
66 sudo emerge-${FLAGS_board} -uDNv $EMERGE_FLAGS chromeos-base/chromeos | 68 sudo emerge-${FLAGS_board} -uDNv $EMERGE_FLAGS chromeos-base/chromeos |
67 fi | 69 fi |
| 70 |
| 71 if [[ $FLAGS_withautotest -eq $FLAGS_TRUE ]]; then |
| 72 ./build_autotest.sh --noprompt --board=${FLAGS_board} |
| 73 fi |
OLD | NEW |