From aa5504fdec553d6f522b4de28640b4bcf29ea8dc Mon Sep 17 00:00:00 2001 From: Ken Mixter Date: Thu, 23 Sep 2010 17:12:06 -0700 Subject: [PATCH] crosutils: Make run_remote_tests' output for ambiguous case more clear. BUG=5817 TEST=run_remote_tests --remote=$IP control shows ^...$ on all lines. Change-Id: Ie0c4ac16493dc97044ec0bd0fd6d6e53a69c9041 Review URL: http://codereview.chromium.org/3473015 --- run_remote_tests.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/run_remote_tests.sh b/run_remote_tests.sh index 805c80966c..da3fbd5ea2 100755 --- a/run_remote_tests.sh +++ b/run_remote_tests.sh @@ -111,7 +111,8 @@ function main() { FLAGS "$@" || exit 1 if [[ -z "${FLAGS_ARGV}" ]]; then - echo "Please specify tests to run. For example:" + echo "Usage: $0 --remote=[hostname] [regexp...]:" + echo "Each regexp pattern must uniquely match a control file. For example:" echo " $0 --remote=MyMachine BootPerfServer" exit 1 fi @@ -185,15 +186,11 @@ function main() { fi local matches=$(echo "${finds}" | wc -l) if [[ ${matches} -gt 1 ]]; then - echo "" - echo_color "red" \ - ">>> \"${test_request}\" is ambiguous. These control file paths match:" + echo ">>> \"${test_request}\" is an ambiguous pattern. Disambiguate by" \ + "passing one of these patterns instead:" for FIND in ${finds}; do - echo_color "red" " * " "${FIND}" + echo " ^${FIND}\$" done - echo "" - echo ">>> Disambiguate by copy-and-pasting the whole path above" \ - "instead of passing \"${test_request}\"." exit 1 fi for i in $(seq 1 $FLAGS_iterations); do