How To Use Docker To Run PHPUnit Tests In Parallel
mercredi 10 juin 2015 à 15:07@jeekajoo shaarlinks 10/06/2015
"""
First of all, we retrieve all PHPUnit groups by running a container with the phpunit --list-group command.
Next the gnu parallel command helps us to run tests for each group in parallel. Each task is launched by one core of your processor. If you've got a large cruiser with 8 core then you can run 8 tests group simultaneously.
"""
c'est cool la commande parallel.
exemple:
"""
$ cat test
30
20
40
$ cat test | parallel sleep {}
"""
ça lance simultanément un
"""
$ sleep 20
$ sleep 30
$ sleep 40
"""
xargs peut faire la même chose mais c'est plus chiant parce que faut indiquer '-P' (max-procs):
"""
$ echo {1..5} | xargs -n 1 -P 5 sleep
"""
(Permalink)
"""
First of all, we retrieve all PHPUnit groups by running a container with the phpunit --list-group command.
Next the gnu parallel command helps us to run tests for each group in parallel. Each task is launched by one core of your processor. If you've got a large cruiser with 8 core then you can run 8 tests group simultaneously.
"""
c'est cool la commande parallel.
exemple:
"""
$ cat test
30
20
40
$ cat test | parallel sleep {}
"""
ça lance simultanément un
"""
$ sleep 20
$ sleep 30
$ sleep 40
"""
xargs peut faire la même chose mais c'est plus chiant parce que faut indiquer '-P' (max-procs):
"""
$ echo {1..5} | xargs -n 1 -P 5 sleep
"""
(Permalink)