Commit graph

82 commits

Author SHA1 Message Date
Brion Vibber
19c69ba7ce * Parser test supports uploading results to remote CodeReview instance
Now I just have to finish the CodeReview extension side of it... ;)
2009-07-30 22:24:04 +00:00
Brion Vibber
5e57735622 * (bug 19957) All known-failing tests now marked disabled; added --run-disabled option to parser test suite to run disabled tests if desired.
Based on Dan Nessett's patch set.
I put back one of the test cases which does, in fact, work at least on my config. :)
2009-07-29 01:10:09 +00:00
Aryeh Gregor
fd8ed0ba5c Add --setversion option to parserTests
This overrides the version string stored in the database with --record.
When using git-svn, you can do

    php maintenance/parserTests.php --quick --quiet --record \
	--setversion=`git rev-parse HEAD`

to have comprehensible version info stored for the purposes of later
bisection.  Previously just "1.16alpha" would be stored, which is
useless for tracking down the old revision -- you'd have to try guessing
based on date.

It might be useful for SpecialVersion::getVersion() to support git-svn,
but that's a more complicated and intrusive change for an admittedly
small minority, so I avoided it for now.
2009-05-15 19:23:00 +00:00
Aryeh Gregor
960889ec74 Make parserTests.php more git bisect-friendly
Now the following commands can track down parser test regressions (if
you're using git svn, of course):

  git bisect start bad-rev good-rev
  git bisect run maintenance/parserTests.php --regex 'Test name'

Just type those in (replacing "bad-rev" and "good-rev" with revision
ids, and 'Test name' with a regex that uniquely matches the regressing
test's name), and git will magically find the first bad revision for you
in a couple of minutes.  (Then run git bisect reset to get back to
normal.)

All I changed to make this possible was changing the error return code
from 255 (-1) to 1.  git bisect treats 1-124 and 126-127 as error codes,
but for some reason doesn't like 128-255.
2009-02-05 23:41:00 +00:00
Tim Starling
350b498b9f * Revert back to my parser pseudo-branch again. Note: if you feel like reverting this, reverting Parser.php alone to r40010 will work just fine.
* Merged replaceFreeExternalLinks() with doMagicLinks(). Makes a lot of sense, very similar operations, doesn't break any parser tests. Stops free links from interacting with other parser stages, the same way ISBN links don't. 
* The pass order change fixes Brion's complaint in r39980. Early link expansion, triggered by having more than 1000 links in the page, was outputting URLs which were destroyed by RFEL. Added parser test.
* Fixed an unrelated bug in LinkHolderArray::replace(): if a link to a redirect appears in two separate RLH calls, the second and subsequent calls do not add the mw-redirect class. Caused by an unmigrated LinkCache fetch.
* Added a parser test for a pass interaction bug that the pass order change fixes.
* The fuzzer told me to tell you that free external links in non-caption image parameters, which are and have always been invisible, are now not registered either.
* Miscellaneous supporting updates to the test infrastructure.
2008-08-26 14:37:15 +00:00
Brion Vibber
c83882e96e Revert r39949 "* Revert revert r39662 of my parser changes."
Causes weird regressions on http://meta.wikimedia.org/wiki/Talk:Spam_blacklist
Couldn't isolate to a parser test in a few minutes; some kind of template interaction perhaps.

Sample bad HTML like:
The associated page is used by the Mediawiki <a href="&lt;a href=" class="external free" title="http://www.mediawiki.org/wiki/Extension:SpamBlacklist" rel="nofollow">http://www.mediawiki.org/wiki/Extension:SpamBlacklist</a>" class="extiw" title="mw:Extension:SpamBlacklist"&gt;Spam Blacklist extension, and lists strings of text that may not be used in URLs in any page in Wikimedia Foundation projects (as well as many external wikis). Any meta <a href="/wiki/Administrator" title="Administrator">administrator</a> can edit the spam blacklist. There is also a more aggressive way to block spamming through direct use of <a href="/wiki/Anti-spam_features#.24wgSpamRegex" title="Anti-spam features">$wgSpamRegex</a>. Only <a href="/wiki/Developers" title="Developers" class="mw-redirect">developers</a> can make changes to $wgSpamRegex, and its use is to be avoided whenever possible.
2008-08-25 22:19:50 +00:00
Tim Starling
ccacba9f3a * Revert revert r39662 of my parser changes.
* Fixed image link whitespace handling (Brion's complaint, r39662)
* Added fuzz test capability to parserTests.php
* Added __destruct() functions to Parser and Language, and called them explicitly from parserTests.inc, to avoid unconstrained memory usage during fuzz testing.
* Added unified diff to output of Parser_DiffTest
* Fixed whitespace change in Parser::doTableStuff() (found by fuzzing)
* Added feature to RELEASE-NOTES which I'd committed last time but forgotten to note: <gallery> will accept image names with no "Image:" prefix (rediscovered by fuzzing)
* Limit memory usage in Title::getInterwikiLink()
* Fixed chronic fail of all interwiki link parser tests (hid Siebrand's complaint, r39464)
* Fixed chronic fail of one of the LanguageConverter parser tests. Was actually an ignored bug.
2008-08-25 16:08:19 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Tim Starling
3c37740e95 * Added --keep-uploads option to parserTests.php, to speed up execution.
* Loosened validation for section identifiers in preparation for Parser.php commit with freaky section numbers
2008-01-05 12:20:54 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Nick Jenkins
87003c22fe Update parserTests help text to describe the --compare option. 2007-01-22 09:22:17 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Brion Vibber
a8f6c1efc3 Prettify test runner a bit:
* cleaner line breaks at start and end
* 'ALL TESTS PASSED!' and 'some tests failed!' so people stop whinging about the giant 'FAILED!'
and remove some redundant includes
2007-01-19 09:00:45 +00:00
Antoine Musso
13108fbdc0 * Fix hardcoded background color in parserTests.php
* AnsiTermColorer::reset() now calls color(0)
* parserTests.php : remove 'light' option for --color switch
2007-01-17 21:24:41 +00:00
Antoine Musso
51e9b02b5d * document --record (would have saved me 1 hour of work this morning)
* --record automaticly create tables if they do not exists.
2007-01-09 14:20:50 +00:00
Rob Church
065a0de34d Output software version number in maintenance/parserTests.php 2006-12-26 21:26:18 +00:00
Brion Vibber
87f8cfa6e0 * Make the set of default parser test input files extensible via
$wgParserTestFiles. This can now be appended to by extensions or local
  configuration files so that extension or custom tests can be automatically
  run along with the main batch.
* Cite.php now adds its parser tests to the default set when enabled
2006-11-11 14:36:47 +00:00
Tim Starling
b32e563071 Added --show-output option to parserTests.php, to allow capture of complete output for test generation. Fixed various parser tests broken by tidy and incorrect capture method (i.e. web browser). Updated "Fuzz testing: Parser14-table", this appears to be fixed. 2006-10-18 09:22:33 +00:00
Antoine Musso
93154120cc Remove forced dereferencements (new() returns a reference in PHP5) 2006-07-11 14:11:23 +00:00
Brion Vibber
3c04a042b4 * parserTests.php accepts a --file parameter to run an alternate test sutie
* parser tests can now test extensions using !!hooks sections
2006-06-01 04:00:41 +00:00
Antoine Musso
7072380245 prefix filename with a / or fopen cant find it :( 2006-04-24 19:11:16 +00:00
Brion Vibber
f2c29baf9f Update the FSF's address in all these GPL stub headers 2006-04-05 07:43:17 +00:00
Antoine Musso
4e7a725745 Refactor parserTests so the class can be used by another script 2005-07-06 16:17:02 +00:00
Brion Vibber
a6d47f47ff Rework the user_groups system, again, into something that seems to actually
more or less work for now.

* user_groups ur_group is now a short string key ('sysop' etc)
* groups table is gone
* user_rights table is gone
* Permissions for groups are for now set in $wgGroupPermissions.
An in-database management system could be re-added in the future
if it's really needed, but for now it's mostly just been screwing
things up.
* Group.php and Special:Groups are deprecated; will probably die.
* User group memberships are set explicitly through addGroup and
removeGroup methods instead of being re-saved on every change to
the user record.

Group keys are migrated from user_rights at upgrade time for older wikis.
The fields in prior 1.5alpha tables were too screwed up and will need to
manually have sysops re-assigned.

The Makesysop extension will need some minor tweaks.
2005-06-09 09:49:10 +00:00
Brion Vibber
cb45389b9c * Remove linkscc table code, no longer used. 2005-05-31 07:21:31 +00:00
Brion Vibber
b199bb69aa Fix for pagelinks 2005-05-29 10:41:52 +00:00
Ævar Arnfjörð Bjarmason
27105c2129 * (bug 898) Mime type autodetection. 2005-05-21 07:46:17 +00:00
Brion Vibber
e19a4391b5 * (bug 2178) Use TMPDIR, TMP, or TEMP environment variable for temp dir
before trying /tmp; new wfTempDir() function to centralize this
* Fix parser test database usage; runs on a single connection again by not
creating new LoadBalancer instances all the time
2005-05-15 10:37:56 +00:00
Tim Starling
63190801a8 Renamed group table to groups, and renamed the fields from group_xxx to gr_xxx. Added static group support to Special:Listusers. 2005-05-15 06:18:48 +00:00
Tim Starling
a8825b9e3e * Deglobalised link placeholder handling by moving the relevant functionality from Linker::makeLinkObj() to Parser::makeLinkHolder()
* Did a similar trick for the handling of image options, in order to fix a bug reported by the parser unit test.
* Updated parser tests to match current output where appropriate.
2005-04-27 07:48:14 +00:00
Ævar Arnfjörð Bjarmason
e3a390e71b * Changing img_height and img_width to the values of our testimage 2005-04-27 07:25:16 +00:00
Ævar Arnfjörð Bjarmason
17783cd098 Using sprintf "%.2f" to output the final percentage 2005-04-21 03:59:26 +00:00
Ævar Arnfjörð Bjarmason
c036a43a64 * Using a real JPEG file as our image testcase (skins/monobook/headbg.jpg) 2005-04-20 03:28:10 +00:00
Brion Vibber
4fa65580bc Insert an image table row for the test image 2005-04-20 02:27:59 +00:00
Brion Vibber
6f5560867c Start removing the Latin-1 hacks. We're going pure UTF-8 for 1.5... 2005-03-26 22:23:48 +00:00
Brion Vibber
3a8dbacf29 Run a check on output for well-formedness. 2005-02-06 13:44:01 +00:00
Antoine Musso
09f094a809 fix phpdoc comment 2005-01-27 23:25:16 +00:00
Brion Vibber
0db5720a82 * Add $wgNoFollowLinks option to add rel="nofollow" on external links (on by default) 2005-01-19 09:33:19 +00:00
Brion Vibber
fdc09ed838 Create a new $wgUser to initialize default settings properly. Not sure what's the source of the problem atm... 2005-01-19 09:05:24 +00:00
Brion Vibber
341829286c Initialize a group so the parser test can run 2005-01-18 03:34:30 +00:00
Brion Vibber
a3f1a5852b set capital links on for tests 2004-12-22 01:52:35 +00:00
Brion Vibber
64ac6b8e77 Merge SCHEMA_WORK into HEAD. Lots of changes, some things are probably broken:
* Page moves/overwrites are a little iffy
* Compression might not be working right
* Profit!
2004-12-19 08:00:50 +00:00
Brion Vibber
e382f5b292 Ensure ObjectCache.php is included (by default it's not if the main config has memcached turned on) 2004-11-24 10:26:38 +00:00
Brion Vibber
bebd686dd9 Set default overrides bac k to defaults 2004-11-21 09:01:30 +00:00
Antoine Musso
577445ca79 Fix usage tip for --color 2004-11-14 20:23:51 +00:00
Brion Vibber
22b1c2a2f8 PG hack for temporary tables breaks MySQL 4.1. :P special-case it 2004-11-12 08:13:58 +00:00
Brion Vibber
4e0552070f Fix content language message cache (table of contents test depends on this) 2004-10-27 10:25:21 +00:00
Brion Vibber
08ce3ddaad * Add --help and --quiet options to parser test runner
* Standardize the image: tests on Foobar.jpg
* Create a dummy Foobar.jpg during testing
2004-10-27 09:21:25 +00:00
Tim Starling
4e40d5a049 Fixing behaviour with a table prefix 2004-10-24 08:04:18 +00:00
Tim Starling
3d6bb721af Replacing obsolete Database member functions. 2004-10-24 07:30:03 +00:00