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

Side by Side Diff: bin/cros_run_wifi_tests.sh

Issue 6240018: This starts to fix the scripts so that they load from /usr/lib/crosutils (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: fixing bad merge Created 9 years, 10 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 | « bin/cros_run_vm_update ('k') | bin/cros_sign_to_ssd » ('j') | 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 # Wrapper script around run_remote_tests.sh that knows how to find 7 # Wrapper script around run_remote_tests.sh that knows how to find
8 # device test cells. 8 # device test cells.
9 9
10 # --- BEGIN COMMON.SH BOILERPLATE ---
11 # Load common CrOS utilities. Inside the chroot this file is installed in
12 # /usr/lib/crosutils. Outside the chroot we find it relative to the script's
13 # location.
14 find_common_sh() {
15 local common_paths=(/usr/lib/crosutils "$(dirname "$(readlink -f "$0")")/..")
16 local path
10 17
11 # TODO(pstew): Apparently the script files are in transition from 18 SCRIPT_ROOT=
12 # src/scripts to src/scripts/bin. However this state has existed 19 for path in "${common_paths[@]}"; do
13 # for months now, therefore we need to look for the common libs in 20 if [ -r "${path}/common.sh" ]; then
14 # both places 21 SCRIPT_ROOT=${path}
15 script_root=$(dirname $0) 22 break
16 if [ -f ${script_root}/../common.sh ] ; then 23 fi
17 script_root=${script_root}/.. 24 done
18 fi 25 }
19 26
20 . "${script_root}/common.sh" 27 find_common_sh
28 . "${SCRIPT_ROOT}/common.sh" || (echo "Unable to load common.sh" && exit 1)
29 # --- END COMMON.SH BOILERPLATE ---
21 30
22 # Figure out the default chromelab server name. In order for this to 31 # Figure out the default chromelab server name. In order for this to
23 # work correctly, you have to: 32 # work correctly, you have to:
24 # 33 #
25 # - Put the hostname into "scripts/.default_wifi_test_lab" 34 # - Put the hostname into "scripts/.default_wifi_test_lab"
26 # - Create an /etc/hosts entry in your chroot for that hostname 35 # - Create an /etc/hosts entry in your chroot for that hostname
27 # (if it isn't findable via DNS) 36 # (if it isn't findable via DNS)
28 # - Make sure you have created a wifi_testbed_${lab} file in the 37 # - Make sure you have created a wifi_testbed_${lab} file in the
29 # ${autotest}/files/client/config/ directory 38 # ${autotest}/files/client/config/ directory
30 if [ -f "$GCLIENT_ROOT/src/scripts/.default_wifi_test_lab" ] ; then 39 if [ -f "$GCLIENT_ROOT/src/scripts/.default_wifi_test_lab" ] ; then
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 done) 147 done)
139 148
140 if [ -z "$ret" ] ; then 149 if [ -z "$ret" ] ; then
141 echo ">>> Cell or host not found at $lab_url" 150 echo ">>> Cell or host not found at $lab_url"
142 exit 1 151 exit 1
143 fi 152 fi
144 153
145 set $ret 154 set $ret
146 remote=$1 155 remote=$1
147 shift 156 shift
148 for arg in $*; do 157 for arg in "$@"; do
149 append_arg $arg 158 append_arg $arg
150 done 159 done
151 160
152 eval "exec ${script_root}/run_remote_tests.sh \ 161 eval "exec ${SCRIPTS_DIR}/run_remote_tests.sh \
153 --args=\"${run_remote_args}\" --remote=${remote} $run_remote_flags \ 162 --args=\"${run_remote_args}\" --remote=${remote} $run_remote_flags \
154 $FLAGS_ARGV" 163 $FLAGS_ARGV"
OLDNEW
« no previous file with comments | « bin/cros_run_vm_update ('k') | bin/cros_sign_to_ssd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698