stas 2004/02/18 22:37:20
Modified: perl-framework/Apache-Test/lib/Apache TestRun.pm perl-framework/Apache-Test Changes Log: Make it possible to run TEST (or another driving script) from any path (e.g. t/TEST, ./TEST, /full/path/to/t/TEST) Revision Changes Path 1.150 +11 -1 httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm Index: TestRun.pm =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v retrieving revision 1.149 retrieving revision 1.150 diff -u -u -r1.149 -r1.150 --- TestRun.pm 18 Feb 2004 04:09:08 -0000 1.149 +++ TestRun.pm 19 Feb 2004 06:37:19 -0000 1.150 @@ -626,7 +626,15 @@ sub run { my $self = shift; - custom_config_load(); + # assuming that test files are always in the same directory as the + # driving script, make it possible to run the test suite from any place + # use a full path, which will work after chdir (e.g. ./TEST) + $0 = File::Spec->rel2abs($0); + if (-e $0) { + my $top = dirname dirname $0; + chdir $top; + error $top; + } # reconstruct argv, preserve multiwords args, eg 'PerlTrace all' my $argv = join " ", map { /^-/ ? $_ : qq['$_'] } @ARGV; @@ -634,6 +642,8 @@ $orig_cwd = Cwd::cwd(); $self->set_ulimit; $self->set_env; #make sure these are always set + + custom_config_load(); my(@argv) = @_; 1.92 +3 -0 httpd-test/perl-framework/Apache-Test/Changes Index: Changes =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v retrieving revision 1.91 retrieving revision 1.92 diff -u -u -r1.91 -r1.92 --- Changes 19 Feb 2004 04:16:57 -0000 1.91 +++ Changes 19 Feb 2004 06:37:20 -0000 1.92 @@ -8,6 +8,9 @@ =item 1.08_dev +Make it possible to run TEST (or another driving script) from any path +(e.g. t/TEST, ./TEST, /full/path/to/t/TEST) [Stas] + If at least one *conf*.in files is modified since the last configuration, make sure to regenerate them all, so the right ports will be assigned. [Stas]