~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to buildout-templates/bin/test.in

[r=rockstar][ui=none][bug=605875] Re-enable layer profiling for
        bin/test -vvv and higher verbosity

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
    # tree. This is very useful for IDE integration, so an IDE can
253
253
    # e.g. run the test that you are currently editing.
254
254
    try:
255
 
        there = os.getcwd()
256
 
        os.chdir(BUILD_DIR)
257
 
        result = testrunner.run([])
 
255
        try:
 
256
            there = os.getcwd()
 
257
            os.chdir(BUILD_DIR)
 
258
            testrunner.run([])
 
259
        except SystemExit:
 
260
            # Print Layer profiling report if requested.
 
261
            if main_process and local_options.verbose >= 3:
 
262
                profiled.report_profile_stats()
 
263
            raise
258
264
    finally:
259
265
        os.chdir(there)
260
 
    # Cribbed from sourcecode/zope/test.py - avoid spurious error during exit.
261
 
    logging.disable(999999999)
262
 
 
263
 
    # Print Layer profiling report if requested.
264
 
    if main_process and local_options.verbose >= 3:
265
 
        profiled.report_profile_stats()
266
 
    sys.exit(result)