You are here

run-tests.sh in Views Reference Field 8

#!/bin/bash

# Run either PHPUnit tests or PHP_CodeSniffer tests on Travis CI, depending
# on the passed in parameter.

mysql_to_ramdisk() {
    sudo service mysql stop
    sudo mv /var/lib/mysql /var/run/tmpfs
    sudo ln -s /var/run/tmpfs /var/lib/mysql
    sudo service mysql start
}

case "$1" in
    PHP_CodeSniffer)
        cd ${TRAVIS_BUILD_DIR}/
        ./vendor/bin/phpcs
        exit $?
        ;;
    8.*.x)
        mysql_to_ramdisk
        cd ${TRAVIS_BUILD_DIR}/
        ls -la
        ls -la ../build/modules/contrib/
        exit $?
        ;;
    *)
        echo "Unknown test '$1'"
        exit 1
esac

File

scripts/travis-ci/run-tests.sh
View source
  1. #!/bin/bash
  2. # Run either PHPUnit tests or PHP_CodeSniffer tests on Travis CI, depending
  3. # on the passed in parameter.
  4. mysql_to_ramdisk() {
  5. sudo service mysql stop
  6. sudo mv /var/lib/mysql /var/run/tmpfs
  7. sudo ln -s /var/run/tmpfs /var/lib/mysql
  8. sudo service mysql start
  9. }
  10. case "$1" in
  11. PHP_CodeSniffer)
  12. cd ${TRAVIS_BUILD_DIR}/
  13. ./vendor/bin/phpcs
  14. exit $?
  15. ;;
  16. 8.*.x)
  17. mysql_to_ramdisk
  18. cd ${TRAVIS_BUILD_DIR}/
  19. ls -la
  20. ls -la ../build/modules/contrib/
  21. exit $?
  22. ;;
  23. *)
  24. echo "Unknown test '$1'"
  25. exit 1
  26. esac