<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/php-git.git/tests/run-test, branch master</title>
<subtitle>git.php.net: repository/php-src.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/php-git.git/'/>
<entry>
<title>run-tests: use the EXTENSIONS section for skipping</title>
<updated>2021-03-22T08:53:38+00:00</updated>
<author>
<name>Max Semenik</name>
<email>maxsem.wiki@gmail.com</email>
</author>
<published>2021-03-18T11:53:14+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/php-git.git/commit/?id=6c9a05667b72c6420eb21269ffaffbd93178923c'/>
<id>6c9a05667b72c6420eb21269ffaffbd93178923c</id>
<content type='text'>
Currently, most skip checks are just for making sure an extension is
available. Even with recent addition of skip caching, this makes tests
needlessly slow:
* Checks for the same extension in its tests can have small differences
  impacting cacheability.
* Even identical skip checks in two tests can still be executed twice if
  they're run by different workers.

To remedy this, I'm repurposing the existing --EXTENSIONS-- section of
.phpt files to specify wjich extensions are required for current test to
run. Current behavior:
1) If the extension is already visible to PHP, all is good
2) If it isn't, assume it's present as a shared module and attempt to add
   it via a command line parameter
3) If that works, all is good
4) If it doesn't, PHP fails with a cryptic error message trying to
   execute the test itself

After this commit:
1) and 2) are kept unchanged
3) Check if shared extension file from 2) is actually present
4) Skip the test if it isn't

Other benefits include clear skip reasons (vs. sometimes none in many
current skip checks) and moving test information from code to metadata,
opening more opportunities for search and analysis.

Since --EXTENSIONS-- is barely ever used, this change poses no risk of
hidden failures.

As a demonstration of the new approach, this commit migrates one
extension to it. If merged, I will migrate other extensions in
subsequent PRs.

Closes GH-6787.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, most skip checks are just for making sure an extension is
available. Even with recent addition of skip caching, this makes tests
needlessly slow:
* Checks for the same extension in its tests can have small differences
  impacting cacheability.
* Even identical skip checks in two tests can still be executed twice if
  they're run by different workers.

To remedy this, I'm repurposing the existing --EXTENSIONS-- section of
.phpt files to specify wjich extensions are required for current test to
run. Current behavior:
1) If the extension is already visible to PHP, all is good
2) If it isn't, assume it's present as a shared module and attempt to add
   it via a command line parameter
3) If that works, all is good
4) If it doesn't, PHP fails with a cryptic error message trying to
   execute the test itself

After this commit:
1) and 2) are kept unchanged
3) Check if shared extension file from 2) is actually present
4) Skip the test if it isn't

Other benefits include clear skip reasons (vs. sometimes none in many
current skip checks) and moving test information from code to metadata,
opening more opportunities for search and analysis.

Since --EXTENSIONS-- is barely ever used, this change poses no risk of
hidden failures.

As a demonstration of the new approach, this commit migrates one
extension to it. If merged, I will migrate other extensions in
subsequent PRs.

Closes GH-6787.
</pre>
</div>
</content>
</entry>
<entry>
<title>Run tidy</title>
<updated>2020-09-18T12:28:32+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-09-18T12:28:32+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/php-git.git/commit/?id=c5401854fcea27ff9aabfd0682ff4d81bbb3c888'/>
<id>c5401854fcea27ff9aabfd0682ff4d81bbb3c888</id>
<content type='text'>
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add many missing closing PHP tags to tests</title>
<updated>2020-08-09T20:03:36+00:00</updated>
<author>
<name>Máté Kocsis</name>
<email>kocsismate@woohoolabs.com</email>
</author>
<published>2020-08-09T09:06:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/php-git.git/commit/?id=7aacc705d03887c64a90489e367f4c40b46aa3c2'/>
<id>7aacc705d03887c64a90489e367f4c40b46aa3c2</id>
<content type='text'>
Closes GH-5958
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes GH-5958
</pre>
</div>
</content>
</entry>
<entry>
<title>Only force log startup errors if display_startup_errors disabled</title>
<updated>2020-08-05T16:17:00+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-08-05T10:57:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/php-git.git/commit/?id=52047addc79b067d302c4fb23e235b0e530f9a70'/>
<id>52047addc79b067d302c4fb23e235b0e530f9a70</id>
<content type='text'>
Otherwise this results in duplicate errors.

Closes GH-5941.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise this results in duplicate errors.

Closes GH-5941.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove track_errors and $php_errormsg</title>
<updated>2019-01-28T14:58:23+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2019-01-28T11:54:46+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/php-git.git/commit/?id=920b4b249f71e6cbfd795f81c6a08126a33c659e'/>
<id>920b4b249f71e6cbfd795f81c6a08126a33c659e</id>
<content type='text'>
This has been deprecated in PHP 7.2 as part of
https://wiki.php.net/rfc/deprecations_php_7_2.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This has been deprecated in PHP 7.2 as part of
https://wiki.php.net/rfc/deprecations_php_7_2.
</pre>
</div>
</content>
</entry>
<entry>
<title>This test needs to log to stdout</title>
<updated>2018-10-31T17:43:45+00:00</updated>
<author>
<name>Rasmus Lerdorf</name>
<email>rasmus@lerdorf.com</email>
</author>
<published>2018-10-31T17:43:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/php-git.git/commit/?id=1954c7e1c6167db863096dcab0bf08cf1a6a5184'/>
<id>1954c7e1c6167db863096dcab0bf08cf1a6a5184</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Sync leading and final newlines in *.phpt sections</title>
<updated>2018-10-15T02:32:30+00:00</updated>
<author>
<name>Peter Kokot</name>
<email>peterkokot@gmail.com</email>
</author>
<published>2018-10-15T02:32:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/php-git.git/commit/?id=b746e6988743b46ccb0542d5d568eef0608ee296'/>
<id>b746e6988743b46ccb0542d5d568eef0608ee296</id>
<content type='text'>
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' &lt;newline&gt;'
characters plus a terminating '&lt;newline&gt;' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' &lt;newline&gt;'
characters plus a terminating '&lt;newline&gt;' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
</pre>
</div>
</content>
</entry>
<entry>
<title>Trim trailing whitespace in *.phpt</title>
<updated>2018-10-14T17:45:12+00:00</updated>
<author>
<name>Peter Kokot</name>
<email>peterkokot@gmail.com</email>
</author>
<published>2018-10-14T15:45:48+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/php-git.git/commit/?id=782352c54ad69c517e3c32b0dd2c25d74842647a'/>
<id>782352c54ad69c517e3c32b0dd2c25d74842647a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use EXPECT instead of EXPECTF when possible</title>
<updated>2018-02-20T20:53:48+00:00</updated>
<author>
<name>Gabriel Caruso</name>
<email>carusogabriel34@gmail.com</email>
</author>
<published>2018-02-19T08:59:41+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/php-git.git/commit/?id=ded3d984c6133b1f508ed84e96df3316e207c99b'/>
<id>ded3d984c6133b1f508ed84e96df3316e207c99b</id>
<content type='text'>
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove superfluous SKIPIF sections in tests</title>
<updated>2018-02-03T16:50:51+00:00</updated>
<author>
<name>Gabriel Caruso</name>
<email>carusogabriel34@gmail.com</email>
</author>
<published>2018-02-03T13:47:35+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/php-git.git/commit/?id=36d8bf52944a149c7f6b9dd307b143a8a30d05d3'/>
<id>36d8bf52944a149c7f6b9dd307b143a8a30d05d3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
