Mercurial > public > mercurial-scm > hg-stable
diff tests/run-tests.py @ 7172:fb1d7a42663c
Use dummy diffstat in tests and remove older diffstat workaround.
This makes test-notify pass on systems without diffstat installed
or where the diffstat version yields a different output.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sun, 19 Oct 2008 19:03:23 +0200 |
parents | 9364c3304ca2 |
children | 0e8a9530d323 |
line wrap: on
line diff
--- a/tests/run-tests.py Sun Oct 19 17:40:35 2008 +0200 +++ b/tests/run-tests.py Sun Oct 19 19:03:23 2008 +0200 @@ -205,6 +205,18 @@ global hgpkg hgpkg = _hgpath() + vlog("# Installing dummy diffstat") + f = open(os.path.join(BINDIR, 'diffstat'), 'w') + f.write('#!' + sys.executable + '\n' + 'import sys\n' + 'files = 0\n' + 'for line in sys.stdin:\n' + ' if line.startswith("diff "):\n' + ' files += 1\n' + 'sys.stdout.write("files patched: %d\\n" % files)\n') + f.close() + os.chmod(os.path.join(BINDIR, 'diffstat'), 0700) + if coverage: vlog("# Installing coverage wrapper") os.environ['COVERAGE_FILE'] = COVERAGE_FILE