| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 RAN_ANY_TESTS=${FLAGS_TRUE} | 269 RAN_ANY_TESTS=${FLAGS_TRUE} |
| 270 | 270 |
| 271 local enter_chroot="" | 271 local enter_chroot="" |
| 272 local autotest="${GCLIENT_ROOT}/src/scripts/autotest" | 272 local autotest="${GCLIENT_ROOT}/src/scripts/autotest" |
| 273 if [[ ${INSIDE_CHROOT} -eq 0 ]]; then | 273 if [[ ${INSIDE_CHROOT} -eq 0 ]]; then |
| 274 enter_chroot="./enter_chroot.sh --chroot ${FLAGS_chroot} --" | 274 enter_chroot="./enter_chroot.sh --chroot ${FLAGS_chroot} --" |
| 275 autotest="./autotest" | 275 autotest="./autotest" |
| 276 fi | 276 fi |
| 277 | 277 |
| 278 ${enter_chroot} ${autotest} --board "${FLAGS_board}" -m "${FLAGS_remote}" \ | 278 ${enter_chroot} ${autotest} --board "${FLAGS_board}" -m "${FLAGS_remote}" \ |
| 279 --ssh-port ${FLAGS_ssh_port} \ |
| 279 "${option}" "${control_file}" -r "${results_dir}" ${verbose} \ | 280 "${option}" "${control_file}" -r "${results_dir}" ${verbose} \ |
| 280 "${args[@]}" | 281 "${args[@]}" |
| 281 | 282 |
| 282 results_dir="${TMP}/${results_dir_name}" | 283 results_dir="${TMP}/${results_dir_name}" |
| 283 local test_status="${results_dir}/status.log" | 284 local test_status="${results_dir}/status.log" |
| 284 local test_result_dir="${results_dir}/${short_name}" | 285 local test_result_dir="${results_dir}/${short_name}" |
| 285 local keyval_file="${test_result_dir}/results/keyval" | 286 local keyval_file="${test_result_dir}/results/keyval" |
| 286 echo "" | 287 echo "" |
| 287 if is_successful_test "${test_status}"; then | 288 if is_successful_test "${test_status}"; then |
| 288 echo_color "green" ">>> SUCCESS: ${control_file}" | 289 echo_color "green" ">>> SUCCESS: ${control_file}" |
| 289 if [[ -f "${keyval_file}" ]]; then | 290 if [[ -f "${keyval_file}" ]]; then |
| 290 echo ">>> Keyval was:" | 291 echo ">>> Keyval was:" |
| 291 cat "${keyval_file}" | 292 cat "${keyval_file}" |
| 292 fi | 293 fi |
| 293 else | 294 else |
| 294 echo_color "red" ">>> FAILED: ${control_file}" | 295 echo_color "red" ">>> FAILED: ${control_file}" |
| 295 cat "${test_status}" | 296 cat "${test_status}" |
| 296 fi | 297 fi |
| 297 local end_time=$(date '+%s') | 298 local end_time=$(date '+%s') |
| 298 done | 299 done |
| 299 } | 300 } |
| 300 | 301 |
| 301 main $@ | 302 main $@ |
| OLD | NEW |