зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1274980 part 1: Add support for test platform regex match. r=dustin
Often we need to setup a test configuration for different platforms, but not for different platform builds (opt/debug). This leads to cumbersome configuration duplicates. This patch adds support for platform regular expression matching. For example, if you want to configure the chunk size for linux64 platform both for opt and debug, originally you would do this: chunks: by-test-platform: linux64/opt: 4 linux64/debug: 4 default: 8 With regular expression matching, you only need: chunks: by-test-platform: linux64/.*: 4 default: 8 This patch was originally written by Geoffrey Brown for Windows support. MozReview-Commit-ID: KbMHV7UkTLe --HG-- extra : rebase_source : 79a4344c7e3e978bb6b93713c6e6e4114ba5d5b8
This commit is contained in:
Родитель
a864217cbe
Коммит
9caaae3ed3
|
@ -81,6 +81,20 @@ class TestKeyedBy(unittest.TestCase):
|
|||
}
|
||||
self.assertEqual(get_keyed_by(test, 'option', 'x'), 20)
|
||||
|
||||
def test_by_value_regex(self):
|
||||
test = {
|
||||
'test-name': 'tname',
|
||||
'option': {
|
||||
'by-test-platform': {
|
||||
'macosx64/.*': 10,
|
||||
'linux64/debug': 20,
|
||||
'default': 5,
|
||||
},
|
||||
},
|
||||
'test-platform': 'macosx64/debug',
|
||||
}
|
||||
self.assertEqual(get_keyed_by(test, 'option', 'x'), 10)
|
||||
|
||||
def test_by_value_default(self):
|
||||
test = {
|
||||
'test-name': 'tname',
|
||||
|
|
Загрузка…
Ссылка в новой задаче