08a05c2bff
- create testcase subclass for each test - move get_command, get_source from suite to test - promises-aplus tests are broken - moving expected outcomes etc. is still in progress Bug: v8:6917 Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Change-Id: I006e64ecf51dda95c41dff88c68b24f17a638566 Reviewed-on: https://chromium-review.googlesource.com/798331 Commit-Queue: Michał Majewski <majeski@google.com> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#50065}
36 lines
1.1 KiB
Python
36 lines
1.1 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.testcase import TestCase
|
|
|
|
class WasmSpecTestSuite(testsuite.TestSuite):
|
|
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)
|
|
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 = self._create_test(testname)
|
|
tests.append(test)
|
|
return tests
|
|
|
|
def _test_class(self):
|
|
return WasmSpecTestCase
|
|
|
|
|
|
class WasmSpecTestCase(TestCase):
|
|
def _get_files_params(self, ctx):
|
|
return [os.path.join(self.suite.root, self.path + self._get_suffix())]
|
|
|
|
|
|
def GetSuite(name, root):
|
|
return WasmSpecTestSuite(name, root)
|