nextcloud/tests/phpunit-autotest.xml
Anna Larch 2c86e1dccb test(ci): enforce PHPUnit time limits with sensible timeout values
PHPUnit's enforceTimeLimit was disabled, meaning the timeoutForSmallTests,
timeoutForMediumTests and timeoutForLargeTests config values had no effect.
Enable enforcement and set realistic limits: 60s/300s/600s for
small/medium/large, with a 300s default for unannotated tests.

Also clear disable_functions in the PHP development ini preset across all
PHPUnit workflows so pcntl_signal is available — without it the signal
handler that drives timeout enforcement cannot be registered.

Signed-off-by: Anna Larch <anna@nextcloud.com>
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
2026-05-27 11:42:02 +02:00

37 lines
1.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
- SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
- SPDX-FileCopyrightText: 2016 ownCloud, Inc.
- SPDX-License-Identifier: AGPL-3.0-only
-->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="bootstrap.php"
enforceTimeLimit="true"
defaultTimeLimit="300"
timeoutForSmallTests="60"
timeoutForMediumTests="300"
timeoutForLargeTests="600"
cacheDirectory=".phpunit.cache"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd">
<testsuite name="Nextcloud Server">
<directory>lib/</directory>
<directory>Core/</directory>
<directory>../apps/</directory>
<exclude>../apps/user_ldap/tests/Integration</exclude>
</testsuite>
<source>
<include>
<directory>..</directory>
</include>
<exclude>
<directory>../3rdparty</directory>
<directory>../apps/*/composer</directory>
<directory>../apps/*/tests</directory>
<directory>../apps/files_external/3rdparty</directory>
<directory>../build</directory>
<directory>../lib/composer</directory>
<directory>../tests</directory>
<directory>../vendor-bin</directory>
</exclude>
</source>
</phpunit>