Mercurial > hg
changeset 6982:9fc5bf4adbcf
imported patch test-check
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Wed, 03 Sep 2008 19:01:35 +0200 |
parents | d76f64cd4cb2 |
children | 5ce625983208 |
files | tests/run-tests.py |
diffstat | 1 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Tue Sep 02 09:25:29 2008 +0200 +++ b/tests/run-tests.py Wed Sep 03 19:01:35 2008 +0200 @@ -202,6 +202,8 @@ os.environ["PYTHONPATH"] = pythonpath use_correct_python() + global hgpkg + hgpkg = _hgpath() if coverage: vlog("# Installing coverage wrapper") @@ -456,6 +458,16 @@ PYTHONDIR = os.path.join(INST, "lib", "python") COVERAGE_FILE = os.path.join(TESTDIR, ".coverage") +def _hgpath(): + cmd = '%s -c "import mercurial; print mercurial.__path__[0]"' + hgpath = os.popen(cmd % python) + path = hgpath.read().strip() + hgpath.close() + return path + +expecthg = os.path.join(HGTMP, 'install', 'lib', 'python', 'mercurial') +hgpkg = None + def run_children(tests): if not options.with_hg: install_hg() @@ -512,6 +524,9 @@ print "Skipped %s: %s" % (s[0], s[1]) for s in fails: print "Failed %s: %s" % (s[0], s[1]) + + if hgpkg != expecthg: + print '# Tested unexpected mercurial: %s' % hgpkg print "# Ran %d tests, %d skipped, %d failed." % ( tested, skipped, failed) sys.exit(failures != 0) @@ -525,6 +540,9 @@ if not options.with_hg: install_hg() + if hgpkg != expecthg: + print '# Testing unexpected mercurial: %s' % hgpkg + if options.timeout > 0: try: signal.signal(signal.SIGALRM, alarmed) @@ -585,6 +603,8 @@ print "Skipped %s: %s" % s for s in fails: print "Failed %s: %s" % s + if hgpkg != expecthg: + print '# Tested unexpected mercurial: %s' % hgpkg print "# Ran %d tests, %d skipped, %d failed." % ( tested, skipped, failed)