run-tests-drush.sh 675 B

123456789101112131415161718192021
  1. #!/usr/bin/env sh
  2. # This script will run phpunit-based test classes using Drush's
  3. # test framework. First, the Drush executable is located, and
  4. # then phpunit is invoked, pointing to Drush's phpunit.xml as
  5. # the configuration.
  6. #
  7. # Any parameters that may be passed to `phpunit` may also be used
  8. # with this script.
  9. DRUSH_PATH="`which drush`"
  10. DRUSH_DIRNAME="`dirname -- "$DRUSH_PATH"`"
  11. # The following line is needed is you use a `drush` that differs from `which drush`
  12. # export UNISH_DRUSH=$DRUSH_PATH
  13. if [ $# = 0 ] ; then
  14. phpunit --configuration="$DRUSH_DIRNAME/tests" drush
  15. else
  16. # Pass along any arguments.
  17. phpunit --configuration="$DRUSH_DIRNAME/tests" $@
  18. fi