Browse Source

fix test runner and document travis scripts

pull/715/head
Jared Whiklo 7 years ago
parent
commit
441bb33941
  1. 2
      tests/scripts/run_tests.sh
  2. 7
      tests/scripts/travis_scripts.sh

2
tests/scripts/run_tests.sh

@ -2,4 +2,4 @@
# Wrapper for the test executing function so we only have to change it in one place. # Wrapper for the test executing function so we only have to change it in one place.
# The module name gets passed in as a command line arg. # The module name gets passed in as a command line arg.
php scripts/run-tests.sh --php `phpenv which php` --url http://localhost:8081 --verbose $1 php scripts/run-tests.sh --php `phpenv which php` --url http://localhost:8081 --verbose "$1"

7
tests/scripts/travis_scripts.sh

@ -11,14 +11,17 @@ function checkReturn {
} }
# Lint # Lint
echo "PHP Lint"
find $TRAVIS_BUILD_DIR -type f \( -name '*.php' -o -name '*.inc' -o -name '*.module' -o -name '*.install' -o -name '*.test' \) -print0 | xargs -0 -n1 php -l find $TRAVIS_BUILD_DIR -type f \( -name '*.php' -o -name '*.inc' -o -name '*.module' -o -name '*.install' -o -name '*.test' \) -print0 | xargs -0 -n1 php -l
checkReturn $? checkReturn $?
# Check line endings # Check line endings
echo "Check line endings"
$ISLANDORA_DIR/tests/scripts/line_endings.sh $TRAVIS_BUILD_DIR $ISLANDORA_DIR/tests/scripts/line_endings.sh $TRAVIS_BUILD_DIR
checkReturn $? checkReturn $?
# Coding standards # Coding standards
echo "Drush coder-review"
drush coder-review --reviews=production,security,style,i18n,potx $TRAVIS_BUILD_DIR drush coder-review --reviews=production,security,style,i18n,potx $TRAVIS_BUILD_DIR
checkReturn $? checkReturn $?
@ -32,11 +35,15 @@ if [ "$(phpenv version-name)" != "5.3.3" ]; then
else else
DRUPAL_SNIFFS="Drupal" DRUPAL_SNIFFS="Drupal"
fi fi
echo "PHP Codesniffer"
/usr/bin/phpcs --standard=$DRUPAL_SNIFFS --extensions="php,module,inc,install,test" --ignore="vendor,*.info,*.txt,*.md" $TRAVIS_BUILD_DIR /usr/bin/phpcs --standard=$DRUPAL_SNIFFS --extensions="php,module,inc,install,test" --ignore="vendor,*.info,*.txt,*.md" $TRAVIS_BUILD_DIR
checkReturn $? checkReturn $?
else
echo "Skipping PHP Codesniffer for PHP 5.3.3"
fi fi
# Copy/paste detection # Copy/paste detection
echo "PHP Copy Paste Detection"
phpcpd --names *.module,*.inc,*.test $TRAVIS_BUILD_DIR phpcpd --names *.module,*.inc,*.test $TRAVIS_BUILD_DIR
checkReturn $? checkReturn $?

Loading…
Cancel
Save