OLD | NEW |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright 2012 the V8 project authors. All rights reserved. | 2 # Copyright 2016 the V8 project authors. All rights reserved. |
3 # Redistribution and use in source and binary forms, with or without | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # modification, are permitted provided that the following conditions are | 4 # found in the LICENSE file. |
5 # met: | |
6 # | |
7 # * Redistributions of source code must retain the above copyright | |
8 # notice, this list of conditions and the following disclaimer. | |
9 # * Redistributions in binary form must reproduce the above | |
10 # copyright notice, this list of conditions and the following | |
11 # disclaimer in the documentation and/or other materials provided | |
12 # with the distribution. | |
13 # * Neither the name of Google Inc. nor the names of its | |
14 # contributors may be used to endorse or promote products derived | |
15 # from this software without specific prior written permission. | |
16 # | |
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
28 | 5 |
29 # A simple harness that downloads and runs 'jsfunfuzz' against d8. This | 6 # A simple harness that downloads and runs 'jsfunfuzz' against d8. This |
30 # takes a long time because it runs many iterations and is intended for | 7 # takes a long time because it runs many iterations and is intended for |
31 # automated usage. The package containing 'jsfunfuzz' can be found as an | 8 # automated usage. The package containing 'jsfunfuzz' can be found as an |
32 # attachment to this bug: | 9 # attachment to this bug: |
33 # https://bugzilla.mozilla.org/show_bug.cgi?id=jsfunfuzz | 10 # https://bugzilla.mozilla.org/show_bug.cgi?id=jsfunfuzz |
34 | 11 |
35 JSFUNFUZZ_URL="https://bugzilla.mozilla.org/attachment.cgi?id=310631" | 12 JSFUNFUZZ_URL="https://bugzilla.mozilla.org/attachment.cgi?id=310631" |
36 JSFUNFUZZ_MD5="d0e497201c5cd7bffbb1cdc1574f4e32" | 13 JSFUNFUZZ_MD5="d0e497201c5cd7bffbb1cdc1574f4e32" |
37 | 14 |
38 v8_root=$(readlink -f $(dirname $BASH_SOURCE)/../) | 15 v8_root=$(readlink -f $(dirname $BASH_SOURCE)/../../) |
39 jsfunfuzz_dir="$v8_root/tools/jsfunfuzz" | 16 jsfunfuzz_dir="$v8_root/tools/jsfunfuzz" |
17 cd "$jsfunfuzz_dir" | |
Michael Achenbach
2016/02/18 15:01:42
Enforce to run fuzzer relative to fuzzer dir, as t
| |
40 | 18 |
41 if [ -n "$1" ]; then | 19 if [ -n "$1" ]; then |
42 d8="${v8_root}/$1" | 20 d8="${v8_root}/$1" |
43 else | 21 else |
44 d8="${v8_root}/d8" | 22 d8="${v8_root}/d8" |
45 fi | 23 fi |
46 | 24 |
47 if [ ! -f "$d8" ]; then | 25 if [ ! -f "$d8" ]; then |
48 echo "Failed to find d8 binary: $d8" | 26 echo "Failed to find d8 binary: $d8" |
49 exit 1 | 27 exit 1 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 archive="$2" | 75 archive="$2" |
98 else | 76 else |
99 archive=fuzz-results-$(date +%Y%m%d%H%M%S).tar.bz2 | 77 archive=fuzz-results-$(date +%Y%m%d%H%M%S).tar.bz2 |
100 fi | 78 fi |
101 echo "Creating archive $archive" | 79 echo "Creating archive $archive" |
102 tar -cjf $archive err-* w* | 80 tar -cjf $archive err-* w* |
103 rm -f err-* w* | 81 rm -f err-* w* |
104 | 82 |
105 echo "Total failures: $exit_code" | 83 echo "Total failures: $exit_code" |
106 exit $exit_code | 84 exit $exit_code |
OLD | NEW |