On Monday, July 28, 2003, at 06:33 PM, Randy Kobes wrote:
Depending on where the source directory is, you may have to open up a parent directory normally restricted to root to a non-root user, which wouldn't be a good idea, even temporarily.
Right. Grr.
What about just skipping the tests if root is running the tests, and printing out an explanatory message why the tests are skipped?
I don't think you can necessarily do this, because not all test need to have access to t/. My test suite for MasonX::ApacheHandler::WithCallbacks, for example, doesn't need to have the Apache user access those files. They're loaded up by the user that starts apache (root), and then the process forks off to nobody-owned children that never access the files. So my tests work fine even under root.
And since many, _many_ users simply install modules via CPAN.pm as root, you'd be eliminating a huge group of people who can run tests.
I think a better idea is to introduce a test function like "have_lwp", maybe called "has_access_to_t", that can be used by the module developer to skip the relevant tests, if necessary.
Regards,
David
-- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 http://kineticode.com/ Yahoo!: dew7e Jabber: [EMAIL PROTECTED] Kineticode. Setting knowledge in motion.[sm]