| OLD | NEW |
| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 "s/CHROMEOS_AUSERVER=.*$/CHROMEOS_AUSERVER=\ | 165 "s/CHROMEOS_AUSERVER=.*$/CHROMEOS_AUSERVER=\ |
| 166 http:\/\/${FACTORY_SERVER}:8080\/update/" \ | 166 http:\/\/${FACTORY_SERVER}:8080\/update/" \ |
| 167 ${ROOT_FS_DIR}/etc/lsb-release | 167 ${ROOT_FS_DIR}/etc/lsb-release |
| 168 fi | 168 fi |
| 169 else | 169 else |
| 170 emerge_chromeos_test | 170 emerge_chromeos_test |
| 171 | 171 |
| 172 MOD_TEST_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts" | 172 MOD_TEST_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts" |
| 173 # Run test setup script to modify the image | 173 # Run test setup script to modify the image |
| 174 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ | 174 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ |
| 175 "${MOD_TEST_ROOT}/test_setup.sh" | 175 STATEFUL_DIR="${STATEFUL_DIR}" "${MOD_TEST_ROOT}/test_setup.sh" |
| 176 | 176 |
| 177 if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then | 177 if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then |
| 178 install_autotest | 178 install_autotest |
| 179 | 179 |
| 180 MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts" | 180 MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts" |
| 181 # Run factory setup script to modify the image | 181 # Run factory setup script to modify the image |
| 182 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ | 182 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ |
| 183 QUALDB="${FLAGS_qualdb}" \ | 183 QUALDB="${FLAGS_qualdb}" \ |
| 184 "${MOD_FACTORY_ROOT}/factory_setup.sh" | 184 "${MOD_FACTORY_ROOT}/factory_setup.sh" |
| 185 fi | 185 fi |
| 186 fi | 186 fi |
| 187 | 187 |
| 188 # Let's have a look at the image just in case.. | 188 # Let's have a look at the image just in case.. |
| 189 if [ "${VERIFY}" = "true" ]; then | 189 if [ "${VERIFY}" = "true" ]; then |
| 190 pushd "${ROOT_FS_DIR}" | 190 pushd "${ROOT_FS_DIR}" |
| 191 bash | 191 bash |
| 192 popd | 192 popd |
| 193 fi | 193 fi |
| 194 | 194 |
| 195 cleanup | 195 cleanup |
| 196 trap - EXIT | 196 trap - EXIT |
| 197 | 197 |
| OLD | NEW |