sapling/eden/integration/lib
Adam Simpkins 5da361f55b improve building and importing of the eden hg extension
Summary:
This updates how we build and package the eden hg extension, and how we find it
during integration tests.

- Update the extension to always look relative to its current location to find
  the other modules it depends on.  This ensures that the integration tests
  always find modules from the local repository, and do not use the modules
  installed on the system.

- Add a buck rule to unpack the python archive at build time.  This is needed
  for integration tests to use the local version of the module.

- Ensure that we install a correct `hgext3rd/__init__.py` module in the eden
  extension directory.  This is required to correctly set up `hgext3rd` as a
  namespace package.  This also unfortunately needs to be a `.py` file, and not
  just a .pyc file.  (The pkgutil.expand_path() code looks specifically for
  directories containing `__init__.py` files, and does not check for
  `__init__.pyc`.)

- Update the extension to only try importing the native thrift modules if we
  are running python 2.7.6 or greater.  Python 2.7.6 is the first that supports
  unicode arguments to `struct.pack()`, which thrift requires.  Python 2.7.5 can
  import the thrift modules, but throws errors when trying to run them.

Reviewed By: bolinfest

Differential Revision: D4935279

fbshipit-source-id: 9af81736124c55476a5eb5beba9474a4371a639b
2017-04-24 11:14:34 -07:00
..
edenclient.py make vlog settings controllable on a per-test basis 2017-03-31 18:21:44 -07:00
find_executables.py improve building and importing of the eden hg extension 2017-04-24 11:14:34 -07:00
fs.py move integration tests to eden/integration 2017-01-31 14:41:14 -08:00
gitrepo.py move integration tests to eden/integration 2017-01-31 14:41:14 -08:00
hgrepo.py implement hg reset 2017-04-06 17:50:43 -07:00
repobase.py move integration tests to eden/integration 2017-01-31 14:41:14 -08:00
TARGETS move eden/fs/cli to eden/cli 2017-04-14 11:39:01 -07:00
testcase.py make vlog settings controllable on a per-test basis 2017-03-31 18:21:44 -07:00