aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2025-08-01 16:26:30 +0200
committerRobin Appelman <robin@icewind.nl>2025-08-01 16:26:30 +0200
commitbbba094502d0a58569e218b3d8339b25d801ac58 (patch)
tree07f3a3291057e00323a648281b999c70afff214d
parent6bc6ed95a3d7d56a2313b68dd55ef66eb45dc1f7 (diff)
downloadnextcloud-server-test-disable-autoload-apps.tar.gz
nextcloud-server-test-disable-autoload-apps.zip
test: add env option to disable loading all installed apps during teststest-disable-autoload-apps
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--tests/bootstrap.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 81bb930de65..1fb54344d49 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -23,13 +23,16 @@ require_once __DIR__ . '/autoload.php';
\OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/', true);
-// load all apps
-$appManager = Server::get(IAppManager::class);
-foreach (new \DirectoryIterator(__DIR__ . '/../apps/') as $file) {
- if ($file->isDot()) {
- continue;
+$dontLoadApps = getenv('TEST_DONT_LOAD_APPS');
+if (!$dontLoadApps) {
+ // load all apps
+ $appManager = Server::get(IAppManager::class);
+ foreach (new \DirectoryIterator(__DIR__ . '/../apps/') as $file) {
+ if ($file->isDot()) {
+ continue;
+ }
+ $appManager->loadApp($file->getFilename());
}
- $appManager->loadApp($file->getFilename());
}
OC_Hook::clear();