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

Side by Side Diff: src/scripts/autotest_lib.sh

Issue 1217005: fix autotest scripts for board variants (Closed)
Patch Set: Created 10 years, 9 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
« no previous file with comments | « no previous file | src/scripts/build_autotest.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 # 4 #
5 # Provides common commands for dealing running/building autotest 5 # Provides common commands for dealing running/building autotest
6 6
7 . "$(dirname "$0")/common.sh" 7 . "$(dirname "$0")/common.sh"
8 8
9 get_default_board 9 get_default_board
10 10
11 DEFINE_string board "$DEFAULT_BOARD" \ 11 DEFINE_string board "$DEFAULT_BOARD" \
12 "The board for which you are building autotest" 12 "The board for which you are building autotest"
13 13
14 function check_board() { 14 function check_board() {
15 local board_names="" 15 local board_names=""
16 local index=1 16 local index=1
17 local found=0 17 local found=0
18 local board_basename=$(echo "${FLAGS_board}" |cut -d '_' -f 1)
18 for overlay_path in "${SRC_ROOT}"/overlays/overlay-* 19 for overlay_path in "${SRC_ROOT}"/overlays/overlay-*
19 do 20 do
20 local overlay=$(basename "${overlay_path}") 21 local overlay=$(basename "${overlay_path}")
21 local board="${overlay#overlay-}" 22 local board="${overlay#overlay-}"
22 board_names[index]="${board}" 23 board_names[index]="${board}"
23 index+=1 24 index+=1
24 if [ "${FLAGS_board}" == "${board}" ] 25 if [ "${board_basename}" == "${board}" ]
25 then 26 then
26 found=1 27 found=1
27 fi 28 fi
28 done 29 done
29 30
30 if [ ${found} -eq 0 ] 31 if [ ${found} -eq 0 ]
31 then 32 then
32 echo "You are required to specify a supported board from the command line." 33 echo "You are required to specify a supported board from the command line."
33 echo "Supported boards are:" 34 echo "Supported boards are:"
34 for board in ${board_names[@]} 35 for board in ${board_names[@]}
(...skipping 11 matching lines...) Expand all
46 # $1 - original source directory 47 # $1 - original source directory
47 # $2 - target directory 48 # $2 - target directory
48 function update_chroot_autotest() { 49 function update_chroot_autotest() {
49 local original=$1 50 local original=$1
50 local target=$2 51 local target=$2
51 echo "Updating chroot Autotest from ${original} to ${target}..." 52 echo "Updating chroot Autotest from ${original} to ${target}..."
52 sudo mkdir -p "${target}" 53 sudo mkdir -p "${target}"
53 sudo chmod 777 "${target}" 54 sudo chmod 777 "${target}"
54 cp -fpru ${original}/{client,conmux,server,tko,utils,global_config.ini,shadow_ config.ini} ${target} 55 cp -fpru ${original}/{client,conmux,server,tko,utils,global_config.ini,shadow_ config.ini} ${target}
55 } 56 }
OLDNEW
« no previous file with comments | « no previous file | src/scripts/build_autotest.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698