You are here

06-run-tests.sh in Thunder 8.2

Same filename and directory in other branches
  1. 8.3 scripts/travis/06-run-tests.sh
#!/usr/bin/env bash

cd ${TEST_DIR}/docroot

docker run -d -p 4444:4444 -v $(pwd)/$(drush eval "echo drupal_get_path('profile', 'thunder');")/tests:/tests -v /dev/shm:/dev/shm --net=host selenium/standalone-chrome:3.14.0-iron
docker ps -a

# Make simple export import
if [[ "${TEST_UPDATE}" != "true" ]]; then
    drush -y cex sync

    # We have to use "2>&1" because drush outputs everything to stderr
    DRUSH_CIM_RESULT=$(drush -y cim sync 2>&1)
    if [[ "${DRUSH_CIM_RESULT}" != *"There are no changes to import."* ]]; then
        exit 1
    fi
fi

# execute Drupal tests
thunderDumpFile=thunder.php php ${TEST_DIR}/docroot/core/scripts/run-tests.sh --php `which php` --suppress-deprecations --verbose --color --url http://localhost:8080 Thunder

if [[ ${TEST_UPDATE} == "true" ]]; then
    php ${TEST_DIR}/docroot/core/scripts/run-tests.sh --php `which php` --suppress-deprecations --verbose --color --url http://localhost:8080 --class "Drupal\Tests\thunder\Functional\Installer\ThunderInstallerTest"
    php ${TEST_DIR}/docroot/core/scripts/run-tests.sh --php `which php` --suppress-deprecations --verbose --color --url http://localhost:8080 --class "Drupal\Tests\thunder\Functional\Installer\ThunderInstallerGermanTest"
fi

File

scripts/travis/06-run-tests.sh
View source
  1. #!/usr/bin/env bash
  2. cd ${TEST_DIR}/docroot
  3. docker run -d -p 4444:4444 -v $(pwd)/$(drush eval "echo drupal_get_path('profile', 'thunder');")/tests:/tests -v /dev/shm:/dev/shm --net=host selenium/standalone-chrome:3.14.0-iron
  4. docker ps -a
  5. # Make simple export import
  6. if [[ "${TEST_UPDATE}" != "true" ]]; then
  7. drush -y cex sync
  8. # We have to use "2>&1" because drush outputs everything to stderr
  9. DRUSH_CIM_RESULT=$(drush -y cim sync 2>&1)
  10. if [[ "${DRUSH_CIM_RESULT}" != *"There are no changes to import."* ]]; then
  11. exit 1
  12. fi
  13. fi
  14. # execute Drupal tests
  15. thunderDumpFile=thunder.php php ${TEST_DIR}/docroot/core/scripts/run-tests.sh --php `which php` --suppress-deprecations --verbose --color --url http://localhost:8080 Thunder
  16. if [[ ${TEST_UPDATE} == "true" ]]; then
  17. php ${TEST_DIR}/docroot/core/scripts/run-tests.sh --php `which php` --suppress-deprecations --verbose --color --url http://localhost:8080 --class "Drupal\Tests\thunder\Functional\Installer\ThunderInstallerTest"
  18. php ${TEST_DIR}/docroot/core/scripts/run-tests.sh --php `which php` --suppress-deprecations --verbose --color --url http://localhost:8080 --class "Drupal\Tests\thunder\Functional\Installer\ThunderInstallerGermanTest"
  19. fi