Bug 838074 - mirror test.py, test.ini, setup_development.py -> m-c;r=jgriffin

--HG--
extra : rebase_source : 4f597fe8d636a49ac7dce8e93f67de503bb5cd48
This commit is contained in:
Jeff Hammel 2013-02-12 16:57:03 -08:00
parent ec4e473460
commit fd62e83dc3
3 changed files with 6 additions and 6 deletions

View File

@ -151,14 +151,13 @@ def main(args=sys.argv[1:]):
help="list dependencies for the packages")
parser.add_option('--list', action='store_true', default=False,
help="list what will be installed")
parser.add_option('--extra', '--install-extra-packages', action='store_true', default=False,
help="installs extra supporting packages as well as core mozbase ones")
options, packages = parser.parse_args(args)
install_extra_packages = False
if not packages:
# install all packages
packages = sorted(mozbase_packages)
install_extra_packages = True
# ensure specified packages are in the list
assert set(packages).issubset(mozbase_packages), "Packages should be in %s (You gave: %s)" % (mozbase_packages, packages)
@ -240,7 +239,7 @@ def main(args=sys.argv[1:]):
call(['easy_install', version])
# install extra non-mozbase packages if desired
if install_extra_packages:
if options.extra:
for package in extra_packages:
call(['easy_install', package])

View File

@ -3,7 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# mozbase test manifest, in the format of
# https://github.com/mozilla/mozbase/blob/master/manifestdestiny/README.txt
# http://mozbase.readthedocs.org/en/latest/manifestdestiny.html
# run with
# https://github.com/mozilla/mozbase/blob/master/test.py

View File

@ -60,7 +60,8 @@ def main(args=sys.argv[1:]):
# run the tests
suite = unittest.TestSuite(unittestlist)
runner = unittest.TextTestRunner(verbosity=2) # default=1 does not show success of unittests
results = TestResultCollection.from_unittest_results(runner.run(suite))
unittest_results = runner.run(suite)
results = TestResultCollection.from_unittest_results(None, unittest_results)
# exit according to results
sys.exit(1 if results.num_failures else 0)