diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-06-05 20:54:50 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-06-05 20:54:50 +0400 |
commit | 717839735f92489227144fc6ae9ef1b4f637816a (patch) | |
tree | 30204a7ce866032cfc7928d16d1e21c7e12aca47 /sapi/phpdbg/tests | |
parent | 1b8916886b5b3b88ebe016ea311951b21db93ddd (diff) | |
parent | e16097626a7e86e0baa9fa7d17477b6ffc13c706 (diff) | |
download | php-git-717839735f92489227144fc6ae9ef1b4f637816a.tar.gz |
Merge branch 'master' into phpng
* master: (29 commits)
drop exec perm on doc files
fix test for 5.4/5.5
restore correct behavior of DateTime
fix test use invalid code
add test for previous fix
NEWS
NEWS
NEWS
Fix regression introduce in fix for bug #67118
update news
update NEWS
Fix tests
Fix possible segfault depending on memory location...
Fixed startup segfault in non-debug builds Fixes issue #87
PHP 5.4/5.5 compability in phpdbg_watch.c
fix gcov data with some locales (again)
fix gcov data with some locales (again)
fix gcov data with some locales (again)
Update NEWS
Fixed startup segfault in non-debug builds Fixes issue #87
...
Diffstat (limited to 'sapi/phpdbg/tests')
-rw-r--r-- | sapi/phpdbg/tests/commands/0002_set.test | 2 | ||||
-rw-r--r-- | sapi/phpdbg/tests/commands/0103_register.test | 10 | ||||
-rw-r--r-- | sapi/phpdbg/tests/commands/0106_compile.test | 1 | ||||
-rw-r--r-- | sapi/phpdbg/tests/run-tests.php | 28 |
4 files changed, 25 insertions, 16 deletions
diff --git a/sapi/phpdbg/tests/commands/0002_set.test b/sapi/phpdbg/tests/commands/0002_set.test index 7720f94fff..468ac6d9ea 100644 --- a/sapi/phpdbg/tests/commands/0002_set.test +++ b/sapi/phpdbg/tests/commands/0002_set.test @@ -9,7 +9,6 @@ # setting notice color # Failed to find breakpoint #0 # oplog disabled -# not enabled # opened oplog test.log # nothing ################################################# @@ -19,5 +18,4 @@ set color notice none set prompt promot> set break 0 set oplog -set oplog 0 set oplog test.log diff --git a/sapi/phpdbg/tests/commands/0103_register.test b/sapi/phpdbg/tests/commands/0103_register.test index 38841591ca..703a12f771 100644 --- a/sapi/phpdbg/tests/commands/0103_register.test +++ b/sapi/phpdbg/tests/commands/0103_register.test @@ -7,15 +7,15 @@ #[Registered test_function] #array(5) { # [0]=> -# string(1) "1" +# int(1) # [1]=> -# string(1) "2" +# int(2) # [2]=> -# string(1) "3" +# int(3) # [3]=> -# string(1) "4" +# int(4) # [4]=> -# string(1) "5" +# int(5) #} ################################################# <: diff --git a/sapi/phpdbg/tests/commands/0106_compile.test b/sapi/phpdbg/tests/commands/0106_compile.test index d79211ddf7..7193600ea3 100644 --- a/sapi/phpdbg/tests/commands/0106_compile.test +++ b/sapi/phpdbg/tests/commands/0106_compile.test @@ -14,6 +14,5 @@ define('OUT', file_put_contents(OUT, "<?php echo \"Hello World\"; ?>"); phpdbg_exec(OUT); :> -compile run quit diff --git a/sapi/phpdbg/tests/run-tests.php b/sapi/phpdbg/tests/run-tests.php index 1fb6fa1224..47a998ccae 100644 --- a/sapi/phpdbg/tests/run-tests.php +++ b/sapi/phpdbg/tests/run-tests.php @@ -284,6 +284,8 @@ namespace phpdbg\testing { $test->purpose, $result ? "PASS" : "FAIL", PHP_EOL); + + return $result; } protected $config; @@ -426,7 +428,7 @@ namespace phpdbg\testing { */ public function getResult() { $options = sprintf( - '-i%s -qb', $this->file); + '-i%s -nqb', $this->file); if ($this->options) { $options = sprintf( @@ -492,13 +494,18 @@ namespace phpdbg\testing { * */ protected function writeDiff() { - $diff = sprintf( - '%s/%s.diff', - dirname($this->file), basename($this->file)); - if (count($this->diff['wants'])) { - if (!in_array('nodiff', $this->config['flags'])) { - if (($diff = fopen($diff, 'w+'))) { + if (!$this->config->hasFlag('nodiff')) { + if ($this->config->hasFlag('diff2stdout')) { + $difffile = "php://stdout"; + file_put_contents($difffile, "====DIFF====\n"); + } else { + $difffile = sprintf( + '%s/%s.diff', + dirname($this->file), basename($this->file)); + } + + if (($diff = fopen($difffile, 'w+'))) { foreach ($this->diff['wants'] as $line => $want) { $got = $this->diff['gets'][$line]; @@ -552,6 +559,9 @@ namespace { $cwd = dirname(__FILE__); $cmd = $_SERVER['argv']; + + $retval = 0; + { $config = new TestsConfiguration(array( 'exec' => realpath(array_shift($cmd)), @@ -571,7 +581,7 @@ namespace { $tests->logPath($path); foreach ($tests->findTests($path) as $test) { - $tests->logTest($path, $test); + $retval |= !$tests->logTest($path, $test); } $tests->logPathStats($path); @@ -579,5 +589,7 @@ namespace { $tests->logStats(); } + + die($retval); } ?> |