Skip to content

Instantly share code, notes, and snippets.

@manuquentin
Created November 4, 2013 23:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manuquentin/5d514e43d28f592afb4b to your computer and use it in GitHub Desktop.
Save manuquentin/5d514e43d28f592afb4b to your computer and use it in GitHub Desktop.
#!/bin/bash
# Retrieve and parse all groups
groups=$(sudo docker run -v /vagrant:/app/parallelTests/ acme/parallelTests phpunit -c /app/parallelTests/app --list-groups)
parsed=$(echo $groups | sed "s/-/\t/g")
results=$(echo $parsed | awk '{for(i=9;i<=NF;i++) {print $i}}')
# Loop on each group name and run parallel
for i in $results; do
echo $i
done | parallel sudo docker run -v /vagrant:/app/parallelTests/ acme/parallelTests phpunit -c /app/parallelTests/app --group {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment