/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Jelmer Vernooij
  • Date: 2008-08-06 14:35:39 UTC
  • mto: This revision was merged to the branch mainline in revision 599.
  • Revision ID: jelmer@samba.org-20080806143539-nj2amiiaunsrl1p0
Remove obsolete test-gtk command - use selftest --starting-with=bzrlib.plugins.gtk now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
627
627
register_command(cmd_gselftest)
628
628
 
629
629
 
630
 
class cmd_test_gtk(GTKCommand):
631
 
    """Version of selftest that just runs the gtk test suite."""
632
 
 
633
 
    takes_options = ['verbose',
634
 
                     Option('one', short_name='1',
635
 
                            help='Stop when one test fails.'),
636
 
                     Option('benchmark', help='Run the benchmarks.'),
637
 
                     Option('lsprof-timed',
638
 
                     help='Generate lsprof output for benchmarked'
639
 
                          ' sections of code.'),
640
 
                     Option('list-only',
641
 
                     help='List the tests instead of running them.'),
642
 
                     Option('randomize', type=str, argname="SEED",
643
 
                     help='Randomize the order of tests using the given'
644
 
                          ' seed or "now" for the current time.'),
645
 
                    ]
646
 
    takes_args = ['testspecs*']
647
 
 
648
 
    def run(self, verbose=None, one=False, benchmark=None,
649
 
            lsprof_timed=None, list_only=False, randomize=None,
650
 
            testspecs_list=None):
651
 
        from bzrlib import __path__ as bzrlib_path
652
 
        from bzrlib.tests import selftest
653
 
 
654
 
        print '%10s: %s' % ('bzrlib', bzrlib_path[0])
655
 
        if benchmark:
656
 
            print 'No benchmarks yet'
657
 
            return 3
658
 
 
659
 
            test_suite_factory = bench_suite
660
 
            if verbose is None:
661
 
                verbose = True
662
 
            # TODO: should possibly lock the history file...
663
 
            benchfile = open(".perf_history", "at", buffering=1)
664
 
        else:
665
 
            test_suite_factory = test_suite
666
 
            if verbose is None:
667
 
                verbose = False
668
 
            benchfile = None
669
 
 
670
 
        if testspecs_list is not None:
671
 
            pattern = '|'.join(testspecs_list)
672
 
        else:
673
 
            pattern = ".*"
674
 
 
675
 
        try:
676
 
            result = selftest(verbose=verbose,
677
 
                              pattern=pattern,
678
 
                              stop_on_failure=one,
679
 
                              test_suite_factory=test_suite_factory,
680
 
                              lsprof_timed=lsprof_timed,
681
 
                              bench_history=benchfile,
682
 
                              list_only=list_only,
683
 
                              random_seed=randomize,
684
 
                             )
685
 
        finally:
686
 
            if benchfile is not None:
687
 
                benchfile.close()
688
 
 
689
 
register_command(cmd_test_gtk)
690
 
 
691
 
 
692
 
 
693
630
import gettext
694
631
gettext.install('olive-gtk')
695
632