diff --git a/tests/flaskext_test.py b/tests/flaskext_test.py index c7eb37df..7a1f179b 100644 --- a/tests/flaskext_test.py +++ b/tests/flaskext_test.py @@ -74,6 +74,9 @@ RESULT_TEMPATE = u'''\ Author License Outcome + {%- for iptr, _ in results[0].logs|dictsort %} + {{ iptr }} + {%- endfor %} @@ -85,6 +88,9 @@ RESULT_TEMPATE = u'''\ {{ result.author }} {{ result.license }} {{ outcome }} + {%- for iptr, _ in result.logs|dictsort %} + see log + {%- endfor %} {%- endfor %} @@ -93,7 +99,8 @@ RESULT_TEMPATE = u'''\

Detailed test logs for all tests on all platforms: {%- for result in results %} {%- for iptr, log in result.logs|dictsort %} -

{{ result.name }} - {{ result.version }} [{{ iptr }}]

+

+ {{ result.name }} - {{ result.version }} [{{ iptr }}]

{{ log }}
{%- endfor %} {%- endfor %} @@ -237,14 +244,14 @@ def test_extension(name, interpreters, flask_dep): return TestResult(name, checkout_path, rv, interpreters) -def run_tests(interpreters, only_approved=True): +def run_tests(extensions, interpreters): results = {} create_tdir() log('Packaging Flask') flask_dep = package_flask() log('Running extension tests') log('Temporary Environment: %s', tdir) - for name in iter_extensions(only_approved): + for name in extensions: log('Testing %s', name) result = test_extension(name, interpreters, flask_dep) if result.success: @@ -272,10 +279,21 @@ def main(): help='run against all extensions, not just approved') parser.add_argument('--browse', dest='browse', action='store_true', help='show browser with the result summary') + parser.add_argument('--env', dest='env', default='py25,py26,py27', + help='the tox environments to run against') + parser.add_argument('--extension=', dest='extension', default=None, + help='tests a single extension') args = parser.parse_args() - results = run_tests(['py26'], not args.all) - filename = render_results(results, not args.all) + if args.extension is not None: + only_approved = False + extensions = [args.extension] + else: + only_approved = not args.all + extensions = iter_extensions(only_approved) + + results = run_tests(extensions, [x.strip() for x in args.env.split(',')]) + filename = render_results(results, only_approved) if args.browse: import webbrowser webbrowser.open('file:///' + filename.lstrip('/'))