You are here

run_tests.sh in OAuth2 Client 8

Same filename and directory in other branches
  1. 7.2 tests/run_tests.sh
  2. 7 tests/run_tests.sh
#!/bin/bash
### Create the links of the required modules and libraries
### on the profile 'testing', then run the tests.

cd $(dirname $0)

### get the paths
drupal_dir=$(drush php-eval 'print realpath(".")')
testing_dir=$drupal_dir/profiles/testing

### list of the required modules (dependencies)
module_list="
    oauth2_client
    oauth2_server
    libraries
    ctools
    entity
    entityreference
    xautoload
"
### link the modules to the profile 'testing'
for module in $module_list
do
    module_path=$(drush php-eval "print drupal_get_path('module', '$module')")
    ln -sf $drupal_dir/$module_path $testing_dir/modules/
done

### link the required library oauth2-server-php
oauth2_server_php=$(drush php-eval 'print libraries_get_path("oauth2-server-php")')
mkdir -p $testing_dir/libraries/
ln -sf $drupal_dir/$oauth2_server_php $testing_dir/libraries/

### run the tests
drush test-clean
drush test-run OAuth2ClientTestCase

File

tests/run_tests.sh
View source
  1. #!/bin/bash
  2. ### Create the links of the required modules and libraries
  3. ### on the profile 'testing', then run the tests.
  4. cd $(dirname $0)
  5. ### get the paths
  6. drupal_dir=$(drush php-eval 'print realpath(".")')
  7. testing_dir=$drupal_dir/profiles/testing
  8. ### list of the required modules (dependencies)
  9. module_list="
  10. oauth2_client
  11. oauth2_server
  12. libraries
  13. ctools
  14. entity
  15. entityreference
  16. xautoload
  17. "
  18. ### link the modules to the profile 'testing'
  19. for module in $module_list
  20. do
  21. module_path=$(drush php-eval "print drupal_get_path('module', '$module')")
  22. ln -sf $drupal_dir/$module_path $testing_dir/modules/
  23. done
  24. ### link the required library oauth2-server-php
  25. oauth2_server_php=$(drush php-eval 'print libraries_get_path("oauth2-server-php")')
  26. mkdir -p $testing_dir/libraries/
  27. ln -sf $drupal_dir/$oauth2_server_php $testing_dir/libraries/
  28. ### run the tests
  29. drush test-clean
  30. drush test-run OAuth2ClientTestCase