run-tests.py: Make tests run with python2.3 if HGTEST_* is set.
authorThomas Arendsen Hein <thomas@intevation.de>
Mon, 16 Jun 2008 11:37:26 +0200
changeset 6681 6a6ef726a2b3
parent 6680 deda205a00e1
child 6682 4fa7701918ed
run-tests.py: Make tests run with python2.3 if HGTEST_* is set. optparse of python2.3 does not transform default values to the specified type so e.g. "HGTEST_JOBS=4" (introduced in 07c3cd695b48) causes tests to abort, because options.jobs is set to '4' instead of the number 4.
tests/run-tests.py
--- a/tests/run-tests.py	Sun Jun 15 13:01:03 2008 +0200
+++ b/tests/run-tests.py	Mon Jun 16 11:37:26 2008 +0200
@@ -67,7 +67,7 @@
     help="test existing install at given location")
 
 for option, default in defaults.items():
-    defaults[option] = os.environ.get(*default)
+    defaults[option] = int(os.environ.get(*default))
 parser.set_defaults(**defaults)
 (options, args) = parser.parse_args()
 verbose = options.verbose