jnorwoo / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

Enhancement - Running the tests using as many cores as possible #186

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I added the option -p (for parallel) for the test runner. If used, it will use 
as many cores as possible to run the tests.

It will also suppress the output of each process since they are not very useful 
when more than one does it at the same time.

Once finished, the failing tests (if any) will be shown and the user can choose 
to re-ran those without this new option to see the output.

It's a real time saver. In my case, running all the tests went from 30 minutes 
to 6.

Note: There is a workaround coded for this: 
http://stackoverflow.com/questions/1408356/keyboard-interrupts-with-pythons-mult
iprocessing-pool 

Original issue reported on code.google.com by ernestof...@gmail.com on 7 Apr 2013 at 5:32

Attachments:

GoogleCodeExporter commented 8 years ago
nice work, thanks! I pushed both patches. 'python run.py 20' now gives a 'tests 
failed: 1' result though. unfortunately no time to look into this myself now..

the idea to parallelize run.py is a good one.. I had it myself but with the 
run.py part.. :-) I currently use a manual script in scripts/, called tx, which 
given a number starts this many gnome-terminals and runs the tests in parallel 
across them. but it's much better to do this in run.py and with the 
multiprocessing module.

Original comment by mark.duf...@gmail.com on 7 Apr 2013 at 10:33

GoogleCodeExporter commented 8 years ago
with the run.py part -> without the run.py part

Original comment by mark.duf...@gmail.com on 7 Apr 2013 at 10:33

GoogleCodeExporter commented 8 years ago
Oops... I forgot to remove a line of code that I was using to test the option 
-f with multiprocessing.
I have attached a patch to fix that.

Original comment by ernestof...@gmail.com on 7 Apr 2013 at 11:00

Attachments:

GoogleCodeExporter commented 8 years ago
pushed, thanks for the fix!

Original comment by mark.duf...@gmail.com on 8 Apr 2013 at 6:57