2016-01-26 10:38:37 +00:00
|
|
|
# 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.
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
from testrunner.local import testsuite
|
2017-12-13 12:47:24 +00:00
|
|
|
from testrunner.objects import testcase
|
2016-01-26 10:38:37 +00:00
|
|
|
|
|
|
|
|
2018-01-12 10:07:56 +00:00
|
|
|
class VariantsGenerator(testsuite.VariantsGenerator):
|
|
|
|
def _get_variants(self, test):
|
|
|
|
return self._standard_variant
|
|
|
|
|
|
|
|
|
2017-12-13 12:47:24 +00:00
|
|
|
class TestSuite(testsuite.TestSuite):
|
2018-01-18 10:27:08 +00:00
|
|
|
SUB_TESTS = ( 'json', 'parser', 'regexp_builtins', 'regexp', 'multi_return', 'wasm',
|
2019-01-11 14:40:22 +00:00
|
|
|
'wasm_async', 'wasm_code', 'wasm_compile')
|
2016-01-26 10:38:37 +00:00
|
|
|
|
2018-02-01 10:01:21 +00:00
|
|
|
def ListTests(self):
|
2016-01-26 10:38:37 +00:00
|
|
|
tests = []
|
2017-12-13 12:47:24 +00:00
|
|
|
for subtest in TestSuite.SUB_TESTS:
|
2016-01-26 10:38:37 +00:00
|
|
|
for fname in os.listdir(os.path.join(self.root, subtest)):
|
|
|
|
if not os.path.isfile(os.path.join(self.root, subtest, fname)):
|
|
|
|
continue
|
2017-12-12 21:33:16 +00:00
|
|
|
test = self._create_test('%s/%s' % (subtest, fname))
|
2016-01-26 10:38:37 +00:00
|
|
|
tests.append(test)
|
|
|
|
tests.sort()
|
|
|
|
return tests
|
|
|
|
|
2017-12-12 21:33:16 +00:00
|
|
|
def _test_class(self):
|
2017-12-13 12:47:24 +00:00
|
|
|
return TestCase
|
2016-01-26 10:38:37 +00:00
|
|
|
|
2018-01-12 10:07:56 +00:00
|
|
|
def _variants_gen_class(self):
|
|
|
|
return VariantsGenerator
|
|
|
|
|
2016-01-26 10:38:37 +00:00
|
|
|
|
2017-12-13 12:47:24 +00:00
|
|
|
class TestCase(testcase.TestCase):
|
2018-01-31 12:01:49 +00:00
|
|
|
def _get_files_params(self):
|
2017-12-12 21:33:16 +00:00
|
|
|
suite, name = self.path.split('/')
|
|
|
|
return [os.path.join(self.suite.root, suite, name)]
|
|
|
|
|
|
|
|
def _get_variant_flags(self):
|
|
|
|
return []
|
|
|
|
|
|
|
|
def _get_statusfile_flags(self):
|
|
|
|
return []
|
|
|
|
|
2018-01-31 12:01:49 +00:00
|
|
|
def _get_mode_flags(self):
|
2017-12-12 21:33:16 +00:00
|
|
|
return []
|
|
|
|
|
2017-12-19 14:48:08 +00:00
|
|
|
def get_shell(self):
|
2017-12-12 21:33:16 +00:00
|
|
|
group, _ = self.path.split('/', 1)
|
|
|
|
return 'v8_simple_%s_fuzzer' % group
|
|
|
|
|
|
|
|
|
2018-01-31 09:18:13 +00:00
|
|
|
def GetSuite(*args, **kwargs):
|
|
|
|
return TestSuite(*args, **kwargs)
|