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

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

Issue 588010: Support multiple chroots (Closed)
Patch Set: Created 10 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
« no previous file with comments | « src/scripts/autotest_lib.sh ('k') | src/scripts/run_remote_tests.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 #!/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 # This script makes autotest client tests inside an Ubuntu chroot 7 # This script makes autotest client tests inside an Ubuntu chroot
8 # environment. The idea is to compile any platform-dependent autotest 8 # environment. The idea is to compile any platform-dependent autotest
9 # client tests in the build environment, since client systems under 9 # client tests in the build environment, since client systems under
10 # test lack the proper toolchain. 10 # test lack the proper toolchain.
(...skipping 20 matching lines...) Expand all
31 FLAGS "$@" || exit 1 31 FLAGS "$@" || exit 1
32 eval set -- "${FLAGS_ARGV}" 32 eval set -- "${FLAGS_ARGV}"
33 set -e 33 set -e
34 34
35 AUTOTEST_SRC="${GCLIENT_ROOT}/src/third_party/autotest/files" 35 AUTOTEST_SRC="${GCLIENT_ROOT}/src/third_party/autotest/files"
36 # Destination in chroot to install autotest. 36 # Destination in chroot to install autotest.
37 AUTOTEST_DEST="/usr/local/autotest" 37 AUTOTEST_DEST="/usr/local/autotest"
38 38
39 # Copy a local "installation" of autotest into the chroot, to avoid 39 # Copy a local "installation" of autotest into the chroot, to avoid
40 # polluting the src dir with tmp files, results, etc. 40 # polluting the src dir with tmp files, results, etc.
41 update_chroot_autotest "${CHROOT_TRUNK_DIR}/src/third_party/autotest/files" 41 update_chroot_autotest "${CHROOT_TRUNK_DIR}/src/third_party/autotest/files" \
42 "${AUTOTEST_DEST}"
42 43
43 # Create python package init files for top level test case dirs. 44 # Create python package init files for top level test case dirs.
44 function touchInitPy() { 45 function touchInitPy() {
45 local dirs=${1} 46 local dirs=${1}
46 for base_dir in $dirs 47 for base_dir in $dirs
47 do 48 do
48 local sub_dirs="$(find ${base_dir} -maxdepth 1 -type d)" 49 local sub_dirs="$(find ${base_dir} -maxdepth 1 -type d)"
49 for sub_dir in ${sub_dirs} 50 for sub_dir in ${sub_dirs}
50 do 51 do
51 touch ${sub_dir}/__init__.py 52 touch ${sub_dir}/__init__.py
52 done 53 done
53 touch ${base_dir}/__init__.py 54 touch ${base_dir}/__init__.py
54 done 55 done
55 } 56 }
56 57
57 cd ${AUTOTEST_DEST} 58 cd ${AUTOTEST_DEST}
58 touchInitPy client/tests client/site_tests 59 touchInitPy client/tests client/site_tests
59 touch __init__.py 60 touch __init__.py
60 61
61 # Export GCLIENT_ROOT so that tests have access to the source and build trees 62 # Export GCLIENT_ROOT so that tests have access to the source and build trees
62 export GCLIENT_ROOT 63 export GCLIENT_ROOT
63 64
64 # run the magic test setup script. 65 # run the magic test setup script.
65 echo "Building tests using ${FLAGS_control}..." 66 echo "Building tests using ${FLAGS_control}..."
66 client/bin/autotest ${FLAGS_control} 67 client/bin/autotest ${FLAGS_control}
OLDNEW
« no previous file with comments | « src/scripts/autotest_lib.sh ('k') | src/scripts/run_remote_tests.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698