[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: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#44933}
This commit is contained in:
parent
de14ba9fd2
commit
e177068e5c
2
.gitignore
vendored
2
.gitignore
vendored
@ -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/*
|
||||
|
11
DEPS
11
DEPS
@ -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',
|
||||
],
|
||||
}
|
||||
|
4
test/wasm-spec-tests/OWNERS
Normal file
4
test/wasm-spec-tests/OWNERS
Normal file
@ -0,0 +1,4 @@
|
||||
ahaas@chromium.org
|
||||
clemensh@chromium.org
|
||||
machenbach@chromium.org
|
||||
rossberg@chromium.org
|
37
test/wasm-spec-tests/testcfg.py
Normal file
37
test/wasm-spec-tests/testcfg.py
Normal file
@ -0,0 +1,37 @@
|
||||
# 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)
|
1
test/wasm-spec-tests/tests.tar.gz.sha1
Normal file
1
test/wasm-spec-tests/tests.tar.gz.sha1
Normal file
@ -0,0 +1 @@
|
||||
cf636dce30e87016854d6bbeb0af141621630fea
|
26
test/wasm-spec-tests/wasm-spec-tests.gyp
Normal file
26
test/wasm-spec-tests/wasm-spec-tests.gyp
Normal file
@ -0,0 +1,26 @@
|
||||
# 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',
|
||||
],
|
||||
},
|
||||
],
|
||||
}],
|
||||
],
|
||||
}
|
15
test/wasm-spec-tests/wasm-spec-tests.isolate
Normal file
15
test/wasm-spec-tests/wasm-spec-tests.isolate
Normal file
@ -0,0 +1,15 @@
|
||||
# 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',
|
||||
],
|
||||
}
|
||||
|
17
test/wasm-spec-tests/wasm-spec-tests.status
Normal file
17
test/wasm-spec-tests/wasm-spec-tests.status
Normal file
@ -0,0 +1,17 @@
|
||||
# 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",
|
||||
|
29
tools/update-wasm-spec-tests.sh
Executable file
29
tools/update-wasm-spec-tests.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user