mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
gh-139208: Fix regrtest --fast-ci --verbose (#139240)
Don't ignore the --verbose option anymore.
This commit is contained in:
parent
16eae6d90d
commit
dd683f8f34
3 changed files with 18 additions and 3 deletions
|
|
@ -464,7 +464,11 @@ def _parse_args(args, **kwargs):
|
|||
if ns.python is None:
|
||||
ns.rerun = True
|
||||
ns.print_slow = True
|
||||
ns.verbose3 = True
|
||||
if not ns.verbose:
|
||||
ns.verbose3 = True
|
||||
else:
|
||||
# --verbose has the priority over --verbose3
|
||||
pass
|
||||
else:
|
||||
ns._add_python_opts = False
|
||||
|
||||
|
|
|
|||
|
|
@ -448,7 +448,8 @@ class ParseArgsTestCase(unittest.TestCase):
|
|||
|
||||
return regrtest
|
||||
|
||||
def check_ci_mode(self, args, use_resources, *, rerun=True, randomize=True):
|
||||
def check_ci_mode(self, args, use_resources,
|
||||
*, rerun=True, randomize=True, output_on_failure=True):
|
||||
regrtest = self.create_regrtest(args)
|
||||
self.assertEqual(regrtest.num_workers, -1)
|
||||
self.assertEqual(regrtest.want_rerun, rerun)
|
||||
|
|
@ -457,7 +458,7 @@ class ParseArgsTestCase(unittest.TestCase):
|
|||
self.assertIsInstance(regrtest.random_seed, int)
|
||||
self.assertTrue(regrtest.fail_env_changed)
|
||||
self.assertTrue(regrtest.print_slowest)
|
||||
self.assertTrue(regrtest.output_on_failure)
|
||||
self.assertEqual(regrtest.output_on_failure, output_on_failure)
|
||||
self.assertEqual(sorted(regrtest.use_resources), sorted(use_resources))
|
||||
return regrtest
|
||||
|
||||
|
|
@ -484,6 +485,14 @@ class ParseArgsTestCase(unittest.TestCase):
|
|||
use_resources.remove('network')
|
||||
self.check_ci_mode(args, use_resources)
|
||||
|
||||
def test_fast_ci_verbose(self):
|
||||
args = ['--fast-ci', '--verbose']
|
||||
use_resources = sorted(cmdline.ALL_RESOURCES)
|
||||
use_resources.remove('cpu')
|
||||
regrtest = self.check_ci_mode(args, use_resources,
|
||||
output_on_failure=False)
|
||||
self.assertEqual(regrtest.verbose, True)
|
||||
|
||||
def test_slow_ci(self):
|
||||
args = ['--slow-ci']
|
||||
use_resources = sorted(cmdline.ALL_RESOURCES)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
Fix regrtest ``--fast-ci --verbose``: don't ignore the ``--verbose`` option
|
||||
anymore. Patch by Victor Stinner.
|
||||
Loading…
Add table
Add a link
Reference in a new issue