regrtest: Prepend 'use' options in --{fast,slow}-ci (GH-110363)

This allows individual resources to be disabled without having to explicitly re-enable all others.
This commit is contained in:
Zachary Ware 2023-10-15 13:34:28 -05:00 committed by GitHub
parent 42a5d21d46
commit b75186f69e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 7 deletions

View file

@ -415,9 +415,11 @@ class ParseArgsTestCase(unittest.TestCase):
self.assertEqual(regrtest.python_cmd, ('python', '-X', 'dev'))
def test_fast_ci_resource(self):
# it should be possible to override resources
args = ['--fast-ci', '-u', 'network']
use_resources = ['network']
# it should be possible to override resources individually
args = ['--fast-ci', '-u-network']
use_resources = sorted(cmdline.ALL_RESOURCES)
use_resources.remove('cpu')
use_resources.remove('network')
self.check_ci_mode(args, use_resources)
def test_slow_ci(self):