bug 404494, add --application parameter to test-locales, r=ctalbert

This commit is contained in:
axel%pike.org 2007-11-27 20:35:25 +00:00
Родитель f5dd3c1dc4
Коммит 50d74a36ed
2 изменённых файлов: 9 добавлений и 4 удалений

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

@ -59,13 +59,13 @@ class Base:
import CompareLocales import CompareLocales
class CompareTest(Base): class CompareTest(Base):
'''Test class to compare locales''' '''Test class to compare locales'''
def __init__(self): def __init__(self, apps = ['browser', 'mail']):
'''Initializes the test object''' '''Initializes the test object'''
# nothing to be done here self.apps = apps
pass pass
def run(self): def run(self):
'''Runs CompareLocales.compare()''' '''Runs CompareLocales.compare()'''
return CompareLocales.compare(apps=['browser','mail']) return CompareLocales.compare(apps=self.apps)
def serialize(self, result, saveHandler): def serialize(self, result, saveHandler):
'''Serialize the CompareLocales result by locale into '''Serialize the CompareLocales result by locale into
cmp-details-ab-CD cmp-details-ab-CD

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

@ -142,6 +142,8 @@ cp.add_option('-w','--enable-waterfall', action="store_true",
help='Update waterfall data') help='Update waterfall data')
cp.add_option('--end-date', type='string', dest='enddate', cp.add_option('--end-date', type='string', dest='enddate',
help='Explicit (faked) end date') help='Explicit (faked) end date')
cp.add_option('--application', type='string',
help='Test only one app, by default tests browser and mail')
opts, optlist = cp.parse_args(sys.argv[1:]) opts, optlist = cp.parse_args(sys.argv[1:])
# #
@ -185,8 +187,11 @@ basePath = os.path.join(opts.target, opts.date)
if not os.path.isdir(basePath): if not os.path.isdir(basePath):
os.mkdir(basePath) os.mkdir(basePath)
apps = ['browser', 'mail']
if opts.application:
apps = [opts.application]
tests = [Tests.CompareTest(), tests = [Tests.CompareTest(apps = apps),
Tests.SearchTest(), Tests.SearchTest(),
Tests.RSSReaderTest(), Tests.RSSReaderTest(),
Tests.BookmarksTest()] Tests.BookmarksTest()]