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

Side by Side Diff: src/scripts/run_remote_tests.sh

Issue 560005: Make run_remote_test's use of ssh-agent more predictable. (Closed)
Patch Set: addressed style comments Created 10 years, 10 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 | « src/scripts/remote_access.sh ('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 11 matching lines...) Expand all
22 DEFINE_string machine_desc "" "Machine description used in database" 22 DEFINE_string machine_desc "" "Machine description used in database"
23 DEFINE_string build_desc "" "Build description used in database" 23 DEFINE_string build_desc "" "Build description used in database"
24 DEFINE_string chroot_dir "${DEFAULT_CHROOT_DIR}" "alternate chroot location" c 24 DEFINE_string chroot_dir "${DEFAULT_CHROOT_DIR}" "alternate chroot location" c
25 25
26 function cleanup() { 26 function cleanup() {
27 if [[ $FLAGS_cleanup -eq ${FLAGS_TRUE} ]]; then 27 if [[ $FLAGS_cleanup -eq ${FLAGS_TRUE} ]]; then
28 rm -rf "${TMP}" 28 rm -rf "${TMP}"
29 else 29 else
30 echo "Left temporary files at ${TMP}" 30 echo "Left temporary files at ${TMP}"
31 fi 31 fi
32 if [[ -n "${SSH_AGENT_PID}" ]] 32 cleanup_remote_access
33 then
34 kill ${SSH_AGENT_PID} 2>/dev/null
35 unset SSH_AGENT_PID SSH_AUTH_SOCK
36 fi
37 } 33 }
38 34
39 # Returns an error if the test_result_file has text which indicates 35 # Returns an error if the test_result_file has text which indicates
40 # the test was not run successfully. 36 # the test was not run successfully.
41 # Arguments: 37 # Arguments:
42 # $1 - file name of autotest status for to check for success 38 # $1 - file name of autotest status for to check for success
43 # Returns: 39 # Returns:
44 # None 40 # None
45 function is_successful_test() { 41 function is_successful_test() {
46 local file="$1" 42 local file="$1"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 echo "Parse failed." | tee -a "${FLAGS_output_file}" 203 echo "Parse failed." | tee -a "${FLAGS_output_file}"
208 FLAGS_cleanup=${FLAGS_FALSE} 204 FLAGS_cleanup=${FLAGS_FALSE}
209 fi 205 fi
210 fi 206 fi
211 done 207 done
212 208
213 echo "Output stored to ${FLAGS_output_file}" 209 echo "Output stored to ${FLAGS_output_file}"
214 } 210 }
215 211
216 main $@ 212 main $@
OLDNEW
« no previous file with comments | « src/scripts/remote_access.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698