diff --git a/testing/run_all_tests.sh b/testing/run_all_tests.sh index e8b83e65f5..f800358ad9 100755 --- a/testing/run_all_tests.sh +++ b/testing/run_all_tests.sh @@ -15,12 +15,13 @@ set -ex +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # only run when explicitly set if [ "${RUN_CS_FIXER}" = "true" ]; then - testing/run_cs_check.sh; + $DIR/run_cs_check.sh; fi -testing/run_test_suite.sh; +$DIR/run_test_suite.sh; # only run for travis crons if [ "${TRAVIS_EVENT_TYPE}" != "pull_request" ]; then - testing/run_dependency_check.sh; + $DIR/run_dependency_check.sh; fi diff --git a/testing/run_cs_check.sh b/testing/run_cs_check.sh index c363838b14..7f43dcff24 100755 --- a/testing/run_cs_check.sh +++ b/testing/run_cs_check.sh @@ -22,4 +22,6 @@ if [ -f "vendor/bin/php-cs-fixer" ]; then elif [ -f "./php-cs-fixer" ]; then PHP_CS_FIXER="./php-cs-fixer" fi -$PHP_CS_FIXER fix --dry-run --diff + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +$PHP_CS_FIXER fix --dry-run --diff --config="$DIR/../.php_cs.dist" --path-mode=intersection . diff --git a/testing/run_test_suite.sh b/testing/run_test_suite.sh index e8329cc986..e30920d456 100755 --- a/testing/run_test_suite.sh +++ b/testing/run_test_suite.sh @@ -29,8 +29,12 @@ else RUN_ALL_TESTS=0 fi +if [ "${TEST_DIRECTORIES}" = "" ]; then + TEST_DIRECTORIES="*" +fi + # Loop through all directories containing "phpunit.xml*" and run the test suites. -find * -name 'phpunit.xml*' -not -path '*/vendor/*' -exec dirname {} \; | while read DIR +find $TEST_DIRECTORIES -name 'phpunit.xml*' -not -path '*vendor/*' -exec dirname {} \; | while read DIR do # Only run tests for samples that have changed. if [ "$RUN_ALL_TESTS" -ne "1" ]; then