| 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 # Load common constants. This should be the first executable line. | 7 # Load common constants. This should be the first executable line. |
| 8 # The path to common.sh should be relative to your script's location. | 8 # The path to common.sh should be relative to your script's location. |
| 9 . "$(dirname "$0")/common.sh" | 9 . "$(dirname "$0")/common.sh" |
| 10 | 10 |
| 11 # Script must be run inside the chroot | 11 # Script must be run inside the chroot |
| 12 assert_inside_chroot | 12 restart_in_chroot_if_needed $* |
| 13 get_default_board | 13 get_default_board |
| 14 | 14 |
| 15 # Flags | 15 # Flags |
| 16 DEFINE_string build_root "$DEFAULT_BUILD_ROOT" \ | 16 DEFINE_string build_root "$DEFAULT_BUILD_ROOT" \ |
| 17 "Root of build output" | 17 "Root of build output" |
| 18 DEFINE_string board "$DEFAULT_BOARD" \ | 18 DEFINE_string board "$DEFAULT_BOARD" \ |
| 19 "Target board of which tests were built" | 19 "Target board of which tests were built" |
| 20 | 20 |
| 21 # Parse command line | 21 # Parse command line |
| 22 FLAGS "$@" || exit 1 | 22 FLAGS "$@" || exit 1 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 39 # NOTE: We currently skip cryptohome_tests (which happens to have a different | 39 # NOTE: We currently skip cryptohome_tests (which happens to have a different |
| 40 # suffix than the other tests), because it doesn't work. | 40 # suffix than the other tests), because it doesn't work. |
| 41 for i in /build/${FLAGS_board}/tests/*_{test,unittests}; do | 41 for i in /build/${FLAGS_board}/tests/*_{test,unittests}; do |
| 42 if [[ "`file -b $i`" = "POSIX shell script text executable" ]]; then | 42 if [[ "`file -b $i`" = "POSIX shell script text executable" ]]; then |
| 43 LD_LIBRARY_PATH=$LD_LIBRARY_PATH /build/${FLAGS_board}/lib/ld-linux.so.2 /bu
ild/${FLAGS_board}/bin/bash $i | 43 LD_LIBRARY_PATH=$LD_LIBRARY_PATH /build/${FLAGS_board}/lib/ld-linux.so.2 /bu
ild/${FLAGS_board}/bin/bash $i |
| 44 else | 44 else |
| 45 LD_LIBRARY_PATH=$LD_LIBRARY_PATH /build/${FLAGS_board}/lib/ld-linux.so.2 $i | 45 LD_LIBRARY_PATH=$LD_LIBRARY_PATH /build/${FLAGS_board}/lib/ld-linux.so.2 $i |
| 46 fi | 46 fi |
| 47 done | 47 done |
| 48 | 48 |
| OLD | NEW |