On Wed, Aug 12, 2009 at 10:59 AM, dan nessett<dnessett(a)yahoo.com> wrote:
I'm starting a new thread because I noticed my
news reader has glued together messages with the title "A potential land mine"
and "MW test infrastructure architecture," which may confuse someone coming into
the discussion late. Also, the previous thread has branched into several topics and I want
to concentrate on only one, specifically what can we assume about the system environment
for a test infrastructure? These assumptions have direct impact on what test harness we
use. Let me start by stating what I think can be assumed. Then people can tell me I am
full of beans, add to the assumptions, subtract from them, etc.
The first thing I would assume is that a development system is less constrained than a
production system in what can and what cannot be installed. For example, people shot down
my proposal to automatically discover the MW root directory because some production
systems have administrators without root access, without the ability to load code into the
PEAR directory, etc. Fair enough (although minimizing the number of places where $IP is
computed is still important). However, if you are doing MW development, then I think this
assumption is too stringent. You need to run the tests in /tests/PHPUnitTests, which in at
least one case requires the use of $wgDBadminuser and $wgDBadminpassword, something a
non-priviledged user would not be allowed to do.
If a developer has more system privileges than a production admin, to what extent? Can we
assume he has root access? If not, can we assume he can get someone who has to do things
like install PHPUnit? Can we assume the availability of PERL or should we only assume PHP?
Can we assume *AMP (e.g., LAMP, WAMP, MAMP, XAMP)? Can we assume PEAR? Can the developer
install into PEAR?
Dan
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Tests should run in a vanilla install, with minimal dependency on
external stuff. PHPUnit
(or whatever framework we use) would be considered an acceptable dependency for
test suites. If PHPUnit isn't available (ie: already installed and in
the include path), then
we should bail out nicely.
In general, external dependencies should be used as seamlessly as
possible, with minimal
involvement from the end-user. A good example is wikidiff2...we load
it if it exists, we fail
back to PHP diff mode if we can't use it.
-Chad