mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-02-04 22:02:19 +00:00
* tests/test_driver.pl: Enhance error messages
This commit is contained in:
parent
ec946d7e21
commit
4e277f6fbd
1 changed files with 12 additions and 5 deletions
|
@ -237,7 +237,7 @@ sub toplevel
|
||||||
if (-d $workpath) {
|
if (-d $workpath) {
|
||||||
print "Clearing $workpath...\n";
|
print "Clearing $workpath...\n";
|
||||||
&remove_directory_tree("$workpath/")
|
&remove_directory_tree("$workpath/")
|
||||||
or &error ("Couldn't wipe out $workpath\n");
|
or &error ("Couldn't wipe out $workpath: $!\n");
|
||||||
} else {
|
} else {
|
||||||
mkdir ($workpath, 0777) or &error ("Couldn't mkdir $workpath: $!\n");
|
mkdir ($workpath, 0777) or &error ("Couldn't mkdir $workpath: $!\n");
|
||||||
}
|
}
|
||||||
|
@ -1129,8 +1129,9 @@ sub remove_directory_tree
|
||||||
-e $targetdir or return 1;
|
-e $targetdir or return 1;
|
||||||
|
|
||||||
&remove_directory_tree_inner ("RDT00", $targetdir) or return 0;
|
&remove_directory_tree_inner ("RDT00", $targetdir) or return 0;
|
||||||
if ($nuketop) {
|
if ($nuketop && !rmdir ($targetdir)) {
|
||||||
rmdir($targetdir) or return 0;
|
print "Cannot remove $targetdir: $!\n";
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1149,10 +1150,16 @@ sub remove_directory_tree_inner
|
||||||
|
|
||||||
lstat ($object);
|
lstat ($object);
|
||||||
if (-d _ && &remove_directory_tree_inner ($subdirhandle, $object)) {
|
if (-d _ && &remove_directory_tree_inner ($subdirhandle, $object)) {
|
||||||
rmdir $object or return 0;
|
if (!rmdir($object)) {
|
||||||
|
print "Cannot remove $object: $!\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($^O ne 'VMS') {
|
if ($^O ne 'VMS') {
|
||||||
unlink $object or return 0;
|
if (!unlink $object) {
|
||||||
|
print "Cannot unlink $object: $!\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
# VMS can have multiple versions of a file.
|
# VMS can have multiple versions of a file.
|
||||||
1 while unlink $object;
|
1 while unlink $object;
|
||||||
|
|
Loading…
Reference in a new issue