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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 local verbose="" | 241 local verbose="" |
242 if [[ ${FLAGS_verbose} -eq $FLAGS_TRUE ]]; then | 242 if [[ ${FLAGS_verbose} -eq $FLAGS_TRUE ]]; then |
243 verbose="--verbose" | 243 verbose="--verbose" |
244 fi | 244 fi |
245 | 245 |
246 RAN_ANY_TESTS=${FLAGS_TRUE} | 246 RAN_ANY_TESTS=${FLAGS_TRUE} |
247 | 247 |
248 local enter_chroot="" | 248 local enter_chroot="" |
249 local autotest="${GCLIENT_ROOT}/src/scripts/autotest" | 249 local autotest="${GCLIENT_ROOT}/src/scripts/autotest" |
250 if [[ ${INSIDE_CHROOT} -eq 0 ]]; then | 250 if [[ ${INSIDE_CHROOT} -eq 0 ]]; then |
251 enter_chroot="./enter_chroot.sh --" | 251 enter_chroot="./enter_chroot.sh --chroot ${FLAGS_chroot} --" |
252 autotest="./autotest" | 252 autotest="./autotest" |
253 fi | 253 fi |
254 | 254 |
255 ${enter_chroot} ${autotest} --board "${FLAGS_board}" -m "${FLAGS_remote}" \ | 255 ${enter_chroot} ${autotest} --board "${FLAGS_board}" -m "${FLAGS_remote}" \ |
256 "${option}" "${control_file}" -r "${results_dir}" ${verbose} | 256 "${option}" "${control_file}" -r "${results_dir}" ${verbose} |
257 | 257 |
258 results_dir="${TMP}/${results_dir_name}" | 258 results_dir="${TMP}/${results_dir_name}" |
259 local test_status="${results_dir}/status.log" | 259 local test_status="${results_dir}/status.log" |
260 local test_result_dir="${results_dir}/${short_name}" | 260 local test_result_dir="${results_dir}/${short_name}" |
261 local keyval_file="${test_result_dir}/results/keyval" | 261 local keyval_file="${test_result_dir}/results/keyval" |
262 echo "" | 262 echo "" |
263 if is_successful_test "${test_status}"; then | 263 if is_successful_test "${test_status}"; then |
264 echo_color "green" ">>> SUCCESS: ${control_file}" | 264 echo_color "green" ">>> SUCCESS: ${control_file}" |
265 if [[ -f "${keyval_file}" ]]; then | 265 if [[ -f "${keyval_file}" ]]; then |
266 echo ">>> Keyval was:" | 266 echo ">>> Keyval was:" |
267 cat "${keyval_file}" | 267 cat "${keyval_file}" |
268 fi | 268 fi |
269 else | 269 else |
270 echo_color "red" ">>> FAILED: ${control_file}" | 270 echo_color "red" ">>> FAILED: ${control_file}" |
271 cat "${test_status}" | 271 cat "${test_status}" |
272 fi | 272 fi |
273 local end_time=$(date '+%s') | 273 local end_time=$(date '+%s') |
274 done | 274 done |
275 } | 275 } |
276 | 276 |
277 main $@ | 277 main $@ |
OLD | NEW |