update-wasm-fuzzers.sh 1.46 KB
Newer Older
1 2 3 4 5 6 7
#!/bin/bash
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

set -e

8
TOOLS_WASM_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
9

10
cd ${TOOLS_WASM_DIR}/../..
11

12
rm -rf test/fuzzer/wasm_corpus
13

14
tools/dev/gm.py x64.release all
15

16
mkdir -p test/fuzzer/wasm_corpus
17

18
# wasm
19
./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
20
  --mode=release --no-presubmit --extra-flags="--dump-wasm-module \
21
  --dump-wasm-module-path=./test/fuzzer/wasm_corpus/" unittests
22 23
./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
  --mode=release --no-presubmit --extra-flags="--dump-wasm-module \
24
  --dump-wasm-module-path=./test/fuzzer/wasm_corpus/" wasm-spec-tests/*
25
./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
26
  --mode=release --no-presubmit --extra-flags="--dump-wasm-module \
27
  --dump-wasm-module-path=./test/fuzzer/wasm_corpus/" mjsunit/wasm/*
28
./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
29
  --mode=release --no-presubmit --extra-flags="--dump-wasm-module \
30
  --dump-wasm-module-path=./test/fuzzer/wasm_corpus/" \
31 32 33 34
  $(cd test/; ls cctest/wasm/test-*.cc | \
  sed -es/wasm\\///g | sed -es/[.]cc/\\/\\*/g)

# Delete items over 20k.
35
for x in $(find ./test/fuzzer/wasm_corpus/ -type f -size +20k)
36 37 38 39 40 41
do
  rm $x
done

# Upload changes.
cd test/fuzzer
42
upload_to_google_storage.py -a -b v8-wasm-fuzzer wasm_corpus