Add cgit compatibility testing framework.
authorDave Borowitz <dborowitz@google.com>
Fri, 12 Feb 2010 00:01:33 +0000 (16:01 -0800)
committerDave Borowitz <dborowitz@google.com>
Thu, 4 Mar 2010 17:50:05 +0000 (09:50 -0800)
commitd1de8cd78da88e38bb89f0fbe8177d7b45555069
tree413331429bc550a1a8328e16973338e1c97beaa2
parente2d0a615baaa80e7f3b2ea50278e16d4665e40f7
Add cgit compatibility testing framework.

This adds a suite of tests that require git-core to be installed and can be run
with "make check-compat". These tests can run cgit via subprocess and capture
the results. This is primarily used to test the git and HTTP protocol servers
against their cgit counterparts, but other tests are possible as well. Also
included a test that packs written by dulwich are verified by git verify-pack.

The servers are tested by running the server in a separate thread and spawning a
git process that talks to them, then ensuring that the correct operations were
applied to each repo.

Also fixed/added in the course of testing:
-Fixed a bad merge in server.py
-Fixed some global namespace bugs in web.py
-Refresh the object store pack cache if the pack directory is modified.
-Added a 'dumb' flag to HTTPGitApplication so the HTTP server can be run in
dumb-only mode. This allows testing the dumb server against a smart cgit client
(which has no option to turn off smart HTTP).

There are still several outstanding bugs that cause tests to fail. The relevant
tests are currently skipped and marked with TODO.

Change-Id: I2b4fd0af6e59d03815ca663268441e5696883763
13 files changed:
Makefile
dulwich/object_store.py
dulwich/server.py
dulwich/tests/compat/server_utils.py [new file with mode: 0644]
dulwich/tests/compat/test_pack.py [new file with mode: 0644]
dulwich/tests/compat/test_server.py [new file with mode: 0644]
dulwich/tests/compat/test_web.py [new file with mode: 0644]
dulwich/tests/compat/utils.py [new file with mode: 0644]
dulwich/tests/data/repos/server_new.export [new file with mode: 0644]
dulwich/tests/data/repos/server_old.export [new file with mode: 0644]
dulwich/tests/test_repository.py
dulwich/tests/utils.py [new file with mode: 0644]
dulwich/web.py