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

Side by Side Diff: mod_image_for_test.sh

Issue 2832079: Remove .svn files from the client directory to save space (Closed) Base URL: ssh://gitrw.chromium.org/crosutils.git
Patch Set: Merge to master Created 10 years, 4 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 install_autotest() { 123 install_autotest() {
124 SYSROOT="${FLAGS_build_root}/${FLAGS_board}" 124 SYSROOT="${FLAGS_build_root}/${FLAGS_board}"
125 AUTOTEST_SRC="${SYSROOT}/usr/local/autotest" 125 AUTOTEST_SRC="${SYSROOT}/usr/local/autotest"
126 stateful_root="${ROOT_FS_DIR}/usr/local" 126 stateful_root="${ROOT_FS_DIR}/usr/local"
127 autotest_client="/autotest" 127 autotest_client="/autotest"
128 128
129 echo "Install autotest into stateful partition from $AUTOTEST_SRC" 129 echo "Install autotest into stateful partition from $AUTOTEST_SRC"
130 130
131 sudo mkdir -p "${stateful_root}${autotest_client}" 131 sudo mkdir -p "${stateful_root}${autotest_client}"
132 sudo mkdir -p "/tmp/autotest"
133 sudo rm -rf /tmp/autotest/*
134 132
135 # Remove excess files from stateful partition. 133 # Remove excess files from stateful partition.
136 # If these aren't there, that's fine. 134 # If these aren't there, that's fine.
137 sudo rm -rf "${stateful_root}${autotest_client}/*" || true 135 sudo rm -rf "${stateful_root}${autotest_client}/*" || true
138 sudo rm -rf "${stateful_root}/autotest-pkgs" || true 136 sudo rm -rf "${stateful_root}/autotest-pkgs" || true
139 sudo rm -rf "${stateful_root}/lib/icedtea6" || true 137 sudo rm -rf "${stateful_root}/lib/icedtea6" || true
140 138
141 sudo cp -fpru ${AUTOTEST_SRC}/client/* \ 139 sudo rsync --delete --delete-excluded -auvq \
142 "/tmp/autotest" 140 --exclude=deps/realtimecomm_playground \
143 # Remove outrageously large tests. 141 --exclude=tests/ltp \
144 # TODO(nsanders): is there a better way to do this? 142 --exclude=site_tests/graphics_O3DSelenium \
145 sudo rm -rf /tmp/autotest/deps/realtimecomm_playground 143 --exclude=site_tests/realtimecomm_GTalk\* \
146 sudo rm -rf /tmp/autotest/tests/ltp 144 --exclude=site_tests/platform_StackProtector \
147 sudo rm -rf /tmp/autotest/site_tests/graphics_O3DSelenium 145 --exclude=deps/chrome_test \
148 sudo rm -rf /tmp/autotest/realtimecomm_GTalk* 146 --exclude=site_tests/desktopui_BrowserTest \
149 sudo rm -rf /tmp/autotest/site_tests/platform_StackProtector 147 --exclude=site_tests/desktopui_UITest \
150 sudo rm -rf /tmp/autotest/deps/chrome_test 148 --exclude=.svn \
151 sudo rm -rf /tmp/autotest/site_tests/desktopui_BrowserTest 149 ${AUTOTEST_SRC}/client/* "${stateful_root}/${autotest_client}"
152 sudo rm -rf /tmp/autotest/site_tests/desktopui_UITest
153 150
154 sudo cp -fpru /tmp/autotest/* \
155 "${stateful_root}/${autotest_client}"
156 sudo chmod 755 "${stateful_root}/${autotest_client}" 151 sudo chmod 755 "${stateful_root}/${autotest_client}"
157 sudo chown -R 1000:1000 "${stateful_root}/${autotest_client}" 152 sudo chown -R 1000:1000 "${stateful_root}/${autotest_client}"
158 } 153 }
159 154
160 # main process begins here. 155 # main process begins here.
161 156
162 # Make sure this is really what the user wants, before nuking the device 157 # Make sure this is really what the user wants, before nuking the device
163 if [ $FLAGS_yes -ne $FLAGS_TRUE ]; then 158 if [ $FLAGS_yes -ne $FLAGS_TRUE ]; then
164 read -p "Modifying image ${FLAGS_image} for test; are you sure (y/N)? " SURE 159 read -p "Modifying image ${FLAGS_image} for test; are you sure (y/N)? " SURE
165 SURE="${SURE:0:1}" # Get just the first character 160 SURE="${SURE:0:1}" # Get just the first character
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 cleanup 224 cleanup
230 225
231 # Now make it bootable with the flags from build_image 226 # Now make it bootable with the flags from build_image
232 ${SCRIPTS_DIR}/bin/cros_make_image_bootable $(dirname "${FLAGS_image}") \ 227 ${SCRIPTS_DIR}/bin/cros_make_image_bootable $(dirname "${FLAGS_image}") \
233 $(basename "${FLAGS_image}") 228 $(basename "${FLAGS_image}")
234 229
235 print_time_elapsed 230 print_time_elapsed
236 231
237 trap - EXIT 232 trap - EXIT
238 233
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