4347d0add1
This is a reland of a12203c64b
Original change's description:
> [wasm] Add a new wasm-js testsuite to run js-api tests
>
> These changes were necessary to run with the new style of jsapi tests
> introduced in https://github.com/WebAssembly/spec/pull/883.
>
> Change-Id: I4629dd48d595ed97ed0607dec9e7d9808c706a7e
> Reviewed-on: https://chromium-review.googlesource.com/c/1277724
> Commit-Queue: Ben Smith <binji@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56745}
Change-Id: I25fcd95bfc1aee1d21da390359423e5dfed112a4
Reviewed-on: https://chromium-review.googlesource.com/c/1286952
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56791}
56 lines
1.5 KiB
Bash
Executable File
56 lines
1.5 KiB
Bash
Executable File
#!/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.
|
|
|
|
# Exit immediately if a command exits with a non-zero status.
|
|
set -e
|
|
|
|
# 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
|
|
|
|
TOOLS_WASM_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
V8_DIR="${TOOLS_WASM_DIR}/../.."
|
|
SPEC_TEST_DIR=${V8_DIR}/test/wasm-spec-tests
|
|
|
|
cd ${V8_DIR}
|
|
|
|
rm -rf ${SPEC_TEST_DIR}/tests
|
|
mkdir ${SPEC_TEST_DIR}/tests
|
|
|
|
rm -rf ${SPEC_TEST_DIR}/tmp
|
|
mkdir ${SPEC_TEST_DIR}/tmp
|
|
|
|
./tools/dev/gm.py x64.release d8
|
|
|
|
cd ${V8_DIR}/test/wasm-js/data/interpreter
|
|
|
|
# The next step requires that ocaml is installed. See the README.md in
|
|
# ${V8_DIR}/test/wasm-js/data/interpreter/.
|
|
make clean all
|
|
|
|
cd ${V8_DIR}/test/wasm-js/data/test/core
|
|
|
|
|
|
./run.py --wasm ${V8_DIR}/test/wasm-js/data/interpreter/wasm --js ${V8_DIR}/out/x64.release/d8 --out ${SPEC_TEST_DIR}/tmp
|
|
cp ${SPEC_TEST_DIR}/tmp/*.js ${SPEC_TEST_DIR}/tests/
|
|
rm -rf ${SPEC_TEST_DIR}/tmp
|
|
|
|
cd ${SPEC_TEST_DIR}
|
|
echo
|
|
echo "The following files will get uploaded:"
|
|
ls tests
|
|
echo
|
|
|
|
# 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.
|
|
upload_to_google_storage.py -a -b v8-wasm-spec-tests tests
|