Mercurial > hgsubversion
comparison tests/run.py @ 682:52fbb272a147
tests: add an option to the test-runner for selecting bindings.
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Thu, 02 Sep 2010 23:23:02 +0200 |
parents | ab454ee515d4 |
children | 8687c5aa4f35 |
comparison
equal
deleted
inserted
replaced
681:26b85c0cf48a | 682:52fbb272a147 |
---|---|
52 dest="verbose", action="store_true", default=False, | 52 dest="verbose", action="store_true", default=False, |
53 help="enable verbose output") | 53 help="enable verbose output") |
54 parser.add_option("", "--no-demandimport", | 54 parser.add_option("", "--no-demandimport", |
55 dest="demandimport", action="store_false", default=True, | 55 dest="demandimport", action="store_false", default=True, |
56 help="disable Mercurial demandimport loading") | 56 help="disable Mercurial demandimport loading") |
57 parser.add_option("", "--bindings", | |
58 dest="bindings", action="store", default=None, | |
59 choices=["swig", "subvertpy"], | |
60 help="test using the specified bindings (swig or " | |
61 "subvertpy)") | |
57 | 62 |
58 (options, args) = parser.parse_args() | 63 (options, args) = parser.parse_args() |
59 | 64 |
60 if options.verbose: | 65 if options.verbose: |
61 testargs = { 'descriptions': 3, 'verbosity': 2 } | 66 testargs = { 'descriptions': 3, 'verbosity': 2 } |
65 sys.path.append(os.path.dirname(os.path.dirname(__file__))) | 70 sys.path.append(os.path.dirname(os.path.dirname(__file__))) |
66 | 71 |
67 if options.demandimport: | 72 if options.demandimport: |
68 from mercurial import demandimport | 73 from mercurial import demandimport |
69 demandimport.enable() | 74 demandimport.enable() |
75 | |
76 if options.bindings: | |
77 os.putenv('HGSUBVERSION_BINDINGS', options.bindings) | |
70 | 78 |
71 # make sure our copy of hgsubversion gets imported by loading test_util | 79 # make sure our copy of hgsubversion gets imported by loading test_util |
72 import test_util | 80 import test_util |
73 test_util.TestBase | 81 test_util.TestBase |
74 | 82 |