diff --git a/run-tests.php b/run-tests.php index d14fcafeeed24..51a82aad64cf9 100755 --- a/run-tests.php +++ b/run-tests.php @@ -394,6 +394,7 @@ function main() $temp_urlbase = null; $conf_passed = null; $no_clean = false; + $selected_tests = false; $slow_min_ms = INF; $preload = false; $file_cache = null; @@ -634,6 +635,7 @@ function main() } if (!$is_switch) { + $selected_tests = true; $testfile = realpath($argv[$i]); if (!$testfile && strpos($argv[$i], '*') !== false && function_exists('glob')) { @@ -664,6 +666,11 @@ function main() } } + if ($selected_tests && count($test_files) === 0) { + echo "No tests found.\n"; + return; + } + // Default to PHP_BINARY as executable if (!isset($environment['TEST_PHP_EXECUTABLE'])) { $php = PHP_BINARY;