Skip to content

Commit

Permalink
bug 404494, add --application parameter to test-locales, r=ctalbert
Browse files Browse the repository at this point in the history
  • Loading branch information
Pike committed Nov 27, 2007
1 parent 01d1476 commit be22783
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions testing/tests/l10n/lib/Mozilla/Tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ def failureTest(self, myResult, failureResult):
import CompareLocales
class CompareTest(Base):
'''Test class to compare locales'''
def __init__(self):
def __init__(self, apps = ['browser', 'mail']):
'''Initializes the test object'''
# nothing to be done here
self.apps = apps
pass
def run(self):
'''Runs CompareLocales.compare()'''
return CompareLocales.compare(apps=['browser','mail'])
return CompareLocales.compare(apps=self.apps)
def serialize(self, result, saveHandler):
'''Serialize the CompareLocales result by locale into
cmp-details-ab-CD
Expand Down
7 changes: 6 additions & 1 deletion testing/tests/l10n/scripts/test-locales
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ cp.add_option('-w','--enable-waterfall', action="store_true",
help='Update waterfall data')
cp.add_option('--end-date', type='string', dest='enddate',
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:])

#
Expand Down Expand Up @@ -185,8 +187,11 @@ basePath = os.path.join(opts.target, opts.date)
if not os.path.isdir(basePath):
os.mkdir(basePath)

apps = ['browser', 'mail']
if opts.application:
apps = [opts.application]

tests = [Tests.CompareTest(),
tests = [Tests.CompareTest(apps = apps),
Tests.SearchTest(),
Tests.RSSReaderTest(),
Tests.BookmarksTest()]
Expand Down

0 comments on commit be22783

Please sign in to comment.