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 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. |
11 # | 11 # |
12 # The user can enter_chroot later and run autotest against an ssh | 12 # The user can later run autotest against an ssh enabled test client system, or |
13 # enabled test client system, or install the compiled client tests | 13 # install the compiled client tests directly onto the rootfs image, using |
14 # directly onto the rootfs image, using mod_image_for_test. | 14 # mod_image_for_test.sh. |
15 | 15 |
16 . "$(dirname "$0")/common.sh" | 16 . "$(dirname "$0")/common.sh" |
17 | 17 |
18 # Script must be run inside the chroot | 18 # Script must be run inside the chroot |
19 assert_inside_chroot | 19 assert_inside_chroot |
20 | 20 |
21 # More useful help | 21 # More useful help |
22 FLAGS_HELP="usage: $0 [flags]" | 22 FLAGS_HELP="usage: $0 [flags]" |
23 | 23 |
24 # parse the command-line | 24 # parse the command-line |
(...skipping 25 matching lines...) Expand all Loading... |
50 touch ${sub_dir}/__init__.py | 50 touch ${sub_dir}/__init__.py |
51 done | 51 done |
52 touch ${base_dir}/__init__.py | 52 touch ${base_dir}/__init__.py |
53 done | 53 done |
54 } | 54 } |
55 | 55 |
56 cd ${AUTOTEST_DEST} | 56 cd ${AUTOTEST_DEST} |
57 touchInitPy client/tests client/site_tests | 57 touchInitPy client/tests client/site_tests |
58 touch __init__.py | 58 touch __init__.py |
59 | 59 |
| 60 # Export GCLIENT_ROOT so that tests have access to the source and build trees |
| 61 export GCLIENT_ROOT |
| 62 |
60 # run the magic test setup script. | 63 # run the magic test setup script. |
61 client/bin/autotest client/site_tests/setup/control | 64 client/bin/autotest client/site_tests/setup/control |
OLD | NEW |