testcfg.py 815 Bytes
Newer Older
1 2 3 4 5 6 7
#!/usr/bin/env python
# Copyright 2019 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 sys

8
from testrunner.local import testsuite, statusfile
9 10


11
class TestLoader(testsuite.TestLoader):
12 13 14 15 16 17 18 19 20 21 22 23
  def _list_test_filenames(self):
    return ["fast", "slow"]

  def list_tests(self):
    self.test_count_estimation = 2
    fast = self._create_test("fast", self.suite)
    slow = self._create_test("slow", self.suite)

    slow._statusfile_outcomes.append(statusfile.SLOW)
    yield fast
    yield slow

24

25
class TestSuite(testsuite.TestSuite):
26 27 28
  def _test_loader_class(self):
    return TestLoader

29 30 31
  def _test_class(self):
    return testsuite.TestCase

32 33
def GetSuite(*args, **kwargs):
  return TestSuite(*args, **kwargs)