Commit Graph

528 Commits

Author SHA1 Message Date
Sara Golemon
5a2a92f128
Consolidate Valgrind logic into a single var and class 2017-08-23 14:44:36 -04:00
Sara Golemon
121a761174
constify some vars that are never changed once set 2017-08-23 14:08:53 -04:00
John Boehr
59558ffd96 Fix issues with phpt and EXTENSION on windows (BUG 75042)
* Commands are not properly escaped for windows
* Specifying "-n" to check loaded modules causes "Module already loaded"
warning
* Extensions to be loaded need the "php_" prefix on Windows

Bug: https://bugs.php.net/bug.php?id=75042

Add back -n flag to fetch loaded extensions in run-tests.php

Add test for phpt EXTENSIONS directive

Add a second test for bug 75042

Add test to test loading of nonexistent shared module

with the EXTENSIONS phpt block

Pass ini settings when checking loaded extensions
2017-08-18 17:34:48 +02:00
Anatol Belski
8a287c0ea0 Upgrade bundled PCRE to 8.41
HEADSUP! With PCRE 8.39 the JIT related code was changed in the way,
that additional valgrind options became almost unavoidable. Valgrind
had it already sometimes hard with JIT, now there are seem to be more
cases requiring special valgrind options.

For this reason, the new configure option --with-pcre-valgrind was
introduced. The option is development/debugging only and turns on the
Valgrind related pieces in PCRE, so then false positives are avoided
to the big part. In addition, run-tests.php was added a new valgrind
option, when the leak check is enabled and the test filepath contains
pcre.

Thus, to debug the code related to PCRE with JIT enabled, two things
would likely make sense

  - configure --with-pcre-valgrind
  - valgrind option --smc-check=all if run-tests.php is not used

The checks so far reveal no new issues.
2017-07-11 17:01:59 +02:00
Dmitry Stogov
c7a75b7112 Fixed few test failures if php.ini contains zend.assertions=-1 2017-06-21 18:50:08 +03:00
Anatol Belski
041652bd41 restore rev f9215b6519 2017-05-15 17:54:08 +02:00
Anatol Belski
b273fda825 restore rev 431e22fb4d 2017-05-15 17:43:48 +02:00
Matt Ficken
ad67218954 fixing run-tests.php for variables_order="GPCS" 2017-05-15 02:19:05 -07:00
Sara Golemon
431e22fb4d
Add support for run-tests.php to output all test results
./run-tests.php -W outfile.txt

PASS foo/bar.phpt
FAIL baz/qux.phpt
2017-05-08 05:49:56 +01:00
Nikita Popov
f9215b6519 Support showing slow tests in run-tests.php 2017-05-01 12:25:03 +02:00
Nikita Popov
852c4a872f Merge branch 'PHP-7.1' 2017-02-12 00:20:15 +01:00
Nikita Popov
479d7c3f4d Merge branch 'PHP-7.0' into PHP-7.1 2017-02-12 00:20:06 +01:00
Nikita Popov
981c58705a run-tests: Exit 1 on BORKED tests 2017-02-12 00:19:36 +01:00
Nikita Popov
06a0340162 Deprecate each() 2017-02-03 21:02:52 +01:00
Nikita Popov
c61daf415d Deprecate track_errors / $php_errormsg 2017-02-03 21:02:52 +01:00
Joe Watkins
3abb5a35f6
Merge branch 'PHP-7.1'
* PHP-7.1:
  removed additional ";" from run-tests.php
2017-01-31 05:36:28 +00:00
Joe Watkins
390134e6c5
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  removed additional ";" from run-tests.php
2017-01-31 05:36:16 +00:00
Rodrigo Prado
543141ae3b
removed additional ";" from run-tests.php 2017-01-31 05:35:58 +00:00
Anatol Belski
e9f978a272 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix test
  Fix test runs with Opcache enabled PHP on top
2017-01-13 14:46:44 +01:00
Anatol Belski
527bf4d8e6 Fix test runs with Opcache enabled PHP on top
Writing to the same file, while it's cached, is an issue.
2017-01-13 14:37:37 +01:00
Nikita Popov
ce90742ad5 Merge branch 'PHP-7.1' 2017-01-10 23:32:46 +01:00
Nikita Popov
5cee9dfe9a Add support for "xfail" to phpt SKIPIF sections
If SKIPIF output starts with "xfail" instead of "skip", the test
will be marked as XFAIL with the following message. Example:

    --TEST--
    Test xfailif feature
    --SKIPIF--
    <?php
    if (some_cond()) die('xfail Expected to fail!');
    ?>
    --FILE--
    ...
2017-01-10 23:32:03 +01:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Bob Weinand
c406d1e9b5 Merge branch 'PHP-7.1' 2016-11-30 11:45:36 +01:00
Bob Weinand
e37412e19c Merge branch 'PHP-7.0' into PHP-7.1 2016-11-30 11:45:18 +01:00
Bob Weinand
344ef050aa Fix run-tests.php to always include TEST_PHPDBG_EXECUTABLE if phpdbg available 2016-11-30 11:44:10 +01:00
Matteo Beccati
02a1469810 Merge branch 'PHP-7.1'
* PHP-7.1:
  Added missing array key to $JUNIT
