OLD | NEW |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright 2012 the V8 project authors. All rights reserved. | 2 # Copyright 2012 the V8 project authors. All rights reserved. |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 jsfunfuzz_sum=$(md5sum "$jsfunfuzz_file" | awk '{ print $1 }') | 57 jsfunfuzz_sum=$(md5sum "$jsfunfuzz_file" | awk '{ print $1 }') |
58 if [ $jsfunfuzz_sum != $JSFUNFUZZ_MD5 ]; then | 58 if [ $jsfunfuzz_sum != $JSFUNFUZZ_MD5 ]; then |
59 echo "Failed to verify checksum!" | 59 echo "Failed to verify checksum!" |
60 exit 1 | 60 exit 1 |
61 fi | 61 fi |
62 | 62 |
63 jsfunfuzz_dir="$v8_root/tools/jsfunfuzz" | 63 jsfunfuzz_dir="$v8_root/tools/jsfunfuzz" |
64 if [ ! -d "$jsfunfuzz_dir" ]; then | 64 if [ ! -d "$jsfunfuzz_dir" ]; then |
65 echo "Unpacking into $jsfunfuzz_dir ..." | 65 echo "Unpacking into $jsfunfuzz_dir ..." |
66 unzip "$jsfunfuzz_file" -d "$jsfunfuzz_dir" || exit 1 | 66 unzip "$jsfunfuzz_file" -d "$jsfunfuzz_dir" || exit 1 |
67 echo "Patching runner ..." | |
68 cat > "$v8_root/tools/jsfunfuzz.patch" <<- EOF | |
Jakob Kummerow
2012/05/23 07:49:55
nit: "<< EOF" is sufficient ("<<-" strips leading
Michael Starzinger
2012/05/23 07:55:59
Done.
| |
69 --- tools/jsfunfuzz/jsfunfuzz/multi_timed_run.py~ | |
70 +++ tools/jsfunfuzz/jsfunfuzz/multi_timed_run.py | |
71 @@ -125,7 +125,7 @@ | |
72 | |
73 def many_timed_runs(): | |
74 iteration = 0 | |
75 - while True: | |
76 + while iteration < 100: | |
77 iteration += 1 | |
78 logfilename = "w%d" % iteration | |
79 one_timed_run(logfilename) | |
80 EOF | |
81 patch -s -p0 -d "$v8_root" < "$v8_root/tools/jsfunfuzz.patch" | |
67 fi | 82 fi |
68 | 83 |
69 flags='--debug-code --expose-gc --verify-gc' | 84 flags='--debug-code --expose-gc --verify-gc' |
70 python -u "$jsfunfuzz_dir/jsfunfuzz/multi_timed_run.py" 300 \ | 85 python -u "$jsfunfuzz_dir/jsfunfuzz/multi_timed_run.py" 300 \ |
71 "$d8" $flags "$jsfunfuzz_dir/jsfunfuzz/jsfunfuzz.js" | 86 "$d8" $flags "$jsfunfuzz_dir/jsfunfuzz/jsfunfuzz.js" |
72 exit_code=$(cat w* | grep " looking good" -c) | 87 exit_code=$(cat w* | grep " looking good" -c) |
73 exit_code=$((100-exit_code)) | 88 exit_code=$((100-exit_code)) |
74 tar -cjf fuzz-results-$(date +%y%m%d).tar.bz2 err-* w* | 89 tar -cjf fuzz-results-$(date +%y%m%d).tar.bz2 err-* w* |
75 rm -f err-* w* | 90 rm -f err-* w* |
76 | 91 |
77 echo "Total failures: $exit_code" | 92 echo "Total failures: $exit_code" |
78 exit $exit_code | 93 exit $exit_code |
OLD | NEW |