|
122 | 122 | $php_cgi = null;
|
123 | 123 | }
|
124 | 124 | }
|
125 |
| - |
126 |
| - if (!getenv('TEST_PHPDBG_EXECUTABLE')) { |
127 |
| - $phpdbg = $cwd . '/sapi/phpdbg/phpdbg'; |
128 |
| - |
129 |
| - if (file_exists($phpdbg)) { |
130 |
| - putenv("TEST_PHPDBG_EXECUTABLE=$phpdbg"); |
131 |
| - } else { |
132 |
| - $phpdbg = null; |
133 |
| - } |
134 |
| - } |
135 | 125 | }
|
136 | 126 | $environment['TEST_PHP_EXECUTABLE'] = $php;
|
137 | 127 | }
|
|
147 | 137 | $environment['TEST_PHP_CGI_EXECUTABLE'] = $php_cgi;
|
148 | 138 | }
|
149 | 139 |
|
| 140 | +if (!getenv('TEST_PHPDBG_EXECUTABLE')) { |
| 141 | + if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) . "/phpdbg.exe")) { |
| 142 | + $phpdbg = realpath(dirname($php) . "/phpdbg.exe"); |
| 143 | + } elseif (file_exists(dirname($php) . "/../../sapi/phpdbg/phpdbg")) { |
| 144 | + $phpdbg = realpath(dirname($php) . "/../../sapi/phpdbg/phpdbg"); |
| 145 | + } elseif (file_exists("./sapi/phpdbg/phpdbg")) { |
| 146 | + $phpdbg = realpath("./sapi/phpdbg/phpdbg"); |
| 147 | + } elseif (file_exists(dirname($php) . "/phpdbg")) { |
| 148 | + $phpdbg = realpath(dirname($php) . "/phpdbg"); |
| 149 | + } else { |
| 150 | + $phpdbg = null; |
| 151 | + } |
| 152 | + if ($phpdbg) { |
| 153 | + putenv("TEST_PHPDBG_EXECUTABLE=$phpdbg"); |
| 154 | + } |
| 155 | +} |
| 156 | + |
150 | 157 | if (getenv('TEST_PHPDBG_EXECUTABLE')) {
|
151 | 158 | $phpdbg = getenv('TEST_PHPDBG_EXECUTABLE');
|
152 | 159 |
|
@@ -1401,26 +1408,12 @@ function run_test($php, $file, $env)
|
1401 | 1408 | if (isset($phpdbg)) {
|
1402 | 1409 | $old_php = $php;
|
1403 | 1410 | $php = $phpdbg . ' -qIb';
|
1404 |
| - } else if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) . "/phpdbg.exe")) { |
1405 |
| - $old_php = $php; |
1406 |
| - $php = realpath(dirname($php) . "/phpdbg.exe") . ' -qIb '; |
1407 | 1411 | } else {
|
1408 |
| - if (file_exists(dirname($php) . "/../../sapi/phpdbg/phpdbg")) { |
1409 |
| - $old_php = $php; |
1410 |
| - $php = realpath(dirname($php) . "/../../sapi/phpdbg/phpdbg") . ' -qIb '; |
1411 |
| - } else if (file_exists("./sapi/phpdbg/phpdbg")) { |
1412 |
| - $old_php = $php; |
1413 |
| - $php = realpath("./sapi/phpdbg/phpdbg") . ' -qIb '; |
1414 |
| - } else if (file_exists(dirname($php) . "/phpdbg")) { |
1415 |
| - $old_php = $php; |
1416 |
| - $php = realpath(dirname($php) . "/phpdbg") . ' -qIb '; |
1417 |
| - } else { |
1418 |
| - show_result('SKIP', $tested, $tested_file, "reason: phpdbg not available"); |
| 1412 | + show_result('SKIP', $tested, $tested_file, "reason: phpdbg not available"); |
1419 | 1413 |
|
1420 |
| - junit_init_suite(junit_get_suitename_for($shortname)); |
1421 |
| - junit_mark_test_as('SKIP', $shortname, $tested, 0, 'phpdbg not available'); |
1422 |
| - return 'SKIPPED'; |
1423 |
| - } |
| 1414 | + junit_init_suite(junit_get_suitename_for($shortname)); |
| 1415 | + junit_mark_test_as('SKIP', $shortname, $tested, 0, 'phpdbg not available'); |
| 1416 | + return 'SKIPPED'; |
1424 | 1417 | }
|
1425 | 1418 | }
|
1426 | 1419 |
|
|
0 commit comments