Skip to content

Instantly share code, notes, and snippets.

@mykiwi
Last active December 17, 2015 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mykiwi/5676293 to your computer and use it in GitHub Desktop.
Save mykiwi/5676293 to your computer and use it in GitHub Desktop.
#!/bin/bash
# pwd should be Symfony2project/bin
# must have behat executable next to this script
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/..
for feature_path in `find src/ -path '*Features'`; do
bundle=$(echo $feature_path | sed -e 's~.*src/\(.*\)/Features~\1~' | sed -e 's~/~~');
echo "Running suite for $bundle";
$DIR/behat "@$bundle";
done;
cd - > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment