2017-04-27 13:46:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright 2017 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.
|
|
|
|
|
2017-12-08 14:49:40 +00:00
|
|
|
# Exit immediately if a command exits with a non-zero status.
|
2017-04-27 13:46:07 +00:00
|
|
|
set -e
|
|
|
|
|
2017-12-08 14:49:40 +00:00
|
|
|
# Treat unset variables as an error when substituting.
|
|
|
|
set -u
|
|
|
|
|
|
|
|
# return value of a pipeline is the status of the last command to exit with a
|
|
|
|
# non-zero status, or zero if no command exited with a non-zero status
|
|
|
|
set -o pipefail
|
|
|
|
|
2017-04-27 13:46:07 +00:00
|
|
|
TOOLS_WASM_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
V8_DIR="${TOOLS_WASM_DIR}/../.."
|
2017-12-08 14:49:40 +00:00
|
|
|
SPEC_TEST_DIR=${V8_DIR}/test/wasm-spec-tests
|
2017-04-27 13:46:07 +00:00
|
|
|
|
|
|
|
cd ${V8_DIR}
|
|
|
|
|
2017-12-08 14:49:40 +00:00
|
|
|
rm -rf ${SPEC_TEST_DIR}/tests
|
|
|
|
mkdir ${SPEC_TEST_DIR}/tests
|
|
|
|
|
|
|
|
rm -rf ${SPEC_TEST_DIR}/tmp
|
|
|
|
mkdir ${SPEC_TEST_DIR}/tmp
|
2017-04-27 13:46:07 +00:00
|
|
|
|
2017-06-02 08:16:58 +00:00
|
|
|
./tools/dev/gm.py x64.release d8
|
2017-04-27 13:46:07 +00:00
|
|
|
|
2018-10-17 19:00:16 +00:00
|
|
|
cd ${V8_DIR}/test/wasm-js/data/interpreter
|
2018-01-24 12:58:41 +00:00
|
|
|
|
|
|
|
# The next step requires that ocaml is installed. See the README.md in
|
2018-10-17 19:00:16 +00:00
|
|
|
# ${V8_DIR}/test/wasm-js/data/interpreter/.
|
2017-10-10 10:54:50 +00:00
|
|
|
make clean all
|
2017-04-27 13:46:07 +00:00
|
|
|
|
2018-10-17 19:00:16 +00:00
|
|
|
cd ${V8_DIR}/test/wasm-js/data/test/core
|
2017-04-27 13:46:07 +00:00
|
|
|
|
|
|
|
|
2018-10-17 19:00:16 +00:00
|
|
|
./run.py --wasm ${V8_DIR}/test/wasm-js/data/interpreter/wasm --js ${V8_DIR}/out/x64.release/d8 --out ${SPEC_TEST_DIR}/tmp
|
2017-12-08 14:49:40 +00:00
|
|
|
cp ${SPEC_TEST_DIR}/tmp/*.js ${SPEC_TEST_DIR}/tests/
|
|
|
|
rm -rf ${SPEC_TEST_DIR}/tmp
|
2017-04-27 13:46:07 +00:00
|
|
|
|
2017-12-08 14:49:40 +00:00
|
|
|
cd ${SPEC_TEST_DIR}
|
|
|
|
echo
|
|
|
|
echo "The following files will get uploaded:"
|
|
|
|
ls tests
|
|
|
|
echo
|
2018-01-24 12:58:41 +00:00
|
|
|
|
|
|
|
# For the following command you first have to authenticate with google cloud
|
|
|
|
# storage. For that you have to execute
|
|
|
|
#
|
|
|
|
# > gsutil.py config
|
|
|
|
#
|
|
|
|
# When the script asks you for your project-id, use 0.
|
2017-04-27 13:46:07 +00:00
|
|
|
upload_to_google_storage.py -a -b v8-wasm-spec-tests tests
|