# HG changeset patch # User Alexis S. L. Carvalho # Date 1175930875 10800 # Node ID 8ece1ba156c75aa70da2d7c69bca04a74da73f1d # Parent b95a42114616e679c352f95cdd40f9745a52fe99 run-tests.py: use coverage.py with *.py tests diff -r b95a42114616 -r 8ece1ba156c7 tests/run-tests.py --- a/tests/run-tests.py Sat Apr 07 04:27:55 2007 -0300 +++ b/tests/run-tests.py Sat Apr 07 04:27:55 2007 -0300 @@ -45,6 +45,7 @@ (options, args) = parser.parse_args() verbose = options.verbose coverage = options.cover or options.cover_stdlib or options.annotate +python = sys.executable def vlog(*msg): if verbose: @@ -115,6 +116,7 @@ shutil.copymode(sys.executable, my_python) def install_hg(): + global python vlog("# Performing temporary installation of HG") installerrs = os.path.join("tests", "install.err") @@ -154,6 +156,8 @@ os.path.join(BINDIR, '_hg.py'))) f.close() os.chmod(os.path.join(BINDIR, 'hg'), 0700) + python = '"%s" "%s" -x' % (sys.executable, + os.path.join(TESTDIR,'coverage.py')) def output_coverage(): vlog("# Producing coverage report") @@ -238,7 +242,7 @@ lctest = test.lower() if lctest.endswith('.py'): - cmd = '%s "%s"' % (sys.executable, os.path.join(TESTDIR, test)) + cmd = '%s "%s"' % (python, os.path.join(TESTDIR, test)) elif lctest.endswith('.bat'): # do not run batch scripts on non-windows if os.name != 'nt':