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

Side by Side Diff: tools/fuzz-harness.sh

Issue 10409073: Fix harness for fuzzer to run for 100 iterations only. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Jakob Kummerow. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 # 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
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 << EOF | patch -s -p0 -d "$v8_root"
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
67 fi 81 fi
68 82
69 flags='--debug-code --expose-gc --verify-gc' 83 flags='--debug-code --expose-gc --verify-gc'
70 python -u "$jsfunfuzz_dir/jsfunfuzz/multi_timed_run.py" 300 \ 84 python -u "$jsfunfuzz_dir/jsfunfuzz/multi_timed_run.py" 300 \
71 "$d8" $flags "$jsfunfuzz_dir/jsfunfuzz/jsfunfuzz.js" 85 "$d8" $flags "$jsfunfuzz_dir/jsfunfuzz/jsfunfuzz.js"
72 exit_code=$(cat w* | grep " looking good" -c) 86 exit_code=$(cat w* | grep " looking good" -c)
73 exit_code=$((100-exit_code)) 87 exit_code=$((100-exit_code))
74 tar -cjf fuzz-results-$(date +%y%m%d).tar.bz2 err-* w* 88 tar -cjf fuzz-results-$(date +%y%m%d).tar.bz2 err-* w*
75 rm -f err-* w* 89 rm -f err-* w*
76 90
77 echo "Total failures: $exit_code" 91 echo "Total failures: $exit_code"
78 exit $exit_code 92 exit $exit_code
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698