# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1283462582 -7200 # Node ID 52fbb272a14743c761adc5af2749a4b07b513b7e # Parent 26b85c0cf48a87a5240a9e333e7725f4cf7b178e tests: add an option to the test-runner for selecting bindings. diff --git a/tests/run.py b/tests/run.py --- a/tests/run.py +++ b/tests/run.py @@ -54,6 +54,11 @@ if __name__ == '__main__': parser.add_option("", "--no-demandimport", dest="demandimport", action="store_false", default=True, help="disable Mercurial demandimport loading") + parser.add_option("", "--bindings", + dest="bindings", action="store", default=None, + choices=["swig", "subvertpy"], + help="test using the specified bindings (swig or " + "subvertpy)") (options, args) = parser.parse_args() @@ -68,6 +73,9 @@ if __name__ == '__main__': from mercurial import demandimport demandimport.enable() + if options.bindings: + os.putenv('HGSUBVERSION_BINDINGS', options.bindings) + # make sure our copy of hgsubversion gets imported by loading test_util import test_util test_util.TestBase