4f34d353d2
At the moment we only run the js-api spec tests of the core API on our try bots. With the new staging process we want to introduce for WebAssembly language features, see https://docs.google.com/document/d/1hB8mpWmzmtaxZ8PuJEkAWLwFqXTjrw7mJ3Ge9W1dB4E, we also want to run the js-api spec tests of proposals for which we already staged the implementation. With this CL I do the following changes: 1) The tools/wasm/update-wasm-spec-tests.sh now copies the js-api spec tests of the main spec and of the proposals to test/wasm-js/tests, and then uploads this directory to google cloud storage. The main spec tests are in test/wasm-js/tests, the proposal tests are in test/wasm-js/tests/proposals/PROPOSAL_NAME/. 2) Adjust the test-runner in test/wasm-js to run tests in tests/* instead of data/test/js-api/*. Thereby it also runs the proposal tests in test/wasm-js/tests/proposals/PROPOSAL_NAME/. For the proposal tests, the test runner now also adds d8 flags. 3) Remove the dependency to https://github.com/WebAssembly/spec from DEPS. 4) Cleanup .gitignore and wasm-js.status 5) Disable spec tests we don't pass with the new proposal. R=tmrts@chromium.org Bug: v8:9653 Change-Id: Ib3420871f17cb146d6cc7868f5613942a7f79d84 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1768372 Commit-Queue: Tamer Tas <tmrts@chromium.org> Reviewed-by: Tamer Tas <tmrts@chromium.org> Cr-Commit-Position: refs/heads/master@{#63419}
48 lines
1.4 KiB
Python
48 lines
1.4 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']
|
|
}]
|
|
|
|
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)
|