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

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: Remove an obsolete style fix 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) 2011 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
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 -r "$ROOT_FS_DIR" -s "$STATEFUL_DIR" 224 -r "$ROOT_FS_DIR" -s "$STATEFUL_DIR"
225 225
226 emerge_chromeos_test 226 emerge_chromeos_test
227 227
228 MOD_TEST_SCRIPT="$SCRIPTS_DIR/mod_for_test_scripts/test_setup.sh" 228 MOD_TEST_SCRIPT="$SCRIPTS_DIR/mod_for_test_scripts/test_setup.sh"
229 # Run test setup script to modify the image 229 # Run test setup script to modify the image
230 sudo GCLIENT_ROOT="$GCLIENT_ROOT" ROOT_FS_DIR="$ROOT_FS_DIR" \ 230 sudo GCLIENT_ROOT="$GCLIENT_ROOT" ROOT_FS_DIR="$ROOT_FS_DIR" \
231 STATEFUL_DIR="$STATEFUL_DIR" ARCH="$ARCH" "$MOD_TEST_SCRIPT" 231 STATEFUL_DIR="$STATEFUL_DIR" ARCH="$ARCH" "$MOD_TEST_SCRIPT"
232 232
233 if [ $FLAGS_factory -eq $FLAGS_TRUE ]; then 233 if [ $FLAGS_factory -eq $FLAGS_TRUE ]; then
234 sudo INSTALL_MASK="$INSTALL_MASK" $EMERGE_BOARD_CMD \
235 --root="$ROOT_FS_DIR" --root-deps=rdeps \
236 factorytest-init $EMERGE_JOBS
237
234 install_autotest 238 install_autotest
235 239
236 MOD_FACTORY_SCRIPT="$SCRIPTS_DIR/mod_for_factory_scripts/factory_setup.sh" 240 MOD_FACTORY_SCRIPT="$SCRIPTS_DIR/mod_for_factory_scripts/factory_setup.sh"
237 # Run factory setup script to modify the image 241 # Run factory setup script to modify the image
238 sudo GCLIENT_ROOT="$GCLIENT_ROOT" ROOT_FS_DIR="$ROOT_FS_DIR" \ 242 sudo GCLIENT_ROOT="$GCLIENT_ROOT" ROOT_FS_DIR="$ROOT_FS_DIR" \
239 QUALDB="$FLAGS_qualdb" BOARD=$FLAGS_board "$MOD_FACTORY_SCRIPT" 243 QUALDB="$FLAGS_qualdb" BOARD=$FLAGS_board "$MOD_FACTORY_SCRIPT"
240 fi 244 fi
241 245
242 # Re-run ldconfig to fix /etc/ldconfig.so.cache. 246 # Re-run ldconfig to fix /etc/ldconfig.so.cache.
243 sudo ldconfig -r "$ROOT_FS_DIR" 247 sudo ldconfig -r "$ROOT_FS_DIR"
244 248
245 # Let's have a look at the image just in case.. 249 # Let's have a look at the image just in case..
246 if [ "$VERIFY" = "true" ]; then 250 if [ "$VERIFY" = "true" ]; then
247 pushd "$ROOT_FS_DIR" 251 pushd "$ROOT_FS_DIR"
248 bash 252 bash
249 popd 253 popd
250 fi 254 fi
251 255
252 cleanup 256 cleanup
253 257
254 # Now make it bootable with the flags from build_image 258 # Now make it bootable with the flags from build_image
255 "$SCRIPTS_DIR/bin/cros_make_image_bootable" "$(dirname "$FLAGS_image")" \ 259 "$SCRIPTS_DIR/bin/cros_make_image_bootable" "$(dirname "$FLAGS_image")" \
256 "$(basename "$FLAGS_image")" 260 "$(basename "$FLAGS_image")"
257 261
258 print_time_elapsed 262 print_time_elapsed
259 263
260 trap - EXIT 264 trap - EXIT
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