Index: tools/fuzz-harness.sh |
diff --git a/tools/fuzz-harness.sh b/tools/fuzz-harness.sh |
index 31023de3aba6792a1e470fe5fb7fd7367bb8be27..8e7f133c26366e97425e344440400a73ea4aa1e7 100755 |
--- a/tools/fuzz-harness.sh |
+++ b/tools/fuzz-harness.sh |
@@ -36,6 +36,7 @@ JSFUNFUZZ_URL="https://bugzilla.mozilla.org/attachment.cgi?id=310631" |
JSFUNFUZZ_MD5="d0e497201c5cd7bffbb1cdc1574f4e32" |
v8_root=$(readlink -f $(dirname $BASH_SOURCE)/../) |
+jsfunfuzz_dir="$v8_root/tools/jsfunfuzz" |
if [ -n "$1" ]; then |
d8="${v8_root}/$1" |
@@ -48,24 +49,28 @@ if [ ! -f "$d8" ]; then |
exit 1 |
fi |
-jsfunfuzz_file="$v8_root/tools/jsfunfuzz.zip" |
-if [ ! -f "$jsfunfuzz_file" ]; then |
- echo "Downloading $jsfunfuzz_file ..." |
- wget -q -O "$jsfunfuzz_file" $JSFUNFUZZ_URL || exit 1 |
-fi |
+# Deprecated download method. A prepatched archive is downloaded as a hook |
+# if jsfunfuzz=1 is specified as a gyp flag. Requires google.com authentication |
+# for google storage. |
+if [ "$2" == "--download" ]; then |
Michael Achenbach
2016/02/18 09:03:49
There should be only indentation here and one line
|
-jsfunfuzz_sum=$(md5sum "$jsfunfuzz_file" | awk '{ print $1 }') |
-if [ $jsfunfuzz_sum != $JSFUNFUZZ_MD5 ]; then |
- echo "Failed to verify checksum!" |
- exit 1 |
-fi |
+ jsfunfuzz_file="$v8_root/tools/jsfunfuzz.zip" |
+ if [ ! -f "$jsfunfuzz_file" ]; then |
+ echo "Downloading $jsfunfuzz_file ..." |
+ wget -q -O "$jsfunfuzz_file" $JSFUNFUZZ_URL || exit 1 |
+ fi |
-jsfunfuzz_dir="$v8_root/tools/jsfunfuzz" |
-if [ ! -d "$jsfunfuzz_dir" ]; then |
- echo "Unpacking into $jsfunfuzz_dir ..." |
- unzip "$jsfunfuzz_file" -d "$jsfunfuzz_dir" || exit 1 |
- echo "Patching runner ..." |
- cat << EOF | patch -s -p0 -d "$v8_root" |
+ jsfunfuzz_sum=$(md5sum "$jsfunfuzz_file" | awk '{ print $1 }') |
+ if [ $jsfunfuzz_sum != $JSFUNFUZZ_MD5 ]; then |
+ echo "Failed to verify checksum!" |
+ exit 1 |
+ fi |
+ |
+ if [ ! -d "$jsfunfuzz_dir" ]; then |
+ echo "Unpacking into $jsfunfuzz_dir ..." |
+ unzip "$jsfunfuzz_file" -d "$jsfunfuzz_dir" || exit 1 |
+ echo "Patching runner ..." |
+ cat << EOF | patch -s -p0 -d "$v8_root" |
--- tools/jsfunfuzz/jsfunfuzz/multi_timed_run.py~ |
+++ tools/jsfunfuzz/jsfunfuzz/multi_timed_run.py |
@@ -125,7 +125,7 @@ |
@@ -78,6 +83,8 @@ if [ ! -d "$jsfunfuzz_dir" ]; then |
logfilename = "w%d" % iteration |
one_timed_run(logfilename) |
EOF |
+ fi |
+ |
fi |
flags='--debug-code --expose-gc --verify-gc' |