~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-05-24 23:54:33 UTC
  • mfrom: (1728.1.3 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060524235433-c2b19857caffa3c0
(rbc)Merge in benchmark --lsprof-timed lsprofiling feature. (Robert Collins, Martin Pool).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1784
1784
                                 'throughout the test suite.',
1785
1785
                            type=get_transport_type),
1786
1786
                     Option('benchmark', help='run the bzr bencharks.'),
1787
 
                    ]
 
1787
                     Option('lsprof-timed',
 
1788
                            help='generate lsprof output for benchmarked'
 
1789
                                 ' sections of code.'),
 
1790
                     ]
1788
1791
 
1789
 
    def run(self, testspecs_list=None, verbose=False, one=False,
1790
 
            keep_output=False, transport=None, benchmark=None):
 
1792
    def run(self, testspecs_list=None, verbose=None, one=False,
 
1793
            keep_output=False, transport=None, benchmark=None,
 
1794
            lsprof_timed=None):
1791
1795
        import bzrlib.ui
1792
1796
        from bzrlib.tests import selftest
1793
1797
        import bzrlib.benchmarks as benchmarks
1807
1811
                pattern = ".*"
1808
1812
            if benchmark:
1809
1813
                test_suite_factory = benchmarks.test_suite
 
1814
                if verbose is None:
 
1815
                    verbose = True
1810
1816
            else:
1811
1817
                test_suite_factory = None
 
1818
                if verbose is None:
 
1819
                    verbose = False
1812
1820
            result = selftest(verbose=verbose, 
1813
1821
                              pattern=pattern,
1814
1822
                              stop_on_failure=one, 
1815
1823
                              keep_output=keep_output,
1816
1824
                              transport=transport,
1817
 
                              test_suite_factory=test_suite_factory)
 
1825
                              test_suite_factory=test_suite_factory,
 
1826
                              lsprof_timed=lsprof_timed)
1818
1827
            if result:
1819
1828
                bzrlib.trace.info('tests passed')
1820
1829
            else: