| 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 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 function cleanup() { | 44 function cleanup() { |
| 45 cd - | 45 cd - |
| 46 rm -rf $TEST_CWD | 46 rm -rf $TEST_CWD |
| 47 trap - 0 | 47 trap - 0 |
| 48 } | 48 } |
| 49 | 49 |
| 50 trap cleanup ERR 0 | 50 trap cleanup ERR 0 |
| 51 | 51 |
| 52 # NOTE: We currently skip cryptohome_tests (which happens to have a different | 52 # NOTE: We currently skip cryptohome_tests (which happens to have a different |
| 53 # suffix than the other tests), because it doesn't work. | 53 # suffix than the other tests), because it doesn't work. |
| 54 # NOTE: Removed explicit use of the target board's ld-linux.so.2 so that this |
| 55 # will work on hardened builds (with PIE on by default). Tests pass on |
| 56 # hardened and non-hardened builds without this explicit use, but we only |
| 57 # disable this on hardened, since that is where the PIE conflict happens. |
| 54 for i in ${TESTS_DIR}/*_{test,unittests}; do | 58 for i in ${TESTS_DIR}/*_{test,unittests}; do |
| 55 if [[ "`file -b $i`" = "POSIX shell script text executable" ]]; then | 59 if [[ "`file -b $i`" = "POSIX shell script text executable" ]]; then |
| 56 LD_LIBRARY_PATH=$LD_LIBRARY_PATH /build/${FLAGS_board}/lib/ld-linux.so.2 /bu
ild/${FLAGS_board}/bin/bash $i | 60 if [[ -f /etc/hardened ]]; then |
| 61 LD_LIBRARY_PATH=$LD_LIBRARY_PATH /build/${FLAGS_board}/bin/bash $i |
| 62 else |
| 63 LD_LIBRARY_PATH=$LD_LIBRARY_PATH /build/${FLAGS_board}/lib/ld-linux.so.2 /
build/${FLAGS_board}/bin/bash $i |
| 64 fi |
| 57 else | 65 else |
| 58 LD_LIBRARY_PATH=$LD_LIBRARY_PATH /build/${FLAGS_board}/lib/ld-linux.so.2 $i | 66 if [[ -f /etc/hardened ]]; then |
| 67 LD_LIBRARY_PATH=$LD_LIBRARY_PATH $i |
| 68 else |
| 69 LD_LIBRARY_PATH=$LD_LIBRARY_PATH /build/${FLAGS_board}/lib/ld-linux.so.2 $
i |
| 70 fi |
| 59 fi | 71 fi |
| 60 done | 72 done |
| 73 |
| 74 |
| OLD | NEW |