~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-12-14 18:28:35 UTC
  • mfrom: (2172.4.5 selftest.cleanup)
  • Revision ID: pqm@pqm.ubuntu.com-20061214182835-a7d577cca2b16908
(bialix) 'bzr selftest --clean-output' remove tests temp directories
 without running tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
2078
2078
                     Option('cache-dir', type=str,
2079
2079
                            help='a directory to cache intermediate'
2080
2080
                                 ' benchmark steps'),
 
2081
                     Option('clean-output',
 
2082
                            help='clean temporary tests directories'
 
2083
                                 ' without running tests'),
2081
2084
                     ]
2082
2085
 
2083
2086
    def run(self, testspecs_list=None, verbose=None, one=False,
2084
2087
            keep_output=False, transport=None, benchmark=None,
2085
 
            lsprof_timed=None, cache_dir=None):
 
2088
            lsprof_timed=None, cache_dir=None, clean_output=False):
2086
2089
        import bzrlib.ui
2087
2090
        from bzrlib.tests import selftest
2088
2091
        import bzrlib.benchmarks as benchmarks
2089
2092
        from bzrlib.benchmarks import tree_creator
2090
2093
 
 
2094
        if clean_output:
 
2095
            from bzrlib.tests import clean_selftest_output
 
2096
            clean_selftest_output()
 
2097
            return 0
 
2098
 
2091
2099
        if cache_dir is not None:
2092
2100
            tree_creator.TreeCreator.CACHE_ROOT = osutils.abspath(cache_dir)
2093
2101
        print '%10s: %s' % ('bzr', osutils.realpath(sys.argv[0]))