Skip to content

Instantly share code, notes, and snippets.

@sigma
Created February 26, 2013 11:19
Show Gist options
  • Save sigma/5037781 to your computer and use it in GitHub Desktop.
Save sigma/5037781 to your computer and use it in GitHub Desktop.
template for tox-based testing for emacs
from distutils.core import setup
setup(name="magit",
version='0',
)
[tox]
envlist =
emacs23,emacs24,emacs-snapshot
[testenv]
deps =
virtualenv-emacs
[testenv:emacs23]
commands =
virtualenv_install_emacs --with-emacs="{env:EMACS23}" --with-env={envdir} --marmalade
elpa-get mocker cl-lib
make test
[testenv:emacs24]
commands =
virtualenv_install_emacs --with-emacs="{env:EMACS24}" --with-env={envdir} --marmalade
elpa-get mocker cl-lib
make test
[testenv:emacs-snapshot]
commands =
virtualenv_install_emacs --with-emacs="{env:EMACSSNAPSHOT}" --with-env={envdir} --marmalade
elpa-get mocker cl-lib
make test
@tkf
Copy link

tkf commented Feb 26, 2013

Great! How about something like this?

[tox]
envlist =
  emacs23,emacs24,emacs-snapshot

[testenv]
deps =
  virtualenv-emacs
commands =
  virtualenv_install_emacs --with-emacs="{env:BASEEMACS}" --with-env={envdir} --marmalade
  elpa-get mocker cl-lib
  emacs [] -Q -l tests/run-test.el

[testenv:emacs23]
setenv =
  BASEEMACS=emacs23

[testenv:emacs24]
setenv =
  BASEEMACS=emacs24

[testenv:emacs-snapshot]
setenv =
  BASEEMACS=emacs-snapshot

@tkf
Copy link

tkf commented Feb 26, 2013

I just noticed that the problem is byte-compilation. It would be nice if there is a script to install the project (e.g., magit) under virtualenv. This way you don't suffer from incompatible byte compiled files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment