Commit e177068e authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[wasm] Add wasm spec tests to the v8 test runner

The spec tests are stored on a mirror and are downloaded with the DEPS
file. The test files on the mirror are updated with a script which has
to be executed manually.

This CL contains the following changes:

* A script which updates the spec tests and uploads the generated files
  to the mirror.
* Changes to the DEPS file to download the files from the mirror.
* Changes so that tools/run-tests.py can run the spec tests.

R=machenbach@chromium.org, rossberg@chromium.org

Change-Id: Ia50d09bb1501c0c0f1d1506aa3657a3aa69c2864
Reviewed-on: https://chromium-review.googlesource.com/488083
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44933}
parent de14ba9f
......@@ -58,6 +58,8 @@
/test/test262/data.tar
/test/test262/harness
/test/wasm-js
/test/wasm-spec-tests/tests
/test/wasm-spec-tests/tests.tar.gz
/testing/gmock
/testing/gtest
/third_party/*
......
......@@ -201,6 +201,17 @@ hooks = [
"-s", "v8/buildtools/linux64/gn.sha1",
],
},
{
"name": "wasm_spec_tests",
"pattern": ".",
"action": [ "download_from_google_storage",
"--no_resume",
"--no_auth",
"-u",
"--bucket", "v8-wasm-spec-tests",
"-s", "v8/test/wasm-spec-tests/tests.tar.gz.sha1",
],
},
{
"name": "wasm_fuzzer",
"pattern": ".",
......
......@@ -52,6 +52,7 @@ group("default_tests") {
":mkgrokdump_run",
":preparser_run",
":unittests_run",
":wasm_spec_tests_run",
]
}
}
......@@ -198,6 +199,14 @@ v8_isolate_run("unittests") {
isolate = "unittests/unittests.isolate"
}
v8_isolate_run("wasm_spec_tests") {
deps = [
"..:d8_run",
]
isolate = "wasm-spec-tests/wasm-spec-tests.isolate"
}
v8_isolate_run("webkit") {
deps = [
"..:d8_run",
......
......@@ -18,6 +18,7 @@
'mjsunit/mjsunit.gyp:mjsunit_run',
'preparser/preparser.gyp:preparser_run',
'unittests/unittests.gyp:unittests_run',
'wasm-spec-tests/wasm-spec-tests.gyp:wasm_spec_tests_run',
'webkit/webkit.gyp:webkit_run',
],
'includes': [
......
......@@ -18,6 +18,7 @@
'mkgrokdump/mkgrokdump.isolate',
'preparser/preparser.isolate',
'unittests/unittests.isolate',
'wasm-spec-tests/wasm-spec-tests.isolate',
'webkit/webkit.isolate',
],
}
......@@ -18,6 +18,7 @@
'mjsunit/mjsunit.gyp:mjsunit_run',
'preparser/preparser.gyp:preparser_run',
'unittests/unittests.gyp:unittests_run',
'wasm-spec-tests/wasm-spec-tests.gyp:wasm_spec_tests_run',
],
'includes': [
'../gypfiles/features.gypi',
......
......@@ -18,5 +18,6 @@
'mkgrokdump/mkgrokdump.isolate',
'preparser/preparser.isolate',
'unittests/unittests.isolate',
'wasm-spec-tests/wasm-spec-tests.isolate',
],
}
ahaas@chromium.org
clemensh@chromium.org
machenbach@chromium.org
rossberg@chromium.org
# 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.
import os
from testrunner.local import testsuite
from testrunner.objects import testcase
class WasmSpecTestsTestSuite(testsuite.TestSuite):
def __init__(self, name, root):
super(WasmSpecTestsTestSuite, self).__init__(name, root)
def ListTests(self, context):
tests = []
for dirname, dirs, files in os.walk(self.root):
for dotted in [x for x in dirs if x.startswith('.')]:
dirs.remove(dotted)
dirs.sort()
files.sort()
for filename in files:
if (filename.endswith(".js")):
fullpath = os.path.join(dirname, filename)
relpath = fullpath[len(self.root) + 1 : -3]
testname = relpath.replace(os.path.sep, "/")
test = testcase.TestCase(self, testname)
tests.append(test)
return tests
def GetFlagsForTestCase(self, testcase, context):
flags = [] + context.mode_flags
flags.append(os.path.join(self.root, testcase.path + self.suffix()))
return testcase.flags + flags
def GetSuite(name, root):
return WasmSpecTestsTestSuite(name, root)
cf636dce30e87016854d6bbeb0af141621630fea
\ No newline at end of file
# 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.
{
'conditions': [
['test_isolation_mode != "noop"', {
'targets': [
{
'target_name': 'wasm_spec_tests_run',
'type': 'none',
'dependencies': [
'../../src/d8.gyp:d8_run',
],
'includes': [
'../../gypfiles/features.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'wasm-spec-tests.isolate',
],
},
],
}],
],
}
# 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.
{
'variables': {
'files': [
'./',
],
},
'includes': [
'../../src/d8.isolate',
'../../tools/testrunner/testrunner.isolate',
],
}
# 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.
[
[ALWAYS, {
# These tests fail because mips does not support the correct NaN bit patterns.
'tests/float_misc': [PASS, ['arch == mipsel or arch == mips64el', SKIP]],
'tests/float_exprs': [PASS, ['arch == mipsel or arch == mips64el', SKIP]],
'tests/f32': [PASS, ['arch == mipsel or arch == mips64el', SKIP]],
'tests/f64': [PASS, ['arch == mipsel or arch == mips64el', SKIP]],
#TODO(ahaas): Add additional stack checks on mips.
'tests/skip-stack-guard-page': [PASS, ['arch == mipsel or arch == mips64el', SKIP]],
}], # ALWAYS
]
......@@ -68,6 +68,7 @@ TEST_MAP = {
"debugger",
"mjsunit",
"cctest",
"wasm-spec-tests",
"inspector",
"webkit",
"mkgrokdump",
......@@ -82,6 +83,7 @@ TEST_MAP = {
"debugger",
"mjsunit",
"cctest",
"wasm-spec-tests",
"inspector",
"mkgrokdump",
"fuzzer",
......
#!/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.
set -e
TOOLS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${TOOLS_DIR}/..
mkdir -p ./test/wasm-spec-tests/tests/
rm -rf ./test/wasm-spec-tests/tests/*
./tools/dev/gm.py x64.release all
cd ${TOOLS_DIR}/../test/wasm-js/interpreter
make
cd ${TOOLS_DIR}/../test/wasm-js/test/core
./run.py --wasm ${TOOLS_DIR}/../test/wasm-js/interpreter/wasm --js ${TOOLS_DIR}/../out/x64.release/d8
cp ${TOOLS_DIR}/../test/wasm-js/test/core/output/*.js ${TOOLS_DIR}/../test/wasm-spec-tests/tests
cd ${TOOLS_DIR}/../test/wasm-spec-tests
upload_to_google_storage.py -a -b v8-wasm-spec-tests tests
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment