| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 ssh-add $tmp_private_key | 72 ssh-add $tmp_private_key |
| 73 } | 73 } |
| 74 | 74 |
| 75 function cleanup() { | 75 function cleanup() { |
| 76 # Always remove the build path in case it was used. | 76 # Always remove the build path in case it was used. |
| 77 [[ -n "${BUILD_DIR}" ]] && sudo rm -rf "${BUILD_DIR}" | 77 [[ -n "${BUILD_DIR}" ]] && sudo rm -rf "${BUILD_DIR}" |
| 78 if [[ $FLAGS_cleanup -eq ${FLAGS_TRUE} ]] || \ | 78 if [[ $FLAGS_cleanup -eq ${FLAGS_TRUE} ]] || \ |
| 79 [[ ${RAN_ANY_TESTS} -eq ${FLAGS_FALSE} ]]; then | 79 [[ ${RAN_ANY_TESTS} -eq ${FLAGS_FALSE} ]]; then |
| 80 rm -rf "${TMP}" | 80 rm -rf "${TMP}" |
| 81 else | 81 else |
| 82 ln -sf "${TMP}" /tmp/run_remote_tests.latest |
| 82 echo ">>> Details stored under ${TMP}" | 83 echo ">>> Details stored under ${TMP}" |
| 83 fi | 84 fi |
| 84 stop_ssh_agent | 85 stop_ssh_agent |
| 85 cleanup_remote_access | 86 cleanup_remote_access |
| 86 } | 87 } |
| 87 | 88 |
| 88 # Determine if a control is for a client or server test. Echos | 89 # Determine if a control is for a client or server test. Echos |
| 89 # either "server" or "client". | 90 # either "server" or "client". |
| 90 # Arguments: | 91 # Arguments: |
| 91 # $1 - control file path | 92 # $1 - control file path |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 333 |
| 333 echo "" | 334 echo "" |
| 334 info "Test results:" | 335 info "Test results:" |
| 335 ./generate_test_report "${TMP}" --strip="${TMP}/" | 336 ./generate_test_report "${TMP}" --strip="${TMP}/" |
| 336 | 337 |
| 337 print_time_elapsed | 338 print_time_elapsed |
| 338 } | 339 } |
| 339 | 340 |
| 340 restart_in_chroot_if_needed "$@" | 341 restart_in_chroot_if_needed "$@" |
| 341 main "$@" | 342 main "$@" |
| OLD | NEW |