@@ -715,6 +715,11 @@ function main()
715
715
fclose ($ result_tests_file );
716
716
}
717
717
718
+ if (0 == count ($ test_results )) {
719
+ echo "No tests were run. \n" ;
720
+ return ;
721
+ }
722
+
718
723
compute_summary ();
719
724
if ($ html_output ) {
720
725
fwrite ($ html_file , "<hr/> \n" . get_summary (false , true ));
@@ -1279,10 +1284,18 @@ function system_with_timeout($commandline, $env = null, $stdin = null, $captureS
1279
1284
1280
1285
function run_all_tests ($ test_files , $ env , $ redir_tested = null )
1281
1286
{
1282
- global $ test_results , $ failed_tests_file , $ result_tests_file , $ php , $ test_idx ;
1287
+ global $ test_results , $ failed_tests_file , $ result_tests_file , $ php , $ test_idx, $ file_cache ;
1283
1288
// Parallel testing
1284
1289
global $ PHP_FAILED_TESTS , $ workers , $ workerID , $ workerSock ;
1285
1290
1291
+ if ($ file_cache !== null ) {
1292
+ /* Automatically skip opcache tests in --file-cache mode,
1293
+ * because opcache generally doesn't expect those to run under file cache */
1294
+ $ test_files = array_filter ($ test_files , function ($ test ) {
1295
+ return !is_string ($ test ) || false === strpos ($ test , 'ext/opcache ' );
1296
+ });
1297
+ }
1298
+
1286
1299
/* Ignore -jN if there is only one file to analyze. */
1287
1300
if ($ workers !== null && count ($ test_files ) > 1 && !$ workerID ) {
1288
1301
run_all_tests_parallel ($ test_files , $ env , $ redir_tested );
@@ -2115,16 +2128,6 @@ function run_test($php, $file, $env)
2115
2128
2116
2129
$ orig_ini_settings = settings2params ($ ini_settings );
2117
2130
2118
- // Any special ini settings
2119
- // these may overwrite the test defaults...
2120
- if (array_key_exists ('INI ' , $ section_text )) {
2121
- $ section_text ['INI ' ] = str_replace ('{PWD} ' , dirname ($ file ), $ section_text ['INI ' ]);
2122
- $ section_text ['INI ' ] = str_replace ('{TMP} ' , sys_get_temp_dir (), $ section_text ['INI ' ]);
2123
- $ replacement = IS_WINDOWS ? '" ' . PHP_BINARY . ' -r \"while ($in = fgets(STDIN)) echo $in;\" > $1" ' : 'tee $1 >/dev/null ' ;
2124
- $ section_text ['INI ' ] = preg_replace ('/{MAIL:(\S+)}/ ' , $ replacement , $ section_text ['INI ' ]);
2125
- settings2array (preg_split ("/[ \n\r]+/ " , $ section_text ['INI ' ]), $ ini_settings );
2126
- }
2127
-
2128
2131
if ($ file_cache !== null ) {
2129
2132
$ ini_settings ['opcache.file_cache ' ] = '/tmp ' ;
2130
2133
// Make sure warnings still show up on the second run.
@@ -2138,6 +2141,16 @@ function run_test($php, $file, $env)
2138
2141
}
2139
2142
}
2140
2143
2144
+ // Any special ini settings
2145
+ // these may overwrite the test defaults...
2146
+ if (array_key_exists ('INI ' , $ section_text )) {
2147
+ $ section_text ['INI ' ] = str_replace ('{PWD} ' , dirname ($ file ), $ section_text ['INI ' ]);
2148
+ $ section_text ['INI ' ] = str_replace ('{TMP} ' , sys_get_temp_dir (), $ section_text ['INI ' ]);
2149
+ $ replacement = IS_WINDOWS ? '" ' . PHP_BINARY . ' -r \"while ($in = fgets(STDIN)) echo $in;\" > $1" ' : 'tee $1 >/dev/null ' ;
2150
+ $ section_text ['INI ' ] = preg_replace ('/{MAIL:(\S+)}/ ' , $ replacement , $ section_text ['INI ' ]);
2151
+ settings2array (preg_split ("/[ \n\r]+/ " , $ section_text ['INI ' ]), $ ini_settings );
2152
+ }
2153
+
2141
2154
$ ini_settings = settings2params ($ ini_settings );
2142
2155
2143
2156
$ env ['TEST_PHP_EXTRA_ARGS ' ] = $ pass_options . ' ' . $ ini_settings ;
0 commit comments