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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 fi | 143 fi |
144 | 144 |
145 local autoserv="${autotest_dir}/server/autoserv" | 145 local autoserv="${autotest_dir}/server/autoserv" |
146 | 146 |
147 local control_files_to_run="" | 147 local control_files_to_run="" |
148 | 148 |
149 # Now search for tests which unambiguously include the given identifier | 149 # Now search for tests which unambiguously include the given identifier |
150 local search_path=$(echo ${autotest_dir}/{client,server}/{tests,site_tests}) | 150 local search_path=$(echo ${autotest_dir}/{client,server}/{tests,site_tests}) |
151 for test_request in $FLAGS_ARGV; do | 151 for test_request in $FLAGS_ARGV; do |
152 test_request=$(remove_quotes "${test_request}") | 152 test_request=$(remove_quotes "${test_request}") |
153 ! finds=$(find ${search_path} -type f -name control\* | \ | 153 ! finds=$(find ${search_path} -maxdepth 2 -type f -name control\* | \ |
154 egrep "${test_request}") | 154 egrep "${test_request}") |
155 if [[ -z "${finds}" ]]; then | 155 if [[ -z "${finds}" ]]; then |
156 echo "Can not find match for ${test_request}" | 156 echo "Can not find match for ${test_request}" |
157 exit 1 | 157 exit 1 |
158 fi | 158 fi |
159 local matches=$(echo "${finds}" | wc -l) | 159 local matches=$(echo "${finds}" | wc -l) |
160 if [[ ${matches} -gt 1 ]]; then | 160 if [[ ${matches} -gt 1 ]]; then |
161 echo "${test_request} is ambiguous:" | 161 echo "${test_request} is ambiguous:" |
162 echo "${finds}" | 162 echo "${finds}" |
163 exit 1 | 163 exit 1 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 echo "Parse failed." | tee -a "${FLAGS_output_file}" | 234 echo "Parse failed." | tee -a "${FLAGS_output_file}" |
235 FLAGS_cleanup=${FLAGS_FALSE} | 235 FLAGS_cleanup=${FLAGS_FALSE} |
236 fi | 236 fi |
237 fi | 237 fi |
238 done | 238 done |
239 | 239 |
240 echo "Output stored to ${FLAGS_output_file}" | 240 echo "Output stored to ${FLAGS_output_file}" |
241 } | 241 } |
242 | 242 |
243 main $@ | 243 main $@ |
OLD | NEW |