From 441bb33941a7c34a72ea6d54a5079c40ec5c2aa8 Mon Sep 17 00:00:00 2001 From: Jared Whiklo Date: Tue, 12 Feb 2019 10:42:29 -0600 Subject: [PATCH] fix test runner and document travis scripts --- tests/scripts/run_tests.sh | 2 +- tests/scripts/travis_scripts.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh index dd8dda79..a48cddbe 100755 --- a/tests/scripts/run_tests.sh +++ b/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. # 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" diff --git a/tests/scripts/travis_scripts.sh b/tests/scripts/travis_scripts.sh index 6ed1487d..85fa9294 100755 --- a/tests/scripts/travis_scripts.sh +++ b/tests/scripts/travis_scripts.sh @@ -11,14 +11,17 @@ function checkReturn { } # 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 checkReturn $? # Check line endings +echo "Check line endings" $ISLANDORA_DIR/tests/scripts/line_endings.sh $TRAVIS_BUILD_DIR checkReturn $? # Coding standards +echo "Drush coder-review" drush coder-review --reviews=production,security,style,i18n,potx $TRAVIS_BUILD_DIR checkReturn $? @@ -32,11 +35,15 @@ if [ "$(phpenv version-name)" != "5.3.3" ]; then else DRUPAL_SNIFFS="Drupal" fi + echo "PHP Codesniffer" /usr/bin/phpcs --standard=$DRUPAL_SNIFFS --extensions="php,module,inc,install,test" --ignore="vendor,*.info,*.txt,*.md" $TRAVIS_BUILD_DIR checkReturn $? +else + echo "Skipping PHP Codesniffer for PHP 5.3.3" fi # Copy/paste detection +echo "PHP Copy Paste Detection" phpcpd --names *.module,*.inc,*.test $TRAVIS_BUILD_DIR checkReturn $?