changeset 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 26b85c0cf48a
children 4589d48c9e1b
files tests/run.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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