Bug 1129122 - Marionette should show an error if a test file doesn't start with the test_ prefix. r=dburns

--HG--
extra : commitid : 4INcHog6PGS
extra : rebase_source : 7240887c3fc7373619cfbe2f500b66038149747b
This commit is contained in:
Julien Pagès 2015-07-17 22:53:27 +02:00
Родитель 7a736df66f
Коммит 088713752a
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -784,6 +784,15 @@ setReq.onerror = function() {
for test in tests:
self.add_test(test)
# ensure we have only tests files with names starting with 'test_'
invalid_tests = \
[t['filepath'] for t in self.tests
if not os.path.basename(t['filepath']).startswith('test_')]
if invalid_tests:
raise Exception("Tests file names must starts with 'test_'."
" Invalid test names:\n %s"
% '\n '.join(invalid_tests))
version_info = mozversion.get_version(binary=self.bin,
sources=self.sources,
dm_type=os.environ.get('DM_TRANS', 'adb'),