diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2015-09-01 16:29:33 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@owncloud.com> | 2015-09-01 16:29:33 +0100 |
commit | e50b3bd87fb1fa669924a9468d2836acce4f3a34 (patch) | |
tree | 2c477119e644dada34a2f752c6e35ed51c28ac45 | |
parent | 9858a6f7059dbf327365a2b259a57de81b6a3e8a (diff) | |
parent | f6b1d3506f63518da7f5df250ef95f925adfb933 (diff) | |
download | nextcloud-server-e50b3bd87fb1fa669924a9468d2836acce4f3a34.tar.gz nextcloud-server-e50b3bd87fb1fa669924a9468d2836acce4f3a34.zip |
Merge pull request #18707 from owncloud/autotest-xdebug
Allow easy XDEBUG debugging with autotest
-rwxr-xr-x | autotest-external.sh | 6 | ||||
-rwxr-xr-x | autotest.sh | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/autotest-external.sh b/autotest-external.sh index 65d53aaa95d..cb5a3dad503 100755 --- a/autotest-external.sh +++ b/autotest-external.sh @@ -17,6 +17,9 @@ BASEDIR=$PWD DBCONFIGS="sqlite mysql pgsql oci" PHPUNIT=$(which phpunit) +_XDEBUG_CONFIG=$XDEBUG_CONFIG +unset XDEBUG_CONFIG + function print_syntax { echo -e "Syntax: ./autotest-external.sh [dbconfigname] [startfile]\n" >&2 echo -e "\t\"dbconfigname\" can be one of: $DBCONFIGS" >&2 @@ -159,6 +162,9 @@ EOF mkdir "coverage-external-html-$1" # just enable files_external php ../occ app:enable files_external + if [[ "$_XDEBUG_CONFIG" ]]; then + export XDEBUG_CONFIG=$_XDEBUG_CONFIG + fi if [ -z "$NOCOVERAGE" ]; then "$PHPUNIT" --configuration phpunit-autotest-external.xml --log-junit "autotest-external-results-$1.xml" --coverage-clover "autotest-external-clover-$1.xml" --coverage-html "coverage-external-html-$1" RESULT=$? diff --git a/autotest.sh b/autotest.sh index 0e112bfda32..6a09fbfabac 100755 --- a/autotest.sh +++ b/autotest.sh @@ -32,6 +32,9 @@ fi PHP=$(which "$PHP_EXE") PHPUNIT=$(which phpunit) +_XDEBUG_CONFIG=$XDEBUG_CONFIG +unset XDEBUG_CONFIG + function print_syntax { echo -e "Syntax: ./autotest.sh [dbconfigname] [testfile]\n" >&2 echo -e "\t\"dbconfigname\" can be one of: $DBCONFIGS" >&2 @@ -217,6 +220,9 @@ function execute_tests { rm -rf "coverage-html-$DB" mkdir "coverage-html-$DB" "$PHP" -f enable_all.php | grep -i -C9999 error && echo "Error during setup" && exit 101 + if [[ "$_XDEBUG_CONFIG" ]]; then + export XDEBUG_CONFIG=$_XDEBUG_CONFIG + fi if [ -z "$NOCOVERAGE" ]; then "${PHPUNIT[@]}" --configuration phpunit-autotest.xml --log-junit "autotest-results-$DB.xml" --coverage-clover "autotest-clover-$DB.xml" --coverage-html "coverage-html-$DB" "$2" "$3" RESULT=$? |