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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 # Remove chrome autotest location prefix from control_file if needed | 261 # Remove chrome autotest location prefix from control_file if needed |
262 if [[ ${control_file:0:${#chrome_autotests}} == \ | 262 if [[ ${control_file:0:${#chrome_autotests}} == \ |
263 "${chrome_autotests}" ]]; then | 263 "${chrome_autotests}" ]]; then |
264 control_file="${control_file:${#chrome_autotests}+1}" | 264 control_file="${control_file:${#chrome_autotests}+1}" |
265 info "Running chrome autotest ${control_file}" | 265 info "Running chrome autotest ${control_file}" |
266 fi | 266 fi |
267 | 267 |
268 local autoserv_args="-m ${FLAGS_remote} --ssh-port ${FLAGS_ssh_port} \ | 268 local autoserv_args="-m ${FLAGS_remote} --ssh-port ${FLAGS_ssh_port} \ |
269 ${option} ${control_file} -r ${results_dir} ${verbose}" | 269 ${option} ${control_file} -r ${results_dir} ${verbose}" |
270 if [ -n "${FLAGS_args}" ]; then | 270 if [ -n "${FLAGS_args}" ]; then |
271 autoserv_args="${autoserv_args} -a \""${FLAGS_args}"\"" | 271 autoserv_args="${autoserv_args} -a \"${FLAGS_args}\"" |
272 fi | 272 fi |
273 | 273 |
274 sudo chmod a+w ./server/{tests,site_tests} | 274 sudo chmod a+w ./server/{tests,site_tests} |
275 echo ./server/autoserv ${autoserv_args} | 275 echo ./server/autoserv ${autoserv_args} |
276 | 276 |
277 if [ ${FLAGS_build} -eq ${FLAGS_TRUE} ]; then | 277 if [ ${FLAGS_build} -eq ${FLAGS_TRUE} ]; then |
278 # run autoserv in subshell | 278 # run autoserv in subshell |
279 (. ${BUILD_ENV} && tc-export CC CXX PKG_CONFIG && | 279 (. ${BUILD_ENV} && tc-export CC CXX PKG_CONFIG && |
280 ./server/autoserv ${autoserv_args}) | 280 ./server/autoserv ${autoserv_args}) |
281 else | 281 else |
282 ./server/autoserv ${autoserv_args} | 282 ./server/autoserv ${autoserv_args} |
283 fi | 283 fi |
284 done | 284 done |
285 popd > /dev/null | 285 popd > /dev/null |
286 | 286 |
287 echo "" | 287 echo "" |
288 info "Test results:" | 288 info "Test results:" |
289 ./generate_test_report "${TMP}" --strip="${TMP}/" | 289 ./generate_test_report "${TMP}" --strip="${TMP}/" |
290 | 290 |
291 print_time_elapsed | 291 print_time_elapsed |
292 } | 292 } |
293 | 293 |
294 restart_in_chroot_if_needed $* | 294 restart_in_chroot_if_needed $* |
295 main "$@" | 295 main "$@" |
OLD | NEW |