@@ -20,43 +20,22 @@ if [ "${RUN_CS_FIXER}" = "true" ]; then
2020 ./php-cs-fixer fix --dry-run --diff --config-file=.php_cs .
2121fi
2222
23- DIRS=(
24- appengine/standard/cloudsql
25- appengine/standard/http
26- appengine/standard/logging
27- appengine/standard/mailgun
28- appengine/standard/mailjet
29- appengine/standard/memcache
30- appengine/standard/phpmyadmin
31- appengine/standard/storage
32- appengine/standard/taskqueue
33- appengine/standard/users
34- appengine/wordpress
35- bigquery/api
36- compute/logging
37- datastore
38- pubsub
39- storage/api
40- )
41-
42- for DIR in " ${DIRS[@]} " ; do
43- pushd ${DIR}
44- composer install
45- phpunit
46- if [ -f build/logs/clover.xml ]; then
47- cp build/logs/clover.xml \
48- ${TEST_BUILD_DIR} /build/logs/clover-${DIR// \/ / _} .xml
49- fi
50- popd
23+ # loop through all directories containing "phpunit.xml" and run them
24+ find * -name phpunit.xml -not -path ' */vendor/*' -exec dirname {} \; | while read DIR
25+ do
26+ pushd ${DIR}
27+ if [ -f " composer.json" ]; then
28+ composer install
29+ fi
30+ if [ " $DIR " = " appengine/standard/modules" ]; then
31+ # tests that needs special envvars
32+ LOCAL_TEST_TARGETS=' app.yaml backend.yaml' phpunit
33+ else
34+ phpunit
35+ fi
36+ if [ -f build/logs/clover.xml ]; then
37+ cp build/logs/clover.xml \
38+ ${TEST_BUILD_DIR} /build/logs/clover-${DIR// \/ / _} .xml
39+ fi
40+ popd
5141done
52-
53- # run tests that needs special envvars
54- # run modules API tests
55- pushd appengine/standard/modules
56- composer install
57- env LOCAL_TEST_TARGETS=' app.yaml backend.yaml' phpunit
58- if [ -f build/logs/clover.xml ]; then
59- cp build/logs/clover.xml \
60- ${TEST_BUILD_DIR} /build/logs/clover-appengine_standard_modules.xml
61- fi
62- popd
0 commit comments