Skip to content
Permalink
Browse files

Merged pull request #488

  • Loading branch information...
derickr committed Jul 11, 2019
2 parents 1c22ec0 + d411e74 commit 06653c309ddfb9734963b07b590e13650dcdabb5
@@ -45,7 +45,7 @@ setlocal enableextensions enabledelayedexpansion
mkdir c:\tests_tmp
set TEST_PHP_EXECUTABLE=%APPVEYOR_BUILD_FOLDER%\build\php.exe
set TEST_PHP_JUNIT=c:\tests_tmp\tests-junit.xml
set TEST_PHP_ARGS=-n -d -foo=1 -d zend_extension=%APPVEYOR_BUILD_FOLDER%\build\ext\php_opcache.dll -d zend_extension=%APPVEYOR_BUILD_FOLDER%\build\ext\php_xdebug.dll -dxdebug.remote_enable=1
set TEST_PHP_ARGS=-n -d -foo=yes -d zend_extension=%APPVEYOR_BUILD_FOLDER%\build\ext\php_opcache.dll -d zend_extension=%APPVEYOR_BUILD_FOLDER%\build\ext\php_xdebug.dll -dxdebug.remote_enable=1
rem set SKIP_DBGP_TESTS=1
set SKIP_IPV6_TESTS=1
set REPORT_EXIT_STATUS=1
@@ -27,7 +27,7 @@ jobs:
- run:
name: Setup extra env vars
command: |
echo 'export TEST_PHP_ARGS="-n -d foo=1 -d zend_extension=${CWD}/modules/xdebug.so"' >> $BASH_ENV
echo 'export TEST_PHP_ARGS="-n -d foo=yes -d zend_extension=${CWD}/modules/xdebug.so"' >> $BASH_ENV
- run-tests
environment:
REPORT_EXIT_STATUS: 1
@@ -41,7 +41,7 @@ jobs:
- run:
name: Setup extra env vars
command: |
echo 'export TEST_PHP_ARGS="-n -d foo=1 -d zend_extension=opcache.so -d opcache.enable=1 -d opcache.enable_cli=1 -d zend_extension=${CWD}/modules/xdebug.so"' >> $BASH_ENV
echo 'export TEST_PHP_ARGS="-n -d foo=yes -d zend_extension=opcache.so -d opcache.enable=1 -d opcache.enable_cli=1 -d zend_extension=${CWD}/modules/xdebug.so"' >> $BASH_ENV
- run-tests
environment:
REPORT_EXIT_STATUS: 1
@@ -55,7 +55,7 @@ jobs:
- run:
name: Setup extra env vars
command: |
echo 'export TEST_PHP_ARGS="-n -d foo=1 -d zend_extension=${CWD}/modules/xdebug.so"' >> $BASH_ENV
echo 'export TEST_PHP_ARGS="-n -d foo=yes -d zend_extension=${CWD}/modules/xdebug.so"' >> $BASH_ENV
- run-tests
environment:
REPORT_EXIT_STATUS: 1
@@ -69,7 +69,7 @@ jobs:
- run:
name: Setup extra env vars
command: |
echo 'export TEST_PHP_ARGS="-n -d foo=1 -d zend_extension=opcache.so -d opcache.enable=1 -d opcache.enable_cli=1 -d zend_extension=${CWD}/modules/xdebug.so"' >> $BASH_ENV
echo 'export TEST_PHP_ARGS="-n -d foo=yes -d zend_extension=opcache.so -d opcache.enable=1 -d opcache.enable_cli=1 -d zend_extension=${CWD}/modules/xdebug.so"' >> $BASH_ENV
- run-tests
environment:
REPORT_EXIT_STATUS: 1
@@ -83,7 +83,7 @@ jobs:
- run:
name: Setup extra env vars
command: |
echo 'export TEST_PHP_ARGS="-n -d foo=1 -d zend_extension=${CWD}/modules/xdebug.so"' >> $BASH_ENV
echo 'export TEST_PHP_ARGS="-n -d foo=yes -d zend_extension=${CWD}/modules/xdebug.so"' >> $BASH_ENV
- run-tests
environment:
REPORT_EXIT_STATUS: 1
@@ -97,7 +97,7 @@ jobs:
- run:
name: Setup extra env vars
command: |
echo 'export TEST_PHP_ARGS="-n -d foo=1 -d zend_extension=opcache.so -d opcache.enable=1 -d opcache.enable_cli=1 -d zend_extension=${CWD}/modules/xdebug.so"' >> $BASH_ENV
echo 'export TEST_PHP_ARGS="-n -d foo=yes -d zend_extension=opcache.so -d opcache.enable=1 -d opcache.enable_cli=1 -d zend_extension=${CWD}/modules/xdebug.so"' >> $BASH_ENV
- run-tests
environment:
REPORT_EXIT_STATUS: 1
@@ -35,12 +35,12 @@ script:
- sudo sh -c 'echo "\n::1 localhost\n" >> /etc/hosts'
- export TEST_PHP_EXECUTABLE=`make findphp`
- export PATH=`dirname $TEST_PHP_EXECUTABLE`:$PATH
- TEST_PHP_ARGS="-n -d foo=1"
- TEST_PHP_ARGS="-n -d foo=yes"
- if [[ "$USE_OPCACHE" == "1" ]]; then TEST_PHP_ARGS="$TEST_PHP_ARGS -d zend_extension=opcache.so -d opcache.enable=1 -d opcache.enable_cli=1"; fi
- export TEST_PHP_ARGS="$TEST_PHP_ARGS -d zend_extension=$PWD/modules/xdebug.so"
- export REPORT_EXIT_STATUS=1
- $TEST_PHP_EXECUTABLE $TEST_PHP_ARGS -v
- $TEST_PHP_EXECUTABLE -n run-tests.php -q -x --show-diff
- $TEST_PHP_EXECUTABLE -n run-xdebug-tests.php -q -x --show-diff

