3 Commits
Author SHA1 Message Date
Wez Furlong 240c8c9ebf allow running tests in parallel in runtests.py 2015-08-02 14:39:15 -07:00
Wez Furlong e7da42b204 watchman: start building python based test suite
Summary:
We've had a number of compatibility issues with the arcanist
based test suite, so this is an effort to run them using the
python unittest infrastructure.

This new structure allows us to create a single temporary dir
and to create a dir per test case to track the temporary files
and dirs created during the test.  This is beneficial both from
a post-mortem perspective if a test fails, but also because
the paths that show up in the watchman logs will now be easily
recognizable as being associated with a given test.

This will also help us manage the windows integration tests
(https://github.com/facebook/watchman/issues/19#issuecomment-125054948)
a bit more sanely; a source of errors in the php tests is that
deleting directory trees can fail if a handle still references
any part of it, and there is often a noticeable lag where we
can hit this state and error out.  By deferring the deletes
until our process end, we should minimize this issue.

I've ported a single integration test to demonstrate what this
looks like, the rest will have to be a series of diffs for
easier review.

Test Plan: `make integration` or `./runtests.py`

Reviewers: sid0

Differential Revision: https://reviews.facebook.net/D43137
2015-07-28 21:15:47 -07:00
Wez Furlong 6ea4ed8343 refactor python bser module to pywatchman.bser, add pywatchman.client
Summary:
This draws from our hgwatchman client code to provide a simple
watchman client API for python code.

This changes the makefile so that we install our watchman python module
during `make install`.  It also wires up a rudimentary test of the
client that talks to one of the instances set up by
WatchmanIntegrationEngine.

Test Plan: `./configure --with-python ; make integration`

Reviewers: sid0, achao

Reviewed By: sid0

Subscribers: moshez

Differential Revision: https://phabricator.fb.com/D1323720
2014-05-16 13:11:03 -07:00