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

Side by Side Diff: check_control_files.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 | « build_kernel_image.sh ('k') | clean_loopback_devices » ('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) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 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 # This script will check all existing AutoTest control files for correctness. 7 # This script will check all existing AutoTest control files for correctness.
8 8
9 # Set pipefail so it will capture any nonzer exit codes 9 # Set pipefail so it will capture any nonzer exit codes
10 set -o pipefail 10 set -o pipefail
11 11
12 . "$(dirname "$0")/common.sh" 12 # --- BEGIN COMMON.SH BOILERPLATE ---
13 # Load common CrOS utilities. Inside the chroot this file is installed in
14 # /usr/lib/crosutils. Outside the chroot we find it relative to the script's
15 # location.
16 find_common_sh() {
17 local common_paths=(/usr/lib/crosutils $(dirname "$(readlink -f "$0")"))
18 local path
19
20 SCRIPT_ROOT=
21 for path in "${common_paths[@]}"; do
22 if [ -r "${path}/common.sh" ]; then
23 SCRIPT_ROOT=${path}
24 break
25 fi
26 done
27 }
28
29 find_common_sh
30 . "${SCRIPT_ROOT}/common.sh" || (echo "Unable to load common.sh" && exit 1)
31 # --- END COMMON.SH BOILERPLATE ---
13 32
14 AUTOTEST_ROOT=${SRC_ROOT}/third_party/autotest/files 33 AUTOTEST_ROOT=${SRC_ROOT}/third_party/autotest/files
15 CHECKSCRIPT=${AUTOTEST_ROOT}/utils/check_control_file_vars.py 34 CHECKSCRIPT=${AUTOTEST_ROOT}/utils/check_control_file_vars.py
16 SITE_TESTS=${AUTOTEST_ROOT}/client/site_tests 35 SITE_TESTS=${AUTOTEST_ROOT}/client/site_tests
17 36
18 find $SITE_TESTS -maxdepth 2 -name control | xargs -n1 $CHECKSCRIPT 37 find $SITE_TESTS -maxdepth 2 -name control | xargs -n1 $CHECKSCRIPT
19 38
20 if [ $? -ne 0 ] 39 if [ $? -ne 0 ]
21 then 40 then
22 exit 1 41 exit 1
23 fi 42 fi
OLDNEW
« no previous file with comments | « build_kernel_image.sh ('k') | clean_loopback_devices » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698