Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions autotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ if [ -z "$PHP_EXE" ]; then
fi
PHP=$(which "$PHP_EXE")
if [ -z "$PHPUNIT_EXE" ]; then
if [ -f "build/integration/vendor/bin/phpunit" ]; then
PHPUNIT_EXE="./build/integration/vendor/bin/phpunit"
else
PHPUNIT_EXE=phpunit
fi
if [ -f build/integration/vendor/bin/phpunit ]; then
PHPUNIT_EXE="./build/integration/vendor/bin/phpunit"
PHPUNIT=$(readlink -f "$PHPUNIT_EXE")
else
PHPUNIT_EXE=phpunit
PHPUNIT=$(which "$PHPUNIT_EXE")
fi
fi

PHPUNIT=$(which "$PHPUNIT_EXE")

set -e

_XDEBUG_CONFIG=$XDEBUG_CONFIG
Expand All @@ -61,7 +61,8 @@ else
fi

if ! [ -x "$PHPUNIT" ]; then
echo "phpunit executable not found, please install phpunit version >= 9.0" >&2
echo "phpunit executable not found, please install phpunit version >= 9.0 manually or via:" >&2
echo " cd build/integration && composer install" >&2
exit 3
fi

Expand All @@ -76,8 +77,8 @@ PHPUNIT_VERSION=$($PHPUNIT --version | cut -d" " -f2)
PHPUNIT_MAJOR_VERSION=$(echo "$PHPUNIT_VERSION" | cut -d"." -f1)
PHPUNIT_MINOR_VERSION=$(echo "$PHPUNIT_VERSION" | cut -d"." -f2)

if ! [ "$PHPUNIT_MAJOR_VERSION" -gt 6 -o \( "$PHPUNIT_MAJOR_VERSION" -eq 6 -a "$PHPUNIT_MINOR_VERSION" -ge 5 \) ]; then
echo "phpunit version >= 6.5 required. Version found: $PHPUNIT_VERSION" >&2
if ! [ "$PHPUNIT_MAJOR_VERSION" -gt 6 -o \( "$PHPUNIT_MAJOR_VERSION" -eq 9 -a "$PHPUNIT_MINOR_VERSION" -ge 0 \) ]; then
echo "phpunit version >= 9.0 required. Version found: $PHPUNIT_VERSION" >&2
exit 4
fi

Expand Down Expand Up @@ -400,8 +401,8 @@ function execute_tests {
echo "No coverage"
fi

echo "$PHP" "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
"$PHP" "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
echo "$PHPUNIT" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
"$PHPUNIT" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
RESULT=$?

if [ "$PRIMARY_STORAGE_CONFIG" == "swift" ] ; then
Expand Down