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

Side by Side Diff: mod_image_for_test.sh

Issue 2965013: If qualified components not specified, use the one based on board name. (Closed) Base URL: ssh://gitrw.chromium.org/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 | « mod_for_factory_scripts/500copyQualDb ('k') | 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) 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 modify a keyfob-based chromeos system image for testability. 7 # Script to modify a keyfob-based chromeos system image for testability.
8 8
9 # Load common constants. This should be the first executable line. 9 # Load common constants. This should be the first executable line.
10 # The path to common.sh should be relative to your script's location. 10 # The path to common.sh should be relative to your script's location.
(...skipping 10 matching lines...) Expand all
21 DEFINE_string board "$DEFAULT_BOARD" "Board for which the image was built" b 21 DEFINE_string board "$DEFAULT_BOARD" "Board for which the image was built" b
22 DEFINE_boolean factory $FLAGS_FALSE \ 22 DEFINE_boolean factory $FLAGS_FALSE \
23 "Modify the image for manufacturing testing" f 23 "Modify the image for manufacturing testing" f
24 DEFINE_boolean factory_install $FLAGS_FALSE \ 24 DEFINE_boolean factory_install $FLAGS_FALSE \
25 "Modify the image for factory install shim" 25 "Modify the image for factory install shim"
26 DEFINE_string image "" "Location of the rootfs raw image file" i 26 DEFINE_string image "" "Location of the rootfs raw image file" i
27 DEFINE_boolean installmask $FLAGS_TRUE \ 27 DEFINE_boolean installmask $FLAGS_TRUE \
28 "Use INSTALL_MASK to shrink the resulting image." m 28 "Use INSTALL_MASK to shrink the resulting image." m
29 DEFINE_integer jobs -1 \ 29 DEFINE_integer jobs -1 \
30 "How many packages to build in parallel at maximum." j 30 "How many packages to build in parallel at maximum." j
31 DEFINE_string qualdb "/tmp/run_remote_tests.*" \ 31 DEFINE_string qualdb "" "Location of qualified component file" d
32 "Location of qualified component file" d
33 DEFINE_boolean yes $FLAGS_FALSE "Answer yes to all prompts" y 32 DEFINE_boolean yes $FLAGS_FALSE "Answer yes to all prompts" y
34 DEFINE_string build_root "/build" \ 33 DEFINE_string build_root "/build" \
35 "The root location for board sysroots." 34 "The root location for board sysroots."
36 35
37 36
38 # Parse command line 37 # Parse command line
39 FLAGS "$@" || exit 1 38 FLAGS "$@" || exit 1
40 eval set -- "${FLAGS_ARGV}" 39 eval set -- "${FLAGS_ARGV}"
41 40
42 EMERGE_CMD="emerge" 41 EMERGE_CMD="emerge"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 # Run test setup script to modify the image 185 # Run test setup script to modify the image
187 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ 186 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \
188 STATEFUL_DIR="${STATEFUL_DIR}" "${MOD_TEST_ROOT}/test_setup.sh" 187 STATEFUL_DIR="${STATEFUL_DIR}" "${MOD_TEST_ROOT}/test_setup.sh"
189 188
190 if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then 189 if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then
191 install_autotest 190 install_autotest
192 191
193 MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts" 192 MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts"
194 # Run factory setup script to modify the image 193 # Run factory setup script to modify the image
195 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ 194 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \
196 QUALDB="${FLAGS_qualdb}" \ 195 QUALDB="${FLAGS_qualdb}" BOARD=${FLAGS_board} \
197 "${MOD_FACTORY_ROOT}/factory_setup.sh" 196 "${MOD_FACTORY_ROOT}/factory_setup.sh"
198 fi 197 fi
199 fi 198 fi
200 199
201 # Let's have a look at the image just in case.. 200 # Let's have a look at the image just in case..
202 if [ "${VERIFY}" = "true" ]; then 201 if [ "${VERIFY}" = "true" ]; then
203 pushd "${ROOT_FS_DIR}" 202 pushd "${ROOT_FS_DIR}"
204 bash 203 bash
205 popd 204 popd
206 fi 205 fi
207 206
208 cleanup 207 cleanup
209 208
210 print_time_elapsed 209 print_time_elapsed
211 210
212 trap - EXIT 211 trap - EXIT
213 212
OLDNEW
« no previous file with comments | « mod_for_factory_scripts/500copyQualDb ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698