Home | History | Annotate | Download | only in tools
      1 #!/bin/bash
      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
      4 # found in the LICENSE file.
      5 
      6 set -e
      7 
      8 TOOLS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
      9 
     10 cd ${TOOLS_DIR}/..
     11 
     12 rm -rf test/fuzzer/wasm
     13 rm -rf test/fuzzer/wasm_asmjs
     14 
     15 make x64.release -j
     16 
     17 mkdir -p test/fuzzer/wasm
     18 mkdir -p test/fuzzer/wasm_asmjs
     19 
     20 # asm.js
     21 ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
     22   --mode=release --no-presubmit --extra-flags="--dump-wasm-module \
     23   --dump-wasm-module-path=./test/fuzzer/wasm_asmjs/" mjsunit/wasm/asm*
     24 ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
     25   --mode=release --no-presubmit --extra-flags="--dump-wasm-module \
     26   --dump-wasm-module-path=./test/fuzzer/wasm_asmjs/" mjsunit/asm/*
     27 ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
     28   --mode=release --no-presubmit --extra-flags="--dump-wasm-module \
     29   --dump-wasm-module-path=./test/fuzzer/wasm_asmjs/" mjsunit/regress/asm/*
     30 # WASM
     31 ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
     32   --mode=release --no-presubmit --extra-flags="--dump-wasm-module \
     33   --dump-wasm-module-path=./test/fuzzer/wasm/" unittests
     34 ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
     35   --mode=release --no-presubmit --extra-flags="--dump-wasm-module \
     36   --dump-wasm-module-path=./test/fuzzer/wasm/" mjsunit/wasm/*
     37 ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
     38   --mode=release --no-presubmit --extra-flags="--dump-wasm-module \
     39   --dump-wasm-module-path=./test/fuzzer/wasm/" \
     40   $(cd test/; ls cctest/wasm/test-*.cc | \
     41   sed -es/wasm\\///g | sed -es/[.]cc/\\/\\*/g)
     42 
     43 # Delete items over 20k.
     44 for x in $(find ./test/fuzzer/wasm/ -type f -size +20k)
     45 do
     46   rm $x
     47 done
     48 for x in $(find ./test/fuzzer/wasm_asmjs/ -type f -size +20k)
     49 do
     50   rm $x
     51 done
     52 
     53 # Upload changes.
     54 cd test/fuzzer
     55 upload_to_google_storage.py -a -b v8-wasm-fuzzer wasm
     56 upload_to_google_storage.py -a -b v8-wasm-asmjs-fuzzer wasm_asmjs
     57