Skip to content

Commit c406d1e

Browse files
committed
Merge branch 'PHP-7.1'
2 parents bff4b02 + e37412e commit c406d1e

File tree

2 files changed

+22
-29
lines changed

2 files changed

+22
-29
lines changed

run-tests.php

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,6 @@
122122
$php_cgi = null;
123123
}
124124
}
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-
}
135125
}
136126
$environment['TEST_PHP_EXECUTABLE'] = $php;
137127
}
@@ -147,6 +137,23 @@
147137
$environment['TEST_PHP_CGI_EXECUTABLE'] = $php_cgi;
148138
}
149139

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+
150157
if (getenv('TEST_PHPDBG_EXECUTABLE')) {
151158
$phpdbg = getenv('TEST_PHPDBG_EXECUTABLE');
152159

@@ -1401,26 +1408,12 @@ function run_test($php, $file, $env)
14011408
if (isset($phpdbg)) {
14021409
$old_php = $php;
14031410
$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 ';
14071411
} 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");
14191413

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';
14241417
}
14251418
}
14261419

sapi/phpdbg/tests/bug73615.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Bug #73615 (phpdbg without option never load .phpdbginit at startup)
33
--SKIPIF--
44
<?php
5-
if (!getenv('TEST_PHPDBG_EXECUTABLE')) die("No TEST_PHPDBG_EXECUTABLE specified");
5+
if (!getenv('TEST_PHPDBG_EXECUTABLE')) die("SKIP: No TEST_PHPDBG_EXECUTABLE specified");
66
?>
77
--FILE--
88
<?php

0 commit comments

Comments
 (0)