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

Side by Side Diff: mod_image_for_test.sh

Issue 6665048: Update mod_image_for_test to use the new factorytest-init package (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Merge to latest ToT Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « mod_for_factory_scripts/200patchInitScript ('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) 2011 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 # --- BEGIN COMMON.SH BOILERPLATE --- 9 # --- BEGIN COMMON.SH BOILERPLATE ---
10 # Load common CrOS utilities. Inside the chroot this file is installed in 10 # Load common CrOS utilities. Inside the chroot this file is installed in
11 # /usr/lib/crosutils. Outside the chroot we find it relative to the script's 11 # /usr/lib/crosutils. Outside the chroot we find it relative to the script's
12 # location. 12 # location.
13 find_common_sh() { 13 find_common_sh() {
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 STATEFUL_DIR="$IMAGE_DIR/stateful_partition" 221 STATEFUL_DIR="$IMAGE_DIR/stateful_partition"
222 222
223 trap cleanup EXIT 223 trap cleanup EXIT
224 224
225 # Mounts gpt image and sets up var, /usr/local and symlinks. 225 # Mounts gpt image and sets up var, /usr/local and symlinks.
226 "$SCRIPTS_DIR/mount_gpt_image.sh" -i "$IMAGE_NAME" -f "$IMAGE_DIR" \ 226 "$SCRIPTS_DIR/mount_gpt_image.sh" -i "$IMAGE_NAME" -f "$IMAGE_DIR" \
227 -r "$ROOT_FS_DIR" -s "$STATEFUL_DIR" 227 -r "$ROOT_FS_DIR" -s "$STATEFUL_DIR"
228 228
229 emerge_chromeos_test 229 emerge_chromeos_test
230 230
231 MOD_TEST_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts" 231 MOD_TEST_SCRIPT="${SCRIPTS_DIR}/mod_for_test_scripts/test_setup.sh"
232 # Run test setup script to modify the image 232 # Run test setup script to modify the image
233 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ 233 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \
234 STATEFUL_DIR="${STATEFUL_DIR}" ARCH="${ARCH}" "${MOD_TEST_ROOT}/test_setup.s h" 234 STATEFUL_DIR="${STATEFUL_DIR}" ARCH="${ARCH}" "${MOD_TEST_SCRIPT}"
235 235
236 if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then 236 if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then
237 sudo INSTALL_MASK="$INSTALL_MASK" $EMERGE_BOARD_CMD \
238 --root="$ROOT_FS_DIR" --root-deps=rdeps \
239 factorytest-init $EMERGE_JOBS
Vince Laviano 2011/03/18 02:45:45 Maybe use the "${FOO}" variable quoting style here
jrbarnette 2011/03/18 20:31:48 The rest of the file had no consistency, either...
240
237 install_autotest 241 install_autotest
238 242
239 MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts" 243 MOD_FACTORY_SCRIPT="${SCRIPTS_DIR}/mod_for_factory_scripts/factory_setup.sh"
240 # Run factory setup script to modify the image 244 # Run factory setup script to modify the image
241 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ 245 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \
242 QUALDB="${FLAGS_qualdb}" BOARD=${FLAGS_board} \ 246 QUALDB="${FLAGS_qualdb}" BOARD=${FLAGS_board} "${MOD_FACTORY_SCRIPT}"
243 "${MOD_FACTORY_ROOT}/factory_setup.sh"
244 fi 247 fi
245 248
246 # Re-run ldconfig to fix /etc/ldconfig.so.cache. 249 # Re-run ldconfig to fix /etc/ldconfig.so.cache.
247 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" 250 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}"
248 251
249 # Let's have a look at the image just in case.. 252 # Let's have a look at the image just in case..
250 if [ "${VERIFY}" = "true" ]; then 253 if [ "${VERIFY}" = "true" ]; then
251 pushd "${ROOT_FS_DIR}" 254 pushd "${ROOT_FS_DIR}"
252 bash 255 bash
253 popd 256 popd
254 fi 257 fi
255 258
256 cleanup 259 cleanup
257 260
258 # Now make it bootable with the flags from build_image 261 # Now make it bootable with the flags from build_image
259 "${SCRIPTS_DIR}/bin/cros_make_image_bootable" "$(dirname "${FLAGS_image}")" \ 262 "${SCRIPTS_DIR}/bin/cros_make_image_bootable" "$(dirname "${FLAGS_image}")" \
260 $(basename "${FLAGS_image}") 263 $(basename "${FLAGS_image}")
261 264
262 print_time_elapsed 265 print_time_elapsed
263 266
264 trap - EXIT 267 trap - EXIT
265 268
OLDNEW
« no previous file with comments | « mod_for_factory_scripts/200patchInitScript ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698