The public release is broken (when running the unit-tests.) The tarball for MW includes
the hook calls for unit-testing, but not the unit-test PHP files. WHERE DID THEY GO?
They are ignored [1]. It seems that the release-cutting scripts do not include the
unit-testing code, which I view as a mistake. Pretty much all open-source software these
days ships with its unit-tests. It is unreasonable to me that Mediawiki, which is by far
the best PHP webapp I have ever worked with, does not include its tests. Why?
I have submitted a ticket [2] and a patch [3] for this problem.
--Daniel (User:DanielRenfro)
[1.]
https://gerrit.wikimedia.org/r/#/c/123220/
[2.]
https://phabricator.wikimedia.org/T91426
[3.]
https://gerrit.wikimedia.org/r/#/c/194157/
-----Original Message-----
From: mediawiki-l-bounces(a)lists.wikimedia.org
[mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Jim Hu
Sent: Tuesday, December 02, 2014 11:00 AM
To: MediaWiki announcements and site admin list
Subject: Re: [MediaWiki-l] Missing tests/ directory in 1.23.1-5
I can't think of any end user that would need or
want to run their own
unit testing and that wouldn't benefit from using the git master or
branch instead. As for your broken file paths, I can't think why that
would happen except you are running the tests which leads me to ask...
why? If you are using the tarball, are you not running a production install?
I am running both production and development wikis from the tarball. I want the testing
suite because I have custom extensions that unit test. I think that's Daniel'
Renfro's situation as well. In my case, I'm not contributing code back to core,
since I'm not a good enough programmer to provide anything useful; anything I could
contribute would not rise above a bugzilla report.
For developing my own extensions I've tried to follow the unit testing recommendations
at
https://www.mediawiki.org/wiki/Manual:PHP_unit_testing
and
https://www.mediawiki.org/wiki/Manual:PHP_unit_testing/Writing_unit_tests_f…
which should be updated if there is now a change in whether test directories are going to
be included or omitted.
Insofar as I am still a relative newbie to git, cloning the REL1_23 branch was not
straightforward to me, but fortunately I found someone around here who could help me do
it. I still haven't figured out how to view the branch in gerrit. So I followed the
suggestion of copying the tests directory from a git clone, added an extension.suite.xml
and discovered that the release script's omission of tests also omitted the tests for
ParserFunctions. So I commented out the registration of that test set from the
extension.
Now that I have had help I can to all of that, although I may still have to figure out how
to modify how I handle extensions and skins that are in my local git repo to work with the
clone from mediawiki. My prior practice of just doing testing on my local dev copy from
the tarball may be suboptimal in theory, but in practice it's a PITA for me to not
have the tests included in the download. Daniel Renfro appears to agree (and while he
used to work for me, he's been at VistaPrint long enough to have unlearned most of the
bad habits I taught him).
So what's the harm in just including the tests?
Jim
On Dec 2, 2014, at 5:45 AM, Lewis Cawte <lewiscawte(a)googlemail.com> wrote:
I'd see Antoine's point above mine.
Oh, and yeah, patches need to start ignoring the tests directory as
well now release team :)
On 23 October 2014 at 18:50, Daniel Renfro <drenfro(a)vistaprint.com> wrote:
I think not including the tests/ directory is
wrong. Not only is the
release incomplete, it is inconsistent -- there is code that breaks
when run (references to files that do not exist.) In my opinion, a
robust open source software package such as MediaWiki should be proud
to ship its unit-tests. The 4MB of tests don't significantly
contribute to the size of the release (some 80MB+.)
Now, to reconstruct the tests, not only do I have to go dig up the
release branch, but REL1_23 doesn't contain the standard extensions
(or their
tests.) Now I have manually hunt down each extension and copy, find
the appropriate branch, and copy it's tests/ directory over. All just
to run the normal test-suite.
--Daniel
-----Original Message-----
From: mediawiki-l-bounces(a)lists.wikimedia.org [mailto:
mediawiki-l-bounces(a)lists.wikimedia.org] On Behalf Of Gordon Joly
Sent: Thursday, October 23, 2014 7:32 AM
To: mediawiki-l(a)lists.wikimedia.org
Subject: Re: [MediaWiki-l] Missing tests/ directory in 1.23.1-5
This needs to cross referenced to recent patches, perhaps?
In particular patches to create 1.23.2 and 1.23.3?
mediawiki-1.23.2/tests/phpunit/includes/GlobalFunctions/wfShellExecTe
st.php
mediawiki-1.23.3/tests/phpunit/includes/GlobalFunctions/wfShellExecTe
st.php
Gordo
*******************************
x1:~/src# grep -i tests *patch
mediawiki-1.23.3.patch:diff -Nruw -x messages -x '*.png' -x '*.jpg'
-x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x
'*.zip' -x '*.xmp' -x '.git*'
mediawiki-1.23.2/tests/phpunit/includes/GlobalFunctions/wfShellExecTe
st.php
mediawiki-1.23.3/tests/phpunit/includes/GlobalFunctions/wfShellExecTe
st.php
mediawiki-1.23.3.patch:---
mediawiki-1.23.2/tests/phpunit/includes/GlobalFunctions/wfShellExecTe
st.php
1970-01-01 00:00:00.000000000 +0000
mediawiki-1.23.3.patch:+++
mediawiki-1.23.3/tests/phpunit/includes/GlobalFunctions/wfShellExecTe
st.php
2014-08-27 21:44:53.242493016 +0000
mediawiki-1.23.4.patch:+ checks for attributes that contain css; add
unit tests for html5sec and mediawiki-1.23.4.patch:diff -Nruw -x
messages -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x
'*.svg' -x '*.tiff' -x '*.zip'
-x '*.xmp' -x '.git*'
mediawiki-1.23.3/tests/phpunit/includes/upload/UploadBaseTest.php
mediawiki-1.23.4/tests/phpunit/includes/upload/UploadBaseTest.php
mediawiki-1.23.4.patch:---
mediawiki-1.23.3/tests/phpunit/includes/upload/UploadBaseTest.php
2014-09-24 19:58:10.961599096 +0000
mediawiki-1.23.4.patch:+++
mediawiki-1.23.4/tests/phpunit/includes/upload/UploadBaseTest.php
2014-09-24 19:55:15.538575503 +0000
x1:~/src#
On 22/10/14 21:54, Antoine Musso wrote:
Le 22/10/2014 20:06, Daniel Renfro a écrit :
> While looking into upgrading my 1.22.5 installation to 1.23.5, I
noticed that the tests/ directory was missing. Looking in git it is
there for the REL1_23, but seems to have vanished in the tarballs for releases?
Am I missing something? or are these releases incomplete?
Sincerely confused,
-Daniel (Us+er:AlephNull)
Hello Daniel,
Indeed the release script used to build the tarball learned to
ignore some files with
https://gerrit.wikimedia.org/r/#/c/123220/
Here is the ignore list:
tar:
ignore:
- "*~"
- ".js*"
- ".git*"
- testsuite
- tests
- "*.xcf"
- "#*#"
- ".#*"
- .travis.yml
It is in:
mediawiki/tools/release.git
make-release/make-release.yaml
I guess because the tests takes a good chunk of space and people
interesting in running them most probably use a Wiki from the
release branches.
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
=====================================
Jim Hu
Professor
Dept. of Biochemistry and Biophysics
2128 TAMU
Texas A&M Univ.
College Station, TX 77843-2128
979-862-4054
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
________________________________
My email address has changed to drenfro(a)cimpress.com. Please update your address book.
Cimpress is the new name for Vistaprint NV, the world’s leader in mass customization. Read
more about Cimpress at
www.cimpress.com.
________________________________