stas 01/10/18 18:24:24
Modified: perl-framework/Apache-Test/lib/Apache TestRun.pm
Log:
- if die() is thrown during configure(), files have been generated but the
Apache::TestConfig object is not committed to
t/conf/apache_test_config.pm. therefore wrapping configure() in eval block
and committing the object if configure() doesn't get normally completed.
Revision Changes Path
1.61 +10 -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.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- TestRun.pm 2001/10/18 02:44:36 1.60
+++ TestRun.pm 2001/10/19 01:24:24 1.61
@@ -505,7 +505,16 @@
$self->opt_clean(1);
}
- $self->configure;
+ # if configure() fails for some reason before it has flushed the
+ # config to a file, save it so -clean will be able to clean
+ eval { $self->configure; };
+ if ($@) {
+ error "configure() has failed:\n$@";
+ warning "forcing Apache::TestConfig object save";
+ $self->{test_config}->save;
+ warning "run 't/TEST -clean' to clean up before continuing";
+ exit;
+ }
if ($self->{opts}->{configure}) {
warning "reconfiguration done";