OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium 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 # Script to run layout tests under valgrind | 7 # Script to run layout tests under valgrind |
8 # Example: | 8 # Example: |
9 # sh $0 LayoutTests/fast | 9 # sh $0 LayoutTests/fast |
10 # Caveats: | 10 # Caveats: |
11 # More of an example than a universal script. | 11 # More of an example than a universal script. |
12 # Must be run from src directory. | 12 # Must be run from src directory. |
13 # Uses our standard suppressions; edit | 13 # Uses our standard suppressions; edit |
(...skipping 24 matching lines...) Expand all Loading... |
38 | 38 |
39 cat > vlayout-wrapper.sh <<"_EOF_" | 39 cat > vlayout-wrapper.sh <<"_EOF_" |
40 #!/bin/sh | 40 #!/bin/sh |
41 valgrind --suppressions=tools/valgrind/memcheck/suppressions.txt --tool=memcheck
--smc-check=all --num-callers=30 --trace-children=yes --leak-check=full --show-
possibly-lost=no --log-file=vlayout-%p.log --gen-suppressions=all --track-origin
s=yes "$@" | 41 valgrind --suppressions=tools/valgrind/memcheck/suppressions.txt --tool=memcheck
--smc-check=all --num-callers=30 --trace-children=yes --leak-check=full --show-
possibly-lost=no --log-file=vlayout-%p.log --gen-suppressions=all --track-origin
s=yes "$@" |
42 _EOF_ | 42 _EOF_ |
43 chmod +x vlayout-wrapper.sh | 43 chmod +x vlayout-wrapper.sh |
44 | 44 |
45 rm -f vlayout-*.log | 45 rm -f vlayout-*.log |
46 export BROWSER_WRAPPER=`pwd`/vlayout-wrapper.sh | 46 export BROWSER_WRAPPER=`pwd`/vlayout-wrapper.sh |
47 export G_SLICE=always-malloc | 47 export G_SLICE=always-malloc |
| 48 export NSS_DISABLE_UNLOAD=1 |
48 export NSS_DISABLE_ARENA_FREE_LIST=1 | 49 export NSS_DISABLE_ARENA_FREE_LIST=1 |
49 sh webkit/tools/layout_tests/run_webkit_tests.sh --run-singly -v --noshow-result
s --time-out-ms=200000 --nocheck-sys-deps --debug "$@" | 50 sh webkit/tools/layout_tests/run_webkit_tests.sh --run-singly -v --noshow-result
s --time-out-ms=200000 --nocheck-sys-deps --debug "$@" |
50 | 51 |
51 # Have to wait a bit for the output files to finish | 52 # Have to wait a bit for the output files to finish |
52 nfiles=`ls vlayout-*.log | wc -l` | 53 nfiles=`ls vlayout-*.log | wc -l` |
53 while true | 54 while true |
54 do | 55 do |
55 ndone=`egrep -l "LEAK SUMMARY|no leaks are possible" vlayout-*.log | wc -l` | 56 ndone=`egrep -l "LEAK SUMMARY|no leaks are possible" vlayout-*.log | wc -l` |
56 if test $nfiles = $ndone | 57 if test $nfiles = $ndone |
57 then | 58 then |
58 break | 59 break |
59 fi | 60 fi |
60 echo "Waiting for valgrind to finish..." | 61 echo "Waiting for valgrind to finish..." |
61 sleep 1 | 62 sleep 1 |
62 done | 63 done |
63 cat vlayout-*.log | 64 cat vlayout-*.log |
OLD | NEW |