diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-05-04 13:21:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-04 13:21:12 (GMT) |
commit | 3d0056842c5e06b4102f990b59ab3b607f932dd8 (patch) | |
tree | 1652727e44d9e15ade65e3c3bbc762a4ea445d0c /Lib/test/test_regrtest.py | |
parent | dbaf746b6de0ee431c809d3175ab40ccc18898a8 (diff) | |
download | cpython-3d0056842c5e06b4102f990b59ab3b607f932dd8.zip cpython-3d0056842c5e06b4102f990b59ab3b607f932dd8.tar.gz cpython-3d0056842c5e06b4102f990b59ab3b607f932dd8.tar.bz2 |
bpo-30263: regrtest: log system load (#1452)
* bpo-30263: regrtest: log system load
* regrtest: log the number of CPUs
Log the number of CPUs in the header. --verbose now imply --header.
Diffstat (limited to 'Lib/test/test_regrtest.py')
-rw-r--r-- | Lib/test/test_regrtest.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index 0bd6298..d349260 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -118,6 +118,9 @@ class ParseArgsTestCase(unittest.TestCase): ns = libregrtest._parse_args(['--header']) self.assertTrue(ns.header) + ns = libregrtest._parse_args(['--verbose']) + self.assertTrue(ns.header) + def test_randomize(self): for opt in '-r', '--randomize': with self.subTest(opt=opt): @@ -354,7 +357,7 @@ class BaseTestCase(unittest.TestCase): self.assertRegex(output, regex) def parse_executed_tests(self, output): - regex = (r'^[0-9]+:[0-9]+:[0-9]+ \[ *[0-9]+(?:/ *[0-9]+)*\] (%s)' + regex = (r'^[0-9]+:[0-9]+:[0-9]+ (?:load avg: [0-9]+\.[0-9]{2} )?\[ *[0-9]+(?:/ *[0-9]+)*\] (%s)' % self.TESTNAME_REGEX) parser = re.finditer(regex, output, re.MULTILINE) return list(match.group(1) for match in parser) |