From 90a850ac116c7e5423220cedc1c8e4033aa36950 Mon Sep 17 00:00:00 2001 From: Zelidrag Hornung Date: Fri, 10 Sep 2010 14:25:59 -0700 Subject: [PATCH] Fixed run_remote_test.sh to work properly with the new location of chrome tests BUG=none TEST=none Review URL: http://codereview.chromium.org/3341028 Change-Id: I81a8d57b16e7789b0fd6673d9e3b208ce369a575 --- run_remote_tests.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/run_remote_tests.sh b/run_remote_tests.sh index 87738872c9..3296289fe0 100755 --- a/run_remote_tests.sh +++ b/run_remote_tests.sh @@ -163,9 +163,13 @@ function main() { fi local control_files_to_run="" - + local chrome_autotests="${CHROME_ROOT}/src/chrome/test/chromeos/autotest/files" # Now search for tests which unambiguously include the given identifier local search_path=$(echo {client,server}/{tests,site_tests}) + # Include chrome autotest in the search path + if [ -n "${CHROME_ROOT}" ]; then + search_path="${search_path} ${chrome_autotests}/client/site_tests" + fi pushd ${autotest_dir} > /dev/null for test_request in $FLAGS_ARGV; do test_request=$(remove_quotes "${test_request}") @@ -210,6 +214,10 @@ function main() { # Assume a line starts with TEST_TYPE = control_file=$(remove_quotes "${control_file}") local type=$(read_test_type "${autotest_dir}/${control_file}") + # Check if the control file is an absolute path (i.e. chrome autotests case) + if [[ ${control_file:0:1} == "/" ]]; then + type=$(read_test_type "${control_file}") + fi local option if [[ "${type}" == "client" ]]; then option="-c" @@ -245,6 +253,13 @@ function main() { autotest="./autotest${WORKON_SUFFIX}" fi + # Remove chrome autotest location prefix from control_file if needed + if [[ ${control_file:0:${#chrome_autotests}} == \ + "${chrome_autotests}" ]]; then + control_file="${control_file:${#chrome_autotests}+1}" + echo_color "yellow" ">>> Running chrome autotest " ${control_file} + fi + ${enter_chroot} ${autotest} --board "${FLAGS_board}" -m "${FLAGS_remote}" \ --ssh-port ${FLAGS_ssh_port} \ "${option}" "${control_file}" -r "${results_dir}" ${verbose} \