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

Side by Side Diff: src/scripts/mod_image_for_test.sh

Issue 2108010: Do not emerge chromeos-test in factory_install. (Closed) Base URL: http://src.chromium.org/git/chromiumos.git
Patch Set: Fix after Nick's comments. Created 10 years, 7 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 | « no previous file | 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 ROOT_FS_DIR="$IMAGE_DIR/rootfs" 112 ROOT_FS_DIR="$IMAGE_DIR/rootfs"
113 STATEFUL_DIR="$IMAGE_DIR/stateful_partition" 113 STATEFUL_DIR="$IMAGE_DIR/stateful_partition"
114 SCRIPTS_DIR=$(dirname "$0") 114 SCRIPTS_DIR=$(dirname "$0")
115 115
116 trap cleanup EXIT 116 trap cleanup EXIT
117 117
118 # Mounts gpt image and sets up var, /usr/local and symlinks. 118 # Mounts gpt image and sets up var, /usr/local and symlinks.
119 "$SCRIPTS_DIR/mount_gpt_image.sh" -i "$IMAGE_NAME" -f "$IMAGE_DIR" \ 119 "$SCRIPTS_DIR/mount_gpt_image.sh" -i "$IMAGE_NAME" -f "$IMAGE_DIR" \
120 -r "$ROOT_FS_DIR" -s "$STATEFUL_DIR" 120 -r "$ROOT_FS_DIR" -s "$STATEFUL_DIR"
121 121
122 emerge_chromeos_test 122 if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ]; then
123 # We don't want to emerge test packages on factory install, otherwise we run
124 # out of space.
123 125
124 MOD_TEST_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts"
125 # Run test setup script to modify the image
126 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \
127 "${MOD_TEST_ROOT}/test_setup.sh"
128
129 if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then
130 MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts"
131 # Run factory setup script to modify the image
132 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \
133 STATEFUL_DIR="${STATEFUL_DIR}/dev_image" QUALDB="${FLAGS_qualdb}" \
134 "${MOD_FACTORY_ROOT}/factory_setup.sh"
135 fi
136
137 if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ]; then
138 # Run factory setup script to modify the image. 126 # Run factory setup script to modify the image.
139 sudo emerge-${FLAGS_board} --root=$ROOT_FS_DIR --usepkgonly \ 127 sudo emerge-${FLAGS_board} --root=$ROOT_FS_DIR --usepkgonly \
140 --root-deps=rdeps chromeos-factoryinstall 128 --root-deps=rdeps chromeos-factoryinstall
141 129
142 # Set factory server if necessary. 130 # Set factory server if necessary.
143 if [ "${FACTORY_SERVER}" != "" ]; then 131 if [ "${FACTORY_SERVER}" != "" ]; then
144 sudo sed -i \ 132 sudo sed -i \
145 "s/CHROMEOS_AUSERVER=.*$/CHROMEOS_AUSERVER=\ 133 "s/CHROMEOS_AUSERVER=.*$/CHROMEOS_AUSERVER=\
146 http:\/\/${FACTORY_SERVER}:8080\/update/" \ 134 http:\/\/${FACTORY_SERVER}:8080\/update/" \
147 ${ROOT_FS_DIR}/etc/lsb-release 135 ${ROOT_FS_DIR}/etc/lsb-release
148 fi 136 fi
137 else
138 emerge_chromeos_test
139
140 MOD_TEST_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts"
141 # Run test setup script to modify the image
142 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \
143 "${MOD_TEST_ROOT}/test_setup.sh"
144
145 if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then
146 MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts"
147 # Run factory setup script to modify the image
148 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \
149 STATEFUL_DIR="${STATEFUL_DIR}/dev_image" QUALDB="${FLAGS_qualdb}" \
150 "${MOD_FACTORY_ROOT}/factory_setup.sh"
151 fi
149 fi 152 fi
150 153
151 cleanup 154 cleanup
152 trap - EXIT 155 trap - EXIT
153 156
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698