Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1021)

Side by Side Diff: run_remote_tests.sh

Issue 2854062: autotest: create a candidate script for replacement ebuild test (running the tests) (Closed) Base URL: ssh://gitrw.chromium.org/crosutils
Patch Set: Also took care of whitespace warnings :/ Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « autotest_workon ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
261 fi 261 fi
262 local args=() 262 local args=()
263 if [[ -n "${FLAGS_args}" ]]; then 263 if [[ -n "${FLAGS_args}" ]]; then
264 local with_spaces="" 264 local with_spaces=""
265 with_spaces=${FLAGS_args//,/ } 265 with_spaces=${FLAGS_args//,/ }
266 args=("-a" "${with_spaces}") 266 args=("-a" "${with_spaces}")
267 fi 267 fi
268 268
269 RAN_ANY_TESTS=${FLAGS_TRUE} 269 RAN_ANY_TESTS=${FLAGS_TRUE}
270 270
271 # HACK: Temporary hack for cros-workon conversion
272 [[ -n "${WORKON_AUTOTEST}" ]] && WORKON_SUFFIX=_workon
273
271 local enter_chroot="" 274 local enter_chroot=""
272 local autotest="${GCLIENT_ROOT}/src/scripts/autotest" 275 local autotest="${GCLIENT_ROOT}/src/scripts/autotest${WORKON_SUFFIX}"
273 if [[ ${INSIDE_CHROOT} -eq 0 ]]; then 276 if [[ ${INSIDE_CHROOT} -eq 0 ]]; then
274 enter_chroot="./enter_chroot.sh --chroot ${FLAGS_chroot} --" 277 enter_chroot="./enter_chroot.sh --chroot ${FLAGS_chroot} --"
275 autotest="./autotest" 278 autotest="./autotest${WORKON_SUFFIX}"
276 fi 279 fi
277 280
278 ${enter_chroot} ${autotest} --board "${FLAGS_board}" -m "${FLAGS_remote}" \ 281 ${enter_chroot} ${autotest} --board "${FLAGS_board}" -m "${FLAGS_remote}" \
279 --ssh-port ${FLAGS_ssh_port} \ 282 --ssh-port ${FLAGS_ssh_port} \
280 "${option}" "${control_file}" -r "${results_dir}" ${verbose} \ 283 "${option}" "${control_file}" -r "${results_dir}" ${verbose} \
281 "${args[@]}" 284 "${args[@]}"
282 285
283 results_dir="${TMP}/${results_dir_name}" 286 results_dir="${TMP}/${results_dir_name}"
284 local test_status="${results_dir}/status.log" 287 local test_status="${results_dir}/status.log"
285 local test_result_dir="${results_dir}/${short_name}" 288 local test_result_dir="${results_dir}/${short_name}"
286 local keyval_file="${test_result_dir}/results/keyval" 289 local keyval_file="${test_result_dir}/results/keyval"
287 echo "" 290 echo ""
288 if is_successful_test "${test_status}"; then 291 if is_successful_test "${test_status}"; then
289 echo_color "green" ">>> SUCCESS: ${control_file}" 292 echo_color "green" ">>> SUCCESS: ${control_file}"
290 if [[ -f "${keyval_file}" ]]; then 293 if [[ -f "${keyval_file}" ]]; then
291 echo ">>> Keyval was:" 294 echo ">>> Keyval was:"
292 cat "${keyval_file}" 295 cat "${keyval_file}"
293 fi 296 fi
294 else 297 else
295 echo_color "red" ">>> FAILED: ${control_file}" 298 echo_color "red" ">>> FAILED: ${control_file}"
296 cat "${test_status}" 299 cat "${test_status}"
297 fi 300 fi
298 local end_time=$(date '+%s') 301 local end_time=$(date '+%s')
299 done 302 done
300 } 303 }
301 304
302 main $@ 305 main $@
OLDNEW
« no previous file with comments | « autotest_workon ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698