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

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

Issue 1216001: Look for ERROR too. Not sure if BAD actually ever shows up. (Closed)
Patch Set: Created 10 years, 9 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 | « no previous file | 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 # Returns an error if the test_result_file has text which indicates 59 # Returns an error if the test_result_file has text which indicates
60 # the test was not run successfully. 60 # the test was not run successfully.
61 # Arguments: 61 # Arguments:
62 # $1 - file name of autotest status for to check for success 62 # $1 - file name of autotest status for to check for success
63 # Returns: 63 # Returns:
64 # None 64 # None
65 function is_successful_test() { 65 function is_successful_test() {
66 local file="$1" 66 local file="$1"
67 # To be successful, must not have FAIL or BAD in the file. 67 # To be successful, must not have BAD, ERROR or FAIL in the file.
68 if egrep -q "(BAD|FAIL)" "${file}"; then 68 if egrep -q "(BAD|ERROR|FAIL)" "${file}"; then
69 return 1 69 return 1
70 fi 70 fi
71 # To be successful, must have GOOD in the file. 71 # To be successful, must have GOOD in the file.
72 if ! grep -q GOOD "${file}"; then 72 if ! grep -q GOOD "${file}"; then
73 return 1 73 return 1
74 fi 74 fi
75 return 0 75 return 0
76 } 76 }
77 77
78 # Removes single quotes around parameter 78 # Removes single quotes around parameter
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 fi 245 fi
246 else 246 else
247 echo_color "red" ">>> FAILED: ${control_file}" 247 echo_color "red" ">>> FAILED: ${control_file}"
248 cat "${test_status}" 248 cat "${test_status}"
249 fi 249 fi
250 local end_time=$(date '+%s') 250 local end_time=$(date '+%s')
251 done 251 done
252 } 252 }
253 253
254 main $@ 254 main $@
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698