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 run client or server tests on a live remote image. | 7 # Script to run client or server tests on a live remote image. |
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 die \ | 141 die \ |
142 "Could not find pre-installed autotest, you need to emerge-${FLAGS_board} \ | 142 "Could not find pre-installed autotest, you need to emerge-${FLAGS_board} \ |
143 autotest autotest-tests (or use --build)." | 143 autotest autotest-tests (or use --build)." |
144 fi | 144 fi |
145 info \ | 145 info \ |
146 "As requested, using emerged autotests already installed at ${AUTOTEST_DIR}." | 146 "As requested, using emerged autotests already installed at ${AUTOTEST_DIR}." |
147 return | 147 return |
148 fi | 148 fi |
149 | 149 |
150 if [ ${FLAGS_build} -eq ${FLAGS_FALSE} ] && | 150 if [ ${FLAGS_build} -eq ${FLAGS_FALSE} ] && |
151 "${SCRIPTS_DIR}/cros_workon" --board=${FLAGS_board} list | | 151 cros_workon --board=${FLAGS_board} list | |
152 grep -q autotest; then | 152 grep -q autotest; then |
153 AUTOTEST_DIR="${SRC_ROOT}/third_party/autotest/files" | 153 AUTOTEST_DIR="${SRC_ROOT}/third_party/autotest/files" |
154 FLAGS_build=${FLAGS_TRUE} | 154 FLAGS_build=${FLAGS_TRUE} |
155 if [ ! -d "${AUTOTEST_DIR}" ]; then | 155 if [ ! -d "${AUTOTEST_DIR}" ]; then |
156 die \ | 156 die \ |
157 "Detected cros_workon autotest but ${AUTOTEST_DIR} does not exist. Run \ | 157 "Detected cros_workon autotest but ${AUTOTEST_DIR} does not exist. Run \ |
158 repo sync autotest." | 158 repo sync autotest." |
159 fi | 159 fi |
160 info \ | 160 info \ |
161 "Detected cros_workon autotests. Building and running your autotests from \ | 161 "Detected cros_workon autotests. Building and running your autotests from \ |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 | 332 |
333 echo "" | 333 echo "" |
334 info "Test results:" | 334 info "Test results:" |
335 ./generate_test_report "${TMP}" --strip="${TMP}/" | 335 ./generate_test_report "${TMP}" --strip="${TMP}/" |
336 | 336 |
337 print_time_elapsed | 337 print_time_elapsed |
338 } | 338 } |
339 | 339 |
340 restart_in_chroot_if_needed "$@" | 340 restart_in_chroot_if_needed "$@" |
341 main "$@" | 341 main "$@" |
OLD | NEW |