| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 else | 147 else |
| 148 TMP=$(mktemp -d /tmp/run_remote_tests.XXXX) | 148 TMP=$(mktemp -d /tmp/run_remote_tests.XXXX) |
| 149 fi | 149 fi |
| 150 TMP_INSIDE_CHROOT=${TMP} | 150 TMP_INSIDE_CHROOT=${TMP} |
| 151 fi | 151 fi |
| 152 | 152 |
| 153 trap cleanup EXIT | 153 trap cleanup EXIT |
| 154 | 154 |
| 155 remote_access_init | 155 remote_access_init |
| 156 | 156 |
| 157 # HACK: Temporary hack for cros-workon conversion | |
| 158 # In cros-workon, we always use the prepackaged tests, because the locations | |
| 159 # where tests come from are possibly infinite. | |
| 160 [[ -n "${CROS_WORKON_SRCROOT}" ]] && \ | |
| 161 FLAGS_prepackaged_autotest="/build/${FLAGS_board}/usr/local/autotest/" | |
| 162 | |
| 163 local autotest_dir="" | 157 local autotest_dir="" |
| 164 if [[ -z "${FLAGS_prepackaged_autotest}" ]]; then | 158 if [[ -z "${FLAGS_prepackaged_autotest}" ]]; then |
| 165 learn_board | 159 learn_board |
| 166 autotest_dir="${GCLIENT_ROOT}/src/third_party/autotest/files" | 160 if [[ -n "${CROS_WORKON_SRCROOT}" ]]; then |
| 161 autotest_dir="/build/${FLAGS_board}/usr/local/autotest" |
| 162 else |
| 163 autotest_dir="${GCLIENT_ROOT}/src/third_party/autotest/files" |
| 164 fi |
| 167 else | 165 else |
| 168 autotest_dir="${FLAGS_prepackaged_autotest}" | 166 autotest_dir="${FLAGS_prepackaged_autotest}" |
| 169 fi | 167 fi |
| 170 | 168 |
| 171 local control_files_to_run="" | 169 local control_files_to_run="" |
| 172 local chrome_autotests="${CHROME_ROOT}/src/chrome/test/chromeos/autotest/files
" | 170 local chrome_autotests="${CHROME_ROOT}/src/chrome/test/chromeos/autotest/files
" |
| 173 # Now search for tests which unambiguously include the given identifier | 171 # Now search for tests which unambiguously include the given identifier |
| 174 local search_path=$(echo {client,server}/{tests,site_tests}) | 172 local search_path=$(echo {client,server}/{tests,site_tests}) |
| 175 # Include chrome autotest in the search path | 173 # Include chrome autotest in the search path |
| 176 if [ -n "${CHROME_ROOT}" ]; then | 174 if [ -n "${CHROME_ROOT}" ]; then |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 "${option}" "${control_file}" -r "${results_dir}" ${verbose} \ | 269 "${option}" "${control_file}" -r "${results_dir}" ${verbose} \ |
| 272 "${args[@]}" | 270 "${args[@]}" |
| 273 done | 271 done |
| 274 | 272 |
| 275 echo "" | 273 echo "" |
| 276 echo_color "yellow" ">>> Test results:" | 274 echo_color "yellow" ">>> Test results:" |
| 277 ./generate_test_report "${TMP}" --strip="${TMP}/" | 275 ./generate_test_report "${TMP}" --strip="${TMP}/" |
| 278 } | 276 } |
| 279 | 277 |
| 280 main $@ | 278 main $@ |
| OLD | NEW |