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

Side by Side Diff: run_remote_tests.sh

Issue 3603012: Support run multiple control file under the same test directory. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: patch Created 10 years, 2 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 | Annotate | Revision Log
« 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 type=$(read_test_type "${control_file}") 220 type=$(read_test_type "${control_file}")
221 fi 221 fi
222 local option 222 local option
223 if [[ "${type}" == "client" ]]; then 223 if [[ "${type}" == "client" ]]; then
224 option="-c" 224 option="-c"
225 else 225 else
226 option="-s" 226 option="-s"
227 fi 227 fi
228 echo "" 228 echo ""
229 echo_color "yellow" ">>> Running ${type} test " ${control_file} 229 echo_color "yellow" ">>> Running ${type} test " ${control_file}
230 local control_file_name=$(basename "${control_file}")
230 local short_name=$(basename $(dirname "${control_file}")) 231 local short_name=$(basename $(dirname "${control_file}"))
232
233 # testName/control --> testName
234 # testName/control.bvt --> testName.bvt
235 # testName/control.regression --> testName.regression
236 # testName/some_control --> testName.some_control
237 if [[ "${control_file_name}" != control ]]; then
238 if [[ "${control_file_name}" == control.* ]]; then
239 short_name=${short_name}.${control_file_name/control./}
240 else
241 short_name=${short_name}.${control_file_name}
242 fi
243 fi
244
231 local results_dir_name="${short_name}" 245 local results_dir_name="${short_name}"
232 local results_dir="${TMP_INSIDE_CHROOT}/${results_dir_name}" 246 local results_dir="${TMP_INSIDE_CHROOT}/${results_dir_name}"
233 rm -rf "${results_dir}" 247 rm -rf "${results_dir}"
234 local verbose="" 248 local verbose=""
235 if [[ ${FLAGS_verbose} -eq $FLAGS_TRUE ]]; then 249 if [[ ${FLAGS_verbose} -eq $FLAGS_TRUE ]]; then
236 verbose="--verbose" 250 verbose="--verbose"
237 fi 251 fi
238 252
239 RAN_ANY_TESTS=${FLAGS_TRUE} 253 RAN_ANY_TESTS=${FLAGS_TRUE}
240 254
(...skipping 22 matching lines...) Expand all
263 "${option}" "${control_file}" -r "${results_dir}" ${verbose} \ 277 "${option}" "${control_file}" -r "${results_dir}" ${verbose} \
264 "${passthrough_args}" 278 "${passthrough_args}"
265 done 279 done
266 280
267 echo "" 281 echo ""
268 echo_color "yellow" ">>> Test results:" 282 echo_color "yellow" ">>> Test results:"
269 ./generate_test_report "${TMP}" --strip="${TMP}/" 283 ./generate_test_report "${TMP}" --strip="${TMP}/"
270 } 284 }
271 285
272 main "$@" 286 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