| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright 2016 the V8 project authors. All rights reserved. | 2 # Copyright 2016 the V8 project authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # A simple harness that downloads and runs 'jsfunfuzz' against d8. This | 6 # A simple harness that downloads and runs 'jsfunfuzz' against d8. This |
| 7 # 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 |
| 8 # automated usage. The package containing 'jsfunfuzz' can be found as an | 8 # automated usage. The package containing 'jsfunfuzz' can be found as an |
| 9 # attachment to this bug: | 9 # attachment to this bug: |
| 10 # https://bugzilla.mozilla.org/show_bug.cgi?id=jsfunfuzz | 10 # https://bugzilla.mozilla.org/show_bug.cgi?id=jsfunfuzz |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 - while True: | 58 - while True: |
| 59 + while iteration < 100: | 59 + while iteration < 100: |
| 60 iteration += 1 | 60 iteration += 1 |
| 61 logfilename = "w%d" % iteration | 61 logfilename = "w%d" % iteration |
| 62 one_timed_run(logfilename) | 62 one_timed_run(logfilename) |
| 63 EOF | 63 EOF |
| 64 fi | 64 fi |
| 65 | 65 |
| 66 fi | 66 fi |
| 67 | 67 |
| 68 flags='--debug-code --expose-gc --verify-gc' | 68 flags='--expose-gc --verify-gc' |
| 69 python -u "$jsfunfuzz_dir/jsfunfuzz/multi_timed_run.py" 300 \ | 69 python -u "$jsfunfuzz_dir/jsfunfuzz/multi_timed_run.py" 300 \ |
| 70 "$d8" $flags "$jsfunfuzz_dir/jsfunfuzz/jsfunfuzz.js" | 70 "$d8" $flags "$jsfunfuzz_dir/jsfunfuzz/jsfunfuzz.js" |
| 71 exit_code=$(cat w* | grep " looking good" -c) | 71 exit_code=$(cat w* | grep " looking good" -c) |
| 72 exit_code=$((100-exit_code)) | 72 exit_code=$((100-exit_code)) |
| 73 | 73 |
| 74 if [ -n "$2" ]; then | 74 if [ -n "$2" ]; then |
| 75 archive="$2" | 75 archive="$2" |
| 76 else | 76 else |
| 77 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 |
| 78 fi | 78 fi |
| 79 echo "Creating archive $archive" | 79 echo "Creating archive $archive" |
| 80 tar -cjf $archive err-* w* | 80 tar -cjf $archive err-* w* |
| 81 rm -f err-* w* | 81 rm -f err-* w* |
| 82 | 82 |
| 83 echo "Total failures: $exit_code" | 83 echo "Total failures: $exit_code" |
| 84 exit $exit_code | 84 exit $exit_code |
| OLD | NEW |