Skip to content

Commit

Permalink
Change drupal-tests.sh sample to use drush test-run.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjaspan committed Jan 22, 2012
1 parent 52f43f6 commit 0c7029a
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions samples/drupal-tests.sh
Expand Up @@ -2,21 +2,15 @@
# #
# Cloud Hook: drupal-tests # Cloud Hook: drupal-tests
# #
# Run Drupal simpletests in the target environment. # Run Drupal simpletests in the target environment using drush test-run.


site="$1" site="$1"
target_env="$2" target_env="$2"


# Select the tests to run. See Drupal's scripts/run-test.sh for options. # Select the tests to run. Run "drush help test-run" for options.
TESTS="--class DatabaseConnectionTestCase" TESTS="UserRegistrationTestCase"
# Uncomment to run all tests. # To run all tests (very slow!), uncomment this line.
# TESTS=--all TESTS="--all"

# Change this only if you need to use a settings.php other than sites/default.
URL=http://localhost/

# Uncomment to show verbose test output.
VERBOSE=--verbose


# Enable the simpletest module if it is not already enabled. # Enable the simpletest module if it is not already enabled.
simpletest=`drush @$site.$target_env pm-info simpletest | perl -F'/[\s:]+/' -lane '/Status/ && print $F[2]'` simpletest=`drush @$site.$target_env pm-info simpletest | perl -F'/[\s:]+/' -lane '/Status/ && print $F[2]'`
Expand All @@ -26,8 +20,7 @@ if [ "$simpletest" = "disabled" ]; then
fi fi


# Run the tests. # Run the tests.
cd /var/www/html/$site.$target_env/docroot drush @$site.$target_env test-run $TESTS
php ./scripts/run-tests.sh --url $URL $VERBOSE $TESTS


# If we enabled simpletest, disable it. # If we enabled simpletest, disable it.
if [ "$simpletest" = "disabled" ]; then if [ "$simpletest" = "disabled" ]; then
Expand Down

0 comments on commit 0c7029a

Please sign in to comment.