Lets say I have 5 selenium test files (test1.py.....test5.py). In Jenkins, the usual way you want to run your tests is in parallel (each a different job) so that you know easier when something broke (send emails, mark builds as fail, etc etc). <div>

<br></div><div>So I run things, per job, as: </div><div>[job1] tox test1.py</div><div>[job2] tox test2.py</div><div>[job3] tox test3.py</div><div>....</div><div><br></div><div>Now when I launch them, some of them, some times, fail because of the error above. I know I could just run &quot;tox&quot; and it will run all tests, but then I lose cool jenkin stuff like being able to tell which test failed easily (if one fails in one file, the whole build fails). I could just run them as &quot;py.test&quot; instead of tox, but that&#39;s annoying (deps, multi-conf, etc). </div>

<div><br></div><div>Detox? Sounds promising. I&#39;ll take a look. Thanks!</div><div><br></div><div><div>~Pedro<br></div>
<br><br><div class="gmail_quote">On Tue, Feb 19, 2013 at 9:58 AM, holger krekel <span dir="ltr">&lt;<a href="mailto:holger@merlinux.eu" target="_blank">holger@merlinux.eu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Pedrod,<br>
<div class="im"><br>
On Mon, Feb 18, 2013 at 14:50 -0500, Pedro Rodriguez wrote:<br>
&gt; I&#39;m using Tox with Jenkins to run several selenium tests. Everything is<br>
&gt; good but every now and then I get the follow error:<br>
&gt;<br>
&gt; IOError: [Errno 2] No such file or directory: &#39;/var/lib/jenkins/.tox/<br>
&gt; jenkins/lib/python2.7/site-packages/Distutils-1.0-py2.7.egg-info&#39;<br>
&gt;<br>
&gt; Looking at the log (when it works), I think the issue is this:<br>
&gt;<br>
&gt; Installing collected packages: Distutils<br>
&gt;<br>
&gt;   Found existing installation: Distutils 1.0<br>
&gt;<br>
&gt;     Uninstalling Distutils:<br>
&gt;<br>
&gt;       Removing file or directory<br>
&gt; /var/lib/jenkins/.tox/jenkins/lib/python2.7/site-packages/Distutils-1.0-py2.7.egg-info<br>
&gt;       Successfully uninstalled Distutils<br>
&gt;<br>
&gt; I think what is happening is that if 2 or more tox are running at the same<br>
&gt; time, while one is Uninstalling Distutils, then another one tries to do the<br>
&gt; same thing (and since the other one already did it, it can&#39;t find it and<br>
&gt; throws an IO error).<br>
<br>
</div>I am not sure i follow.  There should only ever be one tox instance running<br>
things per virtualenv.  Are you suggesting there are two tox processes<br>
working on the same virtualenv?<br>
<div class="im"><br>
&gt; So:<br>
&gt; ToxA -&gt; Finds the Distutils installation<br>
&gt; ToxB -&gt; Also finds it<br>
&gt; ToxA -&gt; Delete it<br>
&gt; ToxB -&gt; Try to delete (fails)<br>
&gt;<br>
&gt; So my questions are:<br>
&gt; - Why is Distutils being deleted? (noob when it comes to it)<br>
<br>
</div>i don&#39;t know - it&#39;s not something that tox deals with itself.<br>
<div class="im"><br>
&gt; - Is there a way to avoid this?<br>
&gt; - How are you guys using Tox with Jenkins? I&#39;m just calling tox -e jenkins<br>
&gt; path/to/test.py. Is there a better way?<br>
<br>
</div>did you look at: <a href="http://testrun.org/tox/latest//example/jenkins.html" target="_blank">http://testrun.org/tox/latest//example/jenkins.html</a> ?<br>
<div class="im"><br>
&gt; - sbt and other building tools usually have locking mechanisms for these<br>
&gt; kind of things. Why doesn&#39;t Tox? (if it does, how do I turn it on?).<br>
<br>
</div>There is &quot;detox&quot; which runs tests in parallel but it takes care itself<br>
to not have more than one &quot;tox&quot; instance running per virtualenv.<br>
<br>
best,<br>
holger<br>
</blockquote></div><br></div>