2017-04-20 06:14:53 +00:00
|
|
|
# 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
|
2017-12-13 12:47:24 +00:00
|
|
|
from testrunner.objects import testcase
|
2018-01-04 10:42:49 +00:00
|
|
|
from testrunner.outproc import mkgrokdump
|
2017-04-20 06:14:53 +00:00
|
|
|
|
|
|
|
|
2017-12-11 20:25:41 +00:00
|
|
|
SHELL = 'mkgrokdump'
|
|
|
|
|
2019-02-05 14:00:49 +00:00
|
|
|
|
|
|
|
class TestLoader(testsuite.TestLoader):
|
|
|
|
pass
|
|
|
|
|
|
|
|
#TODO(tmrts): refactor the test creation logic to migrate to TestLoader
|
2017-12-13 12:47:24 +00:00
|
|
|
class TestSuite(testsuite.TestSuite):
|
2017-12-20 15:57:58 +00:00
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
|
super(TestSuite, self).__init__(*args, **kwargs)
|
|
|
|
|
|
|
|
v8_path = os.path.dirname(os.path.dirname(os.path.abspath(self.root)))
|
2018-01-04 07:39:09 +00:00
|
|
|
self.expected_path = os.path.join(v8_path, 'tools', 'v8heapconst.py')
|
2017-12-20 15:57:58 +00:00
|
|
|
|
2018-02-01 10:01:21 +00:00
|
|
|
def ListTests(self):
|
2019-02-05 14:00:49 +00:00
|
|
|
test = self._test_loader._create_test(SHELL, self)
|
2017-04-20 06:14:53 +00:00
|
|
|
return [test]
|
|
|
|
|
2019-02-05 14:00:49 +00:00
|
|
|
def _test_loader_class(self):
|
|
|
|
return TestLoader
|
|
|
|
|
2017-12-12 21:33:16 +00:00
|
|
|
def _test_class(self):
|
2017-12-13 12:47:24 +00:00
|
|
|
return TestCase
|
2017-04-20 06:14:53 +00:00
|
|
|
|
2017-12-20 15:57:58 +00:00
|
|
|
|
|
|
|
class TestCase(testcase.TestCase):
|
|
|
|
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-20 15:57:58 +00:00
|
|
|
return []
|
|
|
|
|
|
|
|
def get_shell(self):
|
|
|
|
return SHELL
|
|
|
|
|
2017-12-21 14:48:59 +00:00
|
|
|
@property
|
|
|
|
def output_proc(self):
|
2018-01-04 10:42:49 +00:00
|
|
|
return mkgrokdump.OutProc(self.expected_outcomes, self.suite.expected_path)
|
2017-04-20 06:14:53 +00:00
|
|
|
|
2017-12-12 21:33:16 +00:00
|
|
|
|
2018-01-31 09:18:13 +00:00
|
|
|
def GetSuite(*args, **kwargs):
|
|
|
|
return TestSuite(*args, **kwargs)
|