|
159 | 159 | $php_cgi = null;
|
160 | 160 | }
|
161 | 161 | }
|
162 |
| - |
163 |
| - if (!getenv('TEST_PHPDBG_EXECUTABLE')) { |
164 |
| - $phpdbg = $cwd . '/sapi/phpdbg/phpdbg'; |
165 |
| - |
166 |
| - if (file_exists($phpdbg)) { |
167 |
| - putenv("TEST_PHPDBG_EXECUTABLE=$phpdbg"); |
168 |
| - } else { |
169 |
| - $phpdbg = null; |
170 |
| - } |
171 |
| - } |
172 | 162 | }
|
173 | 163 | $environment['TEST_PHP_EXECUTABLE'] = $php;
|
174 | 164 | }
|
|
184 | 174 | $environment['TEST_PHP_CGI_EXECUTABLE'] = $php_cgi;
|
185 | 175 | }
|
186 | 176 |
|
| 177 | +if (!getenv('TEST_PHPDBG_EXECUTABLE')) { |
| 178 | + if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) . "/phpdbg.exe")) { |
| 179 | + $phpdbg = realpath(dirname($php) . "/phpdbg.exe"); |
| 180 | + } elseif (file_exists(dirname($php) . "/../../sapi/phpdbg/phpdbg")) { |
| 181 | + $phpdbg = realpath(dirname($php) . "/../../sapi/phpdbg/phpdbg"); |
| 182 | + } elseif (file_exists("./sapi/phpdbg/phpdbg")) { |
| 183 | + $phpdbg = realpath("./sapi/phpdbg/phpdbg"); |
| 184 | + } elseif (file_exists(dirname($php) . "/phpdbg")) { |
| 185 | + $phpdbg = realpath(dirname($php) . "/phpdbg"); |
| 186 | + } else { |
| 187 | + $phpdbg = null; |
| 188 | + } |
| 189 | + if ($phpdbg) { |
| 190 | + putenv("TEST_PHPDBG_EXECUTABLE=$phpdbg"); |
| 191 | + } |
| 192 | +} |
| 193 | + |
187 | 194 | if (getenv('TEST_PHPDBG_EXECUTABLE')) {
|
188 | 195 | $phpdbg = getenv('TEST_PHPDBG_EXECUTABLE');
|
189 | 196 |
|
@@ -1415,26 +1422,12 @@ function run_test($php, $file, $env)
|
1415 | 1422 | if (isset($phpdbg)) {
|
1416 | 1423 | $old_php = $php;
|
1417 | 1424 | $php = $phpdbg . ' -qIb';
|
1418 |
| - } else if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) . "/phpdbg.exe")) { |
1419 |
| - $old_php = $php; |
1420 |
| - $php = realpath(dirname($php) . "/phpdbg.exe") . ' -qIb '; |
1421 | 1425 | } else {
|
1422 |
| - if (file_exists(dirname($php) . "/../../sapi/phpdbg/phpdbg")) { |
1423 |
| - $old_php = $php; |
1424 |
| - $php = realpath(dirname($php) . "/../../sapi/phpdbg/phpdbg") . ' -qIb '; |
1425 |
| - } else if (file_exists("./sapi/phpdbg/phpdbg")) { |
1426 |
| - $old_php = $php; |
1427 |
| - $php = realpath("./sapi/phpdbg/phpdbg") . ' -qIb '; |
1428 |
| - } else if (file_exists(dirname($php) . "/phpdbg")) { |
1429 |
| - $old_php = $php; |
1430 |
| - $php = realpath(dirname($php) . "/phpdbg") . ' -qIb '; |
1431 |
| - } else { |
1432 |
| - show_result('SKIP', $tested, $tested_file, "reason: phpdbg not available"); |
| 1426 | + show_result('SKIP', $tested, $tested_file, "reason: phpdbg not available"); |
1433 | 1427 |
|
1434 |
| - junit_init_suite(junit_get_suitename_for($shortname)); |
1435 |
| - junit_mark_test_as('SKIP', $shortname, $tested, 0, 'phpdbg not available'); |
1436 |
| - return 'SKIPPED'; |
1437 |
| - } |
| 1428 | + junit_init_suite(junit_get_suitename_for($shortname)); |
| 1429 | + junit_mark_test_as('SKIP', $shortname, $tested, 0, 'phpdbg not available'); |
| 1430 | + return 'SKIPPED'; |
1438 | 1431 | }
|
1439 | 1432 | }
|
1440 | 1433 |
|
|
0 commit comments