com php-src: Fix run-tests.php to always include TEST_PHPDBG _EXECUTABLE if phpdbg available: run-tests.php sapi/phpdbg/tests/bug73615.phpt

From: Date: Wed, 30 Nov 2016 10:44:10 +0000
Subject: com php-src: Fix run-tests.php to always include TEST_PHPDBG _EXECUTABLE if phpdbg available: run-tests.php sapi/phpdbg/tests/bug73615.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96102@lists.php.net to get a copy of this message
Commit: 344ef050aa7eac98edc7a18861ab81256687aba4 Author: Bob Weinand <bobwei9@hotmail.com> Wed, 30 Nov 2016 11:44:10 +0100 Parents: b73a3afff333143b2908b280e6a4e26d61cb3138 Branches: PHP-7.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=344ef050aa7eac98edc7a18861ab81256687aba4 Log: Fix run-tests.php to always include TEST_PHPDBG_EXECUTABLE if phpdbg available Changed paths: M run-tests.php M sapi/phpdbg/tests/bug73615.phpt Diff: diff --git a/run-tests.php b/run-tests.php index c6ff35e..fbe6d79 100755 --- a/run-tests.php +++ b/run-tests.php @@ -159,16 +159,6 @@ if (getenv('TEST_PHP_EXECUTABLE')) { $php_cgi = null; } } - - if (!getenv('TEST_PHPDBG_EXECUTABLE')) { - $phpdbg = $cwd . '/sapi/phpdbg/phpdbg'; - - if (file_exists($phpdbg)) { - putenv("TEST_PHPDBG_EXECUTABLE=$phpdbg"); - } else { - $phpdbg = null; - } - } } $environment['TEST_PHP_EXECUTABLE'] = $php; } @@ -184,6 +174,23 @@ if (getenv('TEST_PHP_CGI_EXECUTABLE')) { $environment['TEST_PHP_CGI_EXECUTABLE'] = $php_cgi; } +if (!getenv('TEST_PHPDBG_EXECUTABLE')) { + if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) . "/phpdbg.exe")) { + $phpdbg = realpath(dirname($php) . "/phpdbg.exe"); + } elseif (file_exists(dirname($php) . "/../../sapi/phpdbg/phpdbg")) { + $phpdbg = realpath(dirname($php) . "/../../sapi/phpdbg/phpdbg"); + } elseif (file_exists("./sapi/phpdbg/phpdbg")) { + $phpdbg = realpath("./sapi/phpdbg/phpdbg"); + } elseif (file_exists(dirname($php) . "/phpdbg")) { + $phpdbg = realpath(dirname($php) . "/phpdbg"); + } else { + $phpdbg = null; + } + if ($phpdbg) { + putenv("TEST_PHPDBG_EXECUTABLE=$phpdbg"); + } +} + if (getenv('TEST_PHPDBG_EXECUTABLE')) { $phpdbg = getenv('TEST_PHPDBG_EXECUTABLE'); @@ -1415,26 +1422,12 @@ TEST $file if (isset($phpdbg)) { $old_php = $php; $php = $phpdbg . ' -qIb'; - } else if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) . "/phpdbg.exe")) { - $old_php = $php; - $php = realpath(dirname($php) . "/phpdbg.exe") . ' -qIb '; } else { - if (file_exists(dirname($php) . "/../../sapi/phpdbg/phpdbg")) { - $old_php = $php; - $php = realpath(dirname($php) . "/../../sapi/phpdbg/phpdbg") . ' -qIb '; - } else if (file_exists("./sapi/phpdbg/phpdbg")) { - $old_php = $php; - $php = realpath("./sapi/phpdbg/phpdbg") .. ' -qIb '; - } else if (file_exists(dirname($php) . "/phpdbg")) { - $old_php = $php; - $php = realpath(dirname($php) . "/phpdbg") . ' -qIb '; - } else { - show_result('SKIP', $tested, $tested_file, "reason: phpdbg not available"); + show_result('SKIP', $tested, $tested_file, "reason: phpdbg not available"); - junit_init_suite(junit_get_suitename_for($shortname)); - junit_mark_test_as('SKIP', $shortname, $tested, 0, 'phpdbg not available'); - return 'SKIPPED'; - } + junit_init_suite(junit_get_suitename_for($shortname)); + junit_mark_test_as('SKIP', $shortname, $tested, 0, 'phpdbg not available'); + return 'SKIPPED'; } } diff --git a/sapi/phpdbg/tests/bug73615.phpt b/sapi/phpdbg/tests/bug73615.phpt index ade957e..e5fccef 100644 --- a/sapi/phpdbg/tests/bug73615.phpt +++ b/sapi/phpdbg/tests/bug73615.phpt @@ -2,7 +2,7 @@ Bug #73615 (phpdbg without option never load .phpdbginit at startup) --SKIPIF-- <?php -if (!getenv('TEST_PHPDBG_EXECUTABLE')) die("No TEST_PHPDBG_EXECUTABLE specified"); +if (!getenv('TEST_PHPDBG_EXECUTABLE')) die("SKIP: No TEST_PHPDBG_EXECUTABLE specified"); ?> --FILE-- <?php

« previous php.cvs (#96102) next »