v8/test/wasm-spec-tests/testcfg.py
Andreas Haas 45b8e3e9be [wasm] update spec tests
Update the WebAssembly spec tests.

Additional changes:
* Enable tests that pass now: some proposals had out-dated tests. With
  the proposals being rebased, these tests pass now.
* Run the multi-value proposal tests with
  --no-experimental-wasm-bulk-memory. We already enabled bulk-memory by
  default, but it includes some breaking changes.

R=thibaudm@chromium.org

Bug: v8:9673
Change-Id: Ic6de44fc01cee640c741d825dc70b1bdfb1297f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1890096
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64672}
2019-10-31 10:09:46 +00:00

63 lines
2.0 KiB
Python

# 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
proposal_flags = [{
'name': 'reference-types',
'flags': ['--experimental-wasm-anyref',
'--no-experimental-wasm-bulk-memory']
},
{
'name': 'bulk-memory-operations',
'flags': ['--experimental-wasm-bulk-memory']
},
{
'name': 'js-types',
'flags': ['--experimental-wasm-type-reflection',
'--no-experimental-wasm-bulk-memory']
},
{
'name': 'JS-BigInt-integration',
'flags': ['--experimental-wasm-bigint']
},
{
'name': 'multi-value',
'flags': ['--experimental-wasm-mv',
'--no-experimental-wasm-bulk-memory']
},
]
class TestLoader(testsuite.JSTestLoader):
pass
class TestSuite(testsuite.TestSuite):
def __init__(self, *args, **kwargs):
super(TestSuite, self).__init__(*args, **kwargs)
self.test_root = os.path.join(self.root, "tests")
self._test_loader.test_root = self.test_root
def _test_loader_class(self):
return TestLoader
def _test_class(self):
return TestCase
class TestCase(testcase.D8TestCase):
def _get_files_params(self):
return [os.path.join(self.suite.test_root, self.path + self._get_suffix())]
def _get_source_flags(self):
for proposal in proposal_flags:
if os.sep.join(['proposals', proposal['name']]) in self.path:
return proposal['flags']
return []
def GetSuite(*args, **kwargs):
return TestSuite(*args, **kwargs)