2016-11-27 10:08:23 +01:00
Matteo Beccati
8101024ad4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Added missing array key to $JUNIT
2016-11-27 10:08:14 +01:00
Matteo Beccati
f9b158df07 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Added missing array key to $JUNIT
2016-11-27 10:08:04 +01:00
Matteo Beccati
28cf42568b Added missing array key to $JUNIT 2016-11-27 10:07:05 +01:00
Craig Duncan
b476d21962 Fix run-tests.php counting an uncountable 2016-11-17 09:33:04 +00:00
Michele Locati
33301d5bae Add VT100 support for Windows
Fix function names prefix

Use Unicode version of GetFinalPathNameByHandle

Use EG(windows_version_info) instead of RtlGetVersion

Use the specified handle_id instead of STD_OUTPUT_HANDLE

Switch from stream name to stream resource

Allow running tests capturing only stdout and/or stderr

Add tests for stream_vt100_support function

Export Win32 console functions

Fix x64 build

Use zend_long instead of long long, use GetConsole instead of GetFinalPathNameByHandleW to check if a handle is a valid console stream

Always use zend_long on any platform

Use _get_osfhandle to determine the standard handle

Accept stream names

Raise warnings in case of invalid stream parameter

Return true if disabling VT100 support on a not-console/redirected stream or on old Windows versions

Remove php_win32_console_os_supports_vt100

Differentiate stdin vs stdout/stderr

Simplify setting flag

Allow avoid piping STDIN

Let stream_vt100_support accept only resources

Fix run-tests

Revert console flags in case of failure

Simplify logic of stream_vt100_support when setting the flag

Return true if succeeded, false otherwise

Drop support for STDIN

More comprehensive tests for stream_vt100_support

Remove old tests

Fix name of included file and use absolute paths

Enable ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows by default

Remove tests for stream_vt100_support

Split stream_vt100_support into stream_isatty+sapi_windows_vt100_support

Add tests for stream_isatty

Add tests for sapi_windows_vt100_support

Return null from stream_isatty is neither Windows nor Posix

Fallback to S_ISCHR if neither Windows nor Posix

Avoid defining argc since it's only used once

Better comment about php_win32_console_fileno_is_console

Use events instead of cNumberOfEvents

Do not restore previous console mode

We need to restore previous console mode on failing SetConsole calls only for STDIN

Don't configure STDOUT/STDERR on Windows with PHP_CLI_WIN32_NO_CONSOLE
2016-10-28 19:23:00 +02:00
Bob Weinand
11e7447e04 Merge branch 'PHP-7.0' into PHP-7.1
(cherry picked from commit 37ae5f3931)
2016-10-14 01:48:03 +02:00
Bob Weinand
37ae5f3931 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-12 20:19:10 +02:00
Bob Weinand
5aae01104f Add stdin command and -s command line parameter to phpdbg
This allows reading the initial script file from stdin instead of being forced to put the script into a file in order to run it with phpdbg.
Especially important for programmatic execution of phpdbg.

Also adding tests/include_once.phpt and tests/set_exception_handler.phpt as I seem to have forgotten to git add them sometime long ago...
2016-10-12 20:15:49 +02:00
Stanislav Malyshev
9470cdd4c3 Merge branch 'pull-request/1864'
* pull-request/1864:
  Tiny tweak for `$header` initialization, it should always be an array
  Minor tweaks
2016-09-05 00:51:01 -07:00
Dmitry Stogov
0cc8ff2b41 Run ext/opcache/tests/*.phpt by default 2016-08-23 11:51:08 +03:00
Bob Weinand
ef6d0c8b6d Fix phpdbg ZTS watchpoint+shutdown sequences & opcache+watchpoints 2016-07-12 20:50:51 +02:00
Nazar Mokrynskyi
ddf1c0891b Tiny tweak for $header initialization, it should always be an array 2016-06-22 22:01:34 +03:00
Derick Rethans
1c49a9fa71 Merge branch 'PHP-7.0' 2016-05-10 15:40:09 -04:00
Derick Rethans
c35bd4861d Allow for special case for the opcache zend extension 2016-05-10 15:40:03 -04:00
Eriko Torralba
e26dabd8ee Update run-tests.php
code style; lack of whitespace
2016-04-21 17:38:36 +08:00
Nazar Mokrynskyi
d69fd5d41a Minor tweaks
Few unused variables removed.
One ambiguous situation resolved.
`join(...)` > `implode(...)`.
One case of 2 `isset()` statements combined together.
2016-04-15 10:14:47 +03:00
Julien Pauli
736b91c650 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)

Conflicts:
	ext/json/php_json_encoder.h
	sapi/continuity/capi.c
2016-01-04 18:13:38 +01:00
Lior Kaplan
53fb2f1e5c Happy new year (Update copyright to 2016) 2016-01-03 01:44:37 +02:00
Lior Kaplan
71c1980025 Happy new year (Update copyright to 2016) 2016-01-01 20:06:12 +02:00
Anatol Belski
1bd0847f16 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fix bug #70781 (Extension tests fail on dynamic ext dependency)
2015-12-09 11:09:55 +01:00
Francois Laupretre
25abf2f028 Fix bug #70781 (Extension tests fail on dynamic ext dependency) 2015-12-09 11:05:34 +01:00