From 72c262ad4a3fd7ca23c824b48e74bf64d5e9deeb Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 26 Jun 2019 22:11:21 +0545 Subject: [PATCH] only look for unit tests in the primary apps dir --- tests/apps.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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'); + } } }