diff --git a/tests/apps.php b/tests/apps.php index 33d47e09d7f2..5224e4bc6c5b 100644 --- a/tests/apps.php +++ b/tests/apps.php @@ -45,7 +45,13 @@ function getSubclasses($parentClassName) { continue; } $dir = OC_App::getAppPath($app); - if (\is_dir($dir . '/tests')) { - loadDirectory($dir . '/tests'); + + // only consider the "built-in" apps found in the apps directory + // we do not want to automatically run unit tests for extra apps + // that might be in a secondary apps dir like apps-external + if (\basename(\dirname($dir)) === "apps") { + if (\is_dir($dir . '/tests')) { + loadDirectory($dir . '/tests'); + } } }