OLD | NEW |
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 a chroot environment. The idea | 7 # This script makes autotest client tests inside a chroot environment. The idea |
8 # is to compile any platform-dependent autotest client tests in the build | 8 # is to compile any platform-dependent autotest client tests in the build |
9 # environment, since client systems under test lack the proper toolchain. | 9 # environment, since client systems under test lack the proper toolchain. |
10 # | 10 # |
11 # The user can later run autotest against an ssh enabled test client system, or | 11 # The user can later run autotest against an ssh enabled test client system, or |
12 # install the compiled client tests directly onto the rootfs image. | 12 # install the compiled client tests directly onto the rootfs image. |
13 | 13 |
14 . "$(dirname "$0")/common.sh" | 14 . "$(dirname "$0")/common.sh" |
15 | 15 |
16 get_default_board | 16 get_default_board |
17 | 17 |
18 DEFINE_string board "$DEFAULT_BOARD" \ | 18 DEFINE_string board "$DEFAULT_BOARD" \ |
19 "The board for which you are building autotest" | 19 "The board for which you are building autotest" |
20 | 20 |
21 FLAGS "$@" || exit 1 | 21 FLAGS "$@" || exit 1 |
22 | 22 |
23 if [[ -n "${CROS_WORKON_SRCROOT}" ]]; then | 23 if [[ -n "${CROS_WORKON_SRCROOT}" ]]; then |
24 if [[ -z "${FLAGS_board}" ]]; then | 24 if [[ -z "${FLAGS_board}" ]]; then |
25 setup_board_warning | 25 setup_board_warning |
26 exit 1 | 26 exit 1 |
27 fi | 27 fi |
| 28 $(dirname "$0")/cros_workon --board=${FLAGS_board} start \ |
| 29 autotest autotest-tests |
28 emerge-${FLAGS_board} autotest-tests | 30 emerge-${FLAGS_board} autotest-tests |
29 else | 31 else |
30 ./autotest --noprompt --build=all --board="${DEFAULT_BOARD}" $@ | 32 ./autotest --noprompt --build=all --board="${FLAGS_board}" $@ |
31 fi | 33 fi |
32 | 34 |
OLD | NEW |