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

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

Issue 1702008: Add crash_reporter functionality (Closed)
Patch Set: add set -e Created 10 years, 7 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/build_tests.sh ('k') | no next file » | 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 # 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 18 matching lines...) Expand all
29 fi 29 fi
30 30
31 TESTS_DIR="/build/${FLAGS_board}/tests" 31 TESTS_DIR="/build/${FLAGS_board}/tests"
32 LD_LIBRARY_PATH=/build/${FLAGS_board}/lib:/build/${FLAGS_board}/usr/lib:\ 32 LD_LIBRARY_PATH=/build/${FLAGS_board}/lib:/build/${FLAGS_board}/usr/lib:\
33 /build/${FLAGS_board}/usr/lib/gcc/i686-pc-linux-gnu/4.4.1/:\ 33 /build/${FLAGS_board}/usr/lib/gcc/i686-pc-linux-gnu/4.4.1/:\
34 /build/${FLAGS_board}/usr/lib/opengl/xorg-x11/lib 34 /build/${FLAGS_board}/usr/lib/opengl/xorg-x11/lib
35 35
36 # Die on error; print commands 36 # Die on error; print commands
37 set -ex 37 set -ex
38 38
39 # Change to a test directory to make it easier for tests to write
40 # to and clean up temporary files.
41 TEST_CWD=$(mktemp -d /tmp/run_tests.XXXX)
42 cd $TEST_CWD
43
44 function cleanup() {
45 cd -
46 rm -rf $TEST_CWD
47 trap - 0
48 }
49
50 trap cleanup ERR 0
51
39 # 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
40 # suffix than the other tests), because it doesn't work. 53 # suffix than the other tests), because it doesn't work.
41 for i in /build/${FLAGS_board}/tests/*_{test,unittests}; do 54 for i in ${TESTS_DIR}/*_{test,unittests}; do
42 if [[ "`file -b $i`" = "POSIX shell script text executable" ]]; then 55 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 56 LD_LIBRARY_PATH=$LD_LIBRARY_PATH /build/${FLAGS_board}/lib/ld-linux.so.2 /bu ild/${FLAGS_board}/bin/bash $i
44 else 57 else
45 LD_LIBRARY_PATH=$LD_LIBRARY_PATH /build/${FLAGS_board}/lib/ld-linux.so.2 $i 58 LD_LIBRARY_PATH=$LD_LIBRARY_PATH /build/${FLAGS_board}/lib/ld-linux.so.2 $i
46 fi 59 fi
47 done 60 done
48
OLDNEW
« no previous file with comments | « src/scripts/build_tests.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698