]> sjero.net Git - wget/blobdiff - tests/WgetTest.pm.in
Improved exit status handling.
[wget] / tests / WgetTest.pm.in
index 2e124e3c6d96a4c159d2b2414482136418d03376..c4c0d4d94dad44ccf3d4756fd5da59faeb397c93 100644 (file)
@@ -88,6 +88,7 @@ sub run {
         ($cmdline =~ m{^/.*})
             ? system ($cmdline)
             : system ("$self->{_workdir}/../src/$cmdline");
+    $errcode >>= 8; # XXX: should handle abnormal error codes.
 
     # Shutdown server
     # if we didn't explicitely kill the server, we would have to call
@@ -153,7 +154,7 @@ sub _cleanup {
     my $self = shift;
 
     chdir ($self->{_workdir});
-    File::Path::rmtree ($self->{_name});
+    File::Path::rmtree ($self->{_name}) unless $ENV{WGET_TEST_NO_CLEANUP};
 }