Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tox.ini #492

Closed
giampaolo opened this issue May 23, 2014 · 4 comments
Closed

Add tox.ini #492

giampaolo opened this issue May 23, 2014 · 4 comments

Comments

@giampaolo
Copy link
Owner

From [email protected] on April 01, 2014 18:42:22

Here's a change to add a tox.ini for tox: 
https://code.google.com/r/msabramo-psutil-tox/source/detail?r=3f28e2b10650f35841277244206a41f39901bca0&name=tox
 This lets one test across multiple versions of Python.

Original issue: http://code.google.com/p/psutil/issues/detail?id=492

@giampaolo giampaolo self-assigned this May 23, 2014
@giampaolo
Copy link
Owner Author

From g.rodola on April 01, 2014 12:03:01

Interesting. 
Can you please:

1 - post what post-commit URL you have configured in 
https://code.google.com/p/{YOUR_PROJECT}/adminSource 2 - describe what did you 
do on the "tox side"

Labels: -Priority-Low Priority-Medium

@giampaolo
Copy link
Owner Author

From [email protected] on April 01, 2014 13:17:20

I didn't do anything special with the post-commit URL. Tox inherently is not 
something that fires automatically when you do commits, although you could rig 
it up  to do this -- for example, at my work, we have our Jenkins jobs invoke 
tox, using the following recipe: 
http://tox.readthedocs.org/en/latest/example/jenkins.html The way tox works is 
that you create a tox.ini file, `pip install tox`, and then invoke tox as follows:

 ❯ tox
GLOB sdist-make: /Users/marca/dev/hg-repos/psutil/setup.py
py26 inst-nodeps: /Users/marca/dev/hg-repos/psutil/.tox/dist/psutil-2.0.0.zip
py26 runtests: PYTHONHASHSEED='1670459751'
py26 runtests: commands[0] | py.test
===================================================================================================================================================
 test session starts 
====================================================================================================================================================

platform darwin -- Python 2.6.7 -- py-1.4.20 -- pytest-2.5.2
collected 180 items

test/test_memory_leaks.py 
..s.....ss..s...s...ssss.s.......s.....ss..s...s...ssss.s...........s..s....
test/test_psutil.py 
..F................F..F................Fs..s.......ss.........s......ss............F....................

...
_________________________________________________________________________________________________________________________________________________________
 summary 
__________________________________________________________________________________________________________________________________________________________

ERROR:   py26: commands failed
ERROR:   py27: commands failed
ERROR:   pypy: commands failed
ERROR:   py33: commands failed

Tox is not a cloud CI system like Travis CI or Drone.io. It's a command that 
you run which simply runs whatever commands you tell it to run in a bunch of 
different virtualenvs. Most commonly you have it run your test suite and you 
have it do in a bunch of virtualenvs for different Python versions. 
http://tox.testrun.org/ But perhaps something like Drone.io could be useful 
here as well for doing automated testing of psutil. In fact, here's a Drone.io 
job that I just set up in about 5 minutes. It doesn't yet trigger automatically 
on commits, but I think that can be done as long as I can get Google Code to 
post to a web hook.

The alternative way to set up automated CI would be to mirror the repo on 
GitHub (or move it to GitHub) and then you can use Travis CI which 
automatically builds on commits and pull requests, which is awesome.

@giampaolo
Copy link
Owner Author

From [email protected] on April 01, 2014 13:19:07

Oops, here's the Drone.io job that I forgot to link to: 
https://drone.io/msabramo/msabramo-psutil-tox/4

@giampaolo
Copy link
Owner Author

From g.rodola on May 13, 2014 08:36:40

I included a tox file for testing python versions from 2.6 to 3.4 as of 
revision 8186c053bf24 .
It would be great to integrate this with some automation tool such as drone.io 
so that tests gets automatically run on ever "hg push". I will look into that later.

Status: FixedInHG
Labels: Milestone-2.1.2 Component-Tests

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

No branches or pull requests

1 participant