Lea Wiemann [off-list ref] writes:
quoted
How it is different from PERL_PATH?
Right, I didn't think of that. PERL_PATH isn't available in the tests
though, it's only used internally by the Makefile to generate (among
other things) gitweb.cgi. This means that while we can control under
which Perl version gitweb.cgi runs, we cannot control under which Perl
version the test suite runs (at least without $PATH trickery). Does
this bother us?
If yes, I'd suggest we keep GITPERL but rename it to GIT_TEST_PERL,
because that's what it's about. If not, I'll rip it out and simply
call 'perl' in the test shell script, whatever version it may be.
That sounds wrong, as the point of tests would be to make sure the stuff
you are going to install would work with what you thought will be used
from the system.
If "isn't available in the tests" is the problem, is it possible to make
it available? We are passing down SHELL_PATH from primary Makefile to t/
and you should be able to do the same for Perl path...
About the Test::WWW:Mechanize::CGI thing, how widely available is it? I
do not think it is packaged for Debian nor Ubuntu, for example.
Junio C Hamano wrote:
We are passing down SHELL_PATH from primary Makefile to t/
and you should be able to do the same for Perl path...
I see; that'll work, thanks! Will send v8 soon.
About the Test::WWW:Mechanize::CGI thing, how widely available is it?
Not very, you basically have to install it from CPAN. If it's not
installed, the only message you get from the test is:
ok 1: skipping gitweb tests, Test::WWW::Mechanize::CGI not found
Should optional test dependencies like Test::WWW::Mechnanize::CGI be
documented in INSTALL?
Best,
Lea
On Tue, 24 Jun 2008, Junio C Hamano wrote:
About the Test::WWW::Mechanize::CGI thing, how widely available is it?
I do not think it is packaged for Debian nor Ubuntu, for example.
Not very widely; practically you have to install it from CPAN.
Test::WWW::Mechanize::CGI is at v0.1, WWW::Mechanize::CGI is at v0.3.
But if Test::WWW::Mechanize::CGI is not installed, test would be not
run. If you are gitweb developer, then installing locally in $HOME
from CPAN is I guess viable option; if you are not gitweb developer, we
still have t/t9500-gitweb-standalone-no-errors.sh
The whole point of using those packages was that it makes it _easy_
to write those tests. This consist of two parts:
1). running gitweb as if it was CGI application, which otherwise would
either require deep knowledge of how CGI application is invoked (what
it is in WWW::Mechanize::CGI and required dependence
HTTP::Request::AsCGI which I think does all the work) or working
web server, done a la "git instaweb",
2.) accessing and testing gitweb output (what Test::WWW::Mechanize,
WWW::Mechanize does; we could do the same with LWP* modules from
libwww-perl / perl-libwww-perl package and Test::More from Perl, but
it would be repeating Test::WWW::Mechanize work).
--
Jakub Narebski
Poland