v8/tools/testrunner/local/fake_testsuite/testcfg.py
Tamer Tas baeb4e324d [testrunner] enable the progress indicator
Using test generators meant that we had to remove the progress indicator since
the total number of tests weren't known before-hand.

This CL implements a progress indicator using test number estimations.

cctest and unittests progress indicator is accurate, however estimating
means the progress will terminate over 100% in big test suites and sometimes
under 100%.

R=machenbach@chromium.org
CC=​sergiyb@chromium.org,yangguo@chromium.org

Bug: v8:8769
Change-Id: I40ca5b40f9b1223376d33707f0945900ea98cea3
Reviewed-on: https://chromium-review.googlesource.com/c/1460471
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59538}
2019-02-12 16:03:17 +00:00

34 lines
815 B
Python

#!/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
from testrunner.local import testsuite, statusfile
class TestLoader(testsuite.TestLoader):
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
class TestSuite(testsuite.TestSuite):
def _test_loader_class(self):
return TestLoader
def _test_class(self):
return testsuite.TestCase
def GetSuite(*args, **kwargs):
return TestSuite(*args, **kwargs)