after_script:
- ./.travis.scripts/show-errors.sh
@@ -0,0 +1,51 @@
--TEST--
Test for tracing array assign ops
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=0
xdebug.collect_assignments=1
--FILE--
<?php
$tf = xdebug_start_trace(sys_get_temp_dir() . '/'. uniqid('xdt', TRUE));
$a['foo'][3]['test'] = 0;
$a['foo'][3]['test'] += 42;
$a['foo'][3]['test'] -= 2;
$a['foo'][3]['test'] *= 2;
$a['foo'][3]['test'] /= 5;
$a['foo'][3]['test'] %= 4;
$a['foo'][3]['test'] <<= 1;
$a['foo'][3]['test'] >>= 3;
$a['foo'][3]['test'] |= 0xffff;
$a['foo'][3]['test'] &= 0xff0f;
$a['foo'][3]['test'] ^= 0xf00f;
$a['foo'][3]['test'] **= 2;
xdebug_stop_trace();
echo file_get_contents($tf);
unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
=> $tf = '%s.xt' %sassignment-trace-dim-op.php:2
=> $a['foo'][3]['test'] = 0 %sassignment-trace-dim-op.php:4
=> $a['foo'][3]['test'] += 42 %sassignment-trace-dim-op.php:6
=> $a['foo'][3]['test'] -= 2 %sassignment-trace-dim-op.php:7
=> $a['foo'][3]['test'] *= 2 %sassignment-trace-dim-op.php:8
=> $a['foo'][3]['test'] /= 5 %sassignment-trace-dim-op.php:9
=> $a['foo'][3]['test'] %= 4 %sassignment-trace-dim-op.php:10
=> $a['foo'][3]['test'] <<= 1 %sassignment-trace-dim-op.php:11
=> $a['foo'][3]['test'] >>= 3 %sassignment-trace-dim-op.php:12
=> $a['foo'][3]['test'] |= 65535 %sassignment-trace-dim-op.php:13
=> $a['foo'][3]['test'] &= 65295 %sassignment-trace-dim-op.php:14
=> $a['foo'][3]['test'] ^= 61455 %sassignment-trace-dim-op.php:15
=> $a['foo'][3]['test'] **= 2 %sassignment-trace-dim-op.php:16
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace-dim-op.php:18
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
@@ -0,0 +1,52 @@
--TEST--
Test for tracing property assign ops [1]
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=0
xdebug.collect_assignments=1
--FILE--
<?php
$tf = xdebug_start_trace(sys_get_temp_dir() . '/'. uniqid('xdt', TRUE));
$a = new stdClass;
$a->test = 0;
$a->test += 42;
$a->test -= 2;
$a->test *= 2;
$a->test /= 5;
$a->test %= 4;
$a->test <<= 1;
$a->test >>= 3;
$a->test |= 0xffff;
$a->test &= 0xff0f;
$a->test ^= 0xf00f;
$a->test **= 2;
xdebug_stop_trace();
echo file_get_contents($tf);
unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
=> $tf = '%s.xt' %sassignment-trace-obj-op-001.php:2
=> $a = class stdClass { } %sassignment-trace-obj-op-001.php:4
=> $a->test = 0 %sassignment-trace-obj-op-001.php:5
=> $a->test += 42 %sassignment-trace-obj-op-001.php:6
=> $a->test -= 2 %sassignment-trace-obj-op-001.php:7
=> $a->test *= 2 %sassignment-trace-obj-op-001.php:8
=> $a->test /= 5 %sassignment-trace-obj-op-001.php:9
=> $a->test %= 4 %sassignment-trace-obj-op-001.php:10
=> $a->test <<= 1 %sassignment-trace-obj-op-001.php:11
=> $a->test >>= 3 %sassignment-trace-obj-op-001.php:12
=> $a->test |= 65535 %sassignment-trace-obj-op-001.php:13
=> $a->test &= 65295 %sassignment-trace-obj-op-001.php:14
=> $a->test ^= 61455 %sassignment-trace-obj-op-001.php:15
=> $a->test **= 2 %sassignment-trace-obj-op-001.php:16
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace-obj-op-001.php:18
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
@@ -0,0 +1,52 @@
--TEST--
Test for tracing property assign ops [2]
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=0
xdebug.collect_assignments=1
--FILE--
<?php
$tf = xdebug_start_trace(sys_get_temp_dir() . '/'. uniqid('xdt', TRUE));
$a = new stdClass;
$a->test = ['foo' => 0];
$a->test['foo'] += 42;
$a->test['foo'] -= 2;
$a->test['foo'] *= 2;
$a->test['foo'] /= 5;
$a->test['foo'] %= 4;
$a->test['foo'] <<= 1;
$a->test['foo'] >>= 3;
$a->test['foo'] |= 0xffff;
$a->test['foo'] &= 0xff0f;
$a->test['foo'] ^= 0xf00f;
$a->test['foo'] **= 2;
xdebug_stop_trace();
echo file_get_contents($tf);
unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
=> $tf = '%s.xt' %sassignment-trace-obj-op-002.php:2
=> $a = class stdClass { } %sassignment-trace-obj-op-002.php:4
=> $a->test = array ('foo' => 0) %sassignment-trace-obj-op-002.php:5
=> $a->test['foo'] += 42 %sassignment-trace-obj-op-002.php:6
=> $a->test['foo'] -= 2 %sassignment-trace-obj-op-002.php:7
=> $a->test['foo'] *= 2 %sassignment-trace-obj-op-002.php:8
=> $a->test['foo'] /= 5 %sassignment-trace-obj-op-002.php:9
=> $a->test['foo'] %= 4 %sassignment-trace-obj-op-002.php:10
=> $a->test['foo'] <<= 1 %sassignment-trace-obj-op-002.php:11
=> $a->test['foo'] >>= 3 %sassignment-trace-obj-op-002.php:12
=> $a->test['foo'] |= 65535 %sassignment-trace-obj-op-002.php:13
=> $a->test['foo'] &= 65295 %sassignment-trace-obj-op-002.php:14
=> $a->test['foo'] ^= 61455 %sassignment-trace-obj-op-002.php:15
=> $a->test['foo'] **= 2 %sassignment-trace-obj-op-002.php:16
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace-obj-op-002.php:18
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
@@ -0,0 +1,52 @@
--TEST--
Test for tracing property assign ops [3]
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=0
xdebug.collect_assignments=1
--FILE--
<?php
$tf = xdebug_start_trace(sys_get_temp_dir() . '/'. uniqid('xdt', TRUE));
$a = ['foo' => new stdClass];
$a['foo']->test = 0;
$a['foo']->test += 42;
$a['foo']->test -= 2;
$a['foo']->test *= 2;
$a['foo']->test /= 5;
$a['foo']->test %= 4;
$a['foo']->test <<= 1;
$a['foo']->test >>= 3;
$a['foo']->test |= 0xffff;
$a['foo']->test &= 0xff0f;
$a['foo']->test ^= 0xf00f;
$a['foo']->test **= 2;
xdebug_stop_trace();
echo file_get_contents($tf);
unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
=> $tf = '%s.xt' %sassignment-trace-obj-op-003.php:2
=> $a = array ('foo' => class stdClass { }) %sassignment-trace-obj-op-003.php:4
=> $a['foo']->test = 0 %sassignment-trace-obj-op-003.php:5
=> $a['foo']->test += 42 %sassignment-trace-obj-op-003.php:6
=> $a['foo']->test -= 2 %sassignment-trace-obj-op-003.php:7
=> $a['foo']->test *= 2 %sassignment-trace-obj-op-003.php:8
=> $a['foo']->test /= 5 %sassignment-trace-obj-op-003.php:9
=> $a['foo']->test %= 4 %sassignment-trace-obj-op-003.php:10
=> $a['foo']->test <<= 1 %sassignment-trace-obj-op-003.php:11
=> $a['foo']->test >>= 3 %sassignment-trace-obj-op-003.php:12
=> $a['foo']->test |= 65535 %sassignment-trace-obj-op-003.php:13
=> $a['foo']->test &= 65295 %sassignment-trace-obj-op-003.php:14
=> $a['foo']->test ^= 61455 %sassignment-trace-obj-op-003.php:15
=> $a['foo']->test **= 2 %sassignment-trace-obj-op-003.php:16
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace-obj-op-003.php:18
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
@@ -0,0 +1,51 @@
--TEST--
Test for tracing assign ops
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=0
xdebug.collect_assignments=1
--FILE--
<?php
$tf = xdebug_start_trace(sys_get_temp_dir() . '/'. uniqid('xdt', TRUE));
$a = 0;
$a += 42;
$a -= 2;
$a *= 2;
$a /= 5;
$a %= 4;
$a <<= 1;
$a >>= 3;
$a |= 0xffff;
$a &= 0xff0f;
$a ^= 0xf00f;
$a **= 2;
xdebug_stop_trace();
echo file_get_contents($tf);
unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
=> $tf = '%s.xt' %sassignment-trace-op.php:2
=> $a = 0 %sassignment-trace-op.php:4
=> $a += 42 %sassignment-trace-op.php:6
=> $a -= 2 %sassignment-trace-op.php:7
=> $a *= 2 %sassignment-trace-op.php:8
=> $a /= 5 %sassignment-trace-op.php:9
=> $a %= 4 %sassignment-trace-op.php:10
=> $a <<= 1 %sassignment-trace-op.php:11
=> $a >>= 3 %sassignment-trace-op.php:12
=> $a |= 65535 %sassignment-trace-op.php:13
=> $a &= 65295 %sassignment-trace-op.php:14
=> $a ^= 61455 %sassignment-trace-op.php:15
=> $a **= 2 %sassignment-trace-op.php:16
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace-op.php:18
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
@@ -0,0 +1,56 @@
--TEST--
Test for tracing $static-prop property assign ops [1]
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=0
xdebug.collect_assignments=1
--FILE--
<?php
$tf = xdebug_start_trace(sys_get_temp_dir() . '/'. uniqid('xdt', TRUE));
$a = new test;
class test { static $test; function assign() {
self::$test = 0;
self::$test += 42;
self::$test -= 2;
self::$test *= 2;
self::$test /= 5;
self::$test %= 4;
self::$test <<= 1;
self::$test >>= 3;
self::$test |= 0xffff;
self::$test &= 0xff0f;
self::$test ^= 0xf00f;
self::$test **= 2;
} }
$a->assign();
xdebug_stop_trace();
echo file_get_contents($tf);
unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
=> $tf = '%s.xt' %sassignment-trace-static-prop-op-001.php:2
=> $a = class test { } %sassignment-trace-static-prop-op-001.php:3
%w%f %w%d -> test->assign() %sassignment-trace-static-prop-op-001.php:19
=> self::test = 0 %sassignment-trace-static-prop-op-001.php:5
=> self::test += 42 %sassignment-trace-static-prop-op-001.php:6
=> self::test -= 2 %sassignment-trace-static-prop-op-001.php:7
=> self::test *= 2 %sassignment-trace-static-prop-op-001.php:8
=> self::test /= 5 %sassignment-trace-static-prop-op-001.php:9
=> self::test %= 4 %sassignment-trace-static-prop-op-001.php:10
=> self::test <<= 1 %sassignment-trace-static-prop-op-001.php:11
=> self::test >>= 3 %sassignment-trace-static-prop-op-001.php:12
=> self::test |= 65535 %sassignment-trace-static-prop-op-001.php:13
=> self::test &= 65295 %sassignment-trace-static-prop-op-001.php:14
=> self::test ^= 61455 %sassignment-trace-static-prop-op-001.php:15
=> self::test **= 2 %sassignment-trace-static-prop-op-001.php:16
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace-static-prop-op-001.php:21
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]

0 comments on commit 06653c3

Please sign in to comment.
You can’t perform that action at this time.