You are here

run_tests.sh in OAuth2 Login 7

Same filename and directory in other branches
  1. 8 tests/run_tests.sh
  2. 7.2 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_login
    hybridauth
    oauth2_client
    oauth2_loginprovider
    services
    features
    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 libraries
library_list="
    oauth2-server-php
    hybridauth
"
mkdir -p $testing_dir/libraries/
for library in library_list
do
    library_path=$(drush php-eval 'print libraries_get_path("$library")')
    ln -sf $drupal_dir/$library_path $testing_dir/libraries/
done

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

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_login
  11. hybridauth
  12. oauth2_client
  13. oauth2_loginprovider
  14. services
  15. features
  16. oauth2_server
  17. libraries
  18. ctools
  19. entity
  20. entityreference
  21. xautoload
  22. "
  23. ### link the modules to the profile 'testing'
  24. for module in $module_list
  25. do
  26. module_path=$(drush php-eval "print drupal_get_path('module', '$module')")
  27. ln -sf $drupal_dir/$module_path $testing_dir/modules/
  28. done
  29. ### link the required libraries
  30. library_list="
  31. oauth2-server-php
  32. hybridauth
  33. "
  34. mkdir -p $testing_dir/libraries/
  35. for library in library_list
  36. do
  37. library_path=$(drush php-eval 'print libraries_get_path("$library")')
  38. ln -sf $drupal_dir/$library_path $testing_dir/libraries/
  39. done
  40. ### run the tests
  41. drush test-clean
  42. drush test-run OAuth2LoginProviderTestCase