Show More
@@ -202,6 +202,8 b' def install_hg():' | |||||
202 | os.environ["PYTHONPATH"] = pythonpath |
|
202 | os.environ["PYTHONPATH"] = pythonpath | |
203 |
|
203 | |||
204 | use_correct_python() |
|
204 | use_correct_python() | |
|
205 | global hgpkg | |||
|
206 | hgpkg = _hgpath() | |||
205 |
|
207 | |||
206 | if coverage: |
|
208 | if coverage: | |
207 | vlog("# Installing coverage wrapper") |
|
209 | vlog("# Installing coverage wrapper") | |
@@ -456,6 +458,16 b' BINDIR = os.path.join(INST, "bin")' | |||||
456 | PYTHONDIR = os.path.join(INST, "lib", "python") |
|
458 | PYTHONDIR = os.path.join(INST, "lib", "python") | |
457 | COVERAGE_FILE = os.path.join(TESTDIR, ".coverage") |
|
459 | COVERAGE_FILE = os.path.join(TESTDIR, ".coverage") | |
458 |
|
460 | |||
|
461 | def _hgpath(): | |||
|
462 | cmd = '%s -c "import mercurial; print mercurial.__path__[0]"' | |||
|
463 | hgpath = os.popen(cmd % python) | |||
|
464 | path = hgpath.read().strip() | |||
|
465 | hgpath.close() | |||
|
466 | return path | |||
|
467 | ||||
|
468 | expecthg = os.path.join(HGTMP, 'install', 'lib', 'python', 'mercurial') | |||
|
469 | hgpkg = None | |||
|
470 | ||||
459 | def run_children(tests): |
|
471 | def run_children(tests): | |
460 | if not options.with_hg: |
|
472 | if not options.with_hg: | |
461 | install_hg() |
|
473 | install_hg() | |
@@ -512,6 +524,9 b' def run_children(tests):' | |||||
512 | print "Skipped %s: %s" % (s[0], s[1]) |
|
524 | print "Skipped %s: %s" % (s[0], s[1]) | |
513 | for s in fails: |
|
525 | for s in fails: | |
514 | print "Failed %s: %s" % (s[0], s[1]) |
|
526 | print "Failed %s: %s" % (s[0], s[1]) | |
|
527 | ||||
|
528 | if hgpkg != expecthg: | |||
|
529 | print '# Tested unexpected mercurial: %s' % hgpkg | |||
515 | print "# Ran %d tests, %d skipped, %d failed." % ( |
|
530 | print "# Ran %d tests, %d skipped, %d failed." % ( | |
516 | tested, skipped, failed) |
|
531 | tested, skipped, failed) | |
517 | sys.exit(failures != 0) |
|
532 | sys.exit(failures != 0) | |
@@ -525,6 +540,9 b' def run_tests(tests):' | |||||
525 | if not options.with_hg: |
|
540 | if not options.with_hg: | |
526 | install_hg() |
|
541 | install_hg() | |
527 |
|
542 | |||
|
543 | if hgpkg != expecthg: | |||
|
544 | print '# Testing unexpected mercurial: %s' % hgpkg | |||
|
545 | ||||
528 | if options.timeout > 0: |
|
546 | if options.timeout > 0: | |
529 | try: |
|
547 | try: | |
530 | signal.signal(signal.SIGALRM, alarmed) |
|
548 | signal.signal(signal.SIGALRM, alarmed) | |
@@ -585,6 +603,8 b' def run_tests(tests):' | |||||
585 | print "Skipped %s: %s" % s |
|
603 | print "Skipped %s: %s" % s | |
586 | for s in fails: |
|
604 | for s in fails: | |
587 | print "Failed %s: %s" % s |
|
605 | print "Failed %s: %s" % s | |
|
606 | if hgpkg != expecthg: | |||
|
607 | print '# Tested unexpected mercurial: %s' % hgpkg | |||
588 | print "# Ran %d tests, %d skipped, %d failed." % ( |
|
608 | print "# Ran %d tests, %d skipped, %d failed." % ( | |
589 | tested, skipped, failed) |
|
609 | tested, skipped, failed) | |
590 |
|
610 |
General Comments 0
You need to be logged in to leave comments.
Login now