aboutsummaryrefslogtreecommitdiffstats
path: root/autotest-external.sh
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-02-01 13:01:11 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2024-02-02 12:57:10 +0100
commit4b6bd8b0c56c4db24582fa965acec054fa38e3bf (patch)
tree7124b55cbd99c657cf46c608471c2e46969946f9 /autotest-external.sh
parentf9ed7956084e1dee27cad2357ef9cfaac2e9d798 (diff)
downloadnextcloud-server-4b6bd8b0c56c4db24582fa965acec054fa38e3bf.tar.gz
nextcloud-server-4b6bd8b0c56c4db24582fa965acec054fa38e3bf.zip
fix(tests): Adjust `files_external` tests to also work locally with WebDAV
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'autotest-external.sh')
-rwxr-xr-xautotest-external.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/autotest-external.sh b/autotest-external.sh
index bc40e2474cd..ca5e2c2fa0b 100755
--- a/autotest-external.sh
+++ b/autotest-external.sh
@@ -31,16 +31,21 @@ function print_syntax {
}
if ! [ -x "$PHPUNIT" ]; then
- echo "phpunit executable not found, please install phpunit version >= 4.8" >&2
- exit 3
+ echo "phpunit executable not found, trying local one from build/integration" >&2
+ if [ -x "$PWD/build/integration/vendor/phpunit/phpunit/phpunit" ]; then
+ PHPUNIT="$PWD/build/integration/vendor/phpunit/phpunit/phpunit"
+ else
+ echo "phpunit executable not found, please install phpunit version >= 9.6" >&2
+ exit 3
+ fi
fi
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 9 -o \( $PHPUNIT_MAJOR_VERSION -eq 9 -a $PHPUNIT_MINOR_VERSION -ge 0 \) ]; then
- echo "phpunit version >= 9.0 required. Version found: $PHPUNIT_VERSION" >&2
+if ! [ $PHPUNIT_MAJOR_VERSION -gt 9 -o \( $PHPUNIT_MAJOR_VERSION -eq 9 -a $PHPUNIT_MINOR_VERSION -ge 6 \) ]; then
+ echo "phpunit version >= 9.6 required. Version found: $PHPUNIT_VERSION" >&2
exit 4
fi