From: Ralf Wildenhues Date: Tue, 13 Feb 2007 06:22:45 +0000 (+0000) Subject: * lib/autotest/general.m4 (AT_INIT): With --clean, return exit X-Git-Tag: v2.62~353 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b76181e460c3207f546139948a7f3c5563f91959;p=thirdparty%2Fautoconf.git * lib/autotest/general.m4 (AT_INIT): With --clean, return exit status of rm so we know when it failed. If cleaning of test dir failed before running the test, warn. Output the line separator in verbose mode before the warning to make clear the warning belongs to the following test. --- diff --git a/ChangeLog b/ChangeLog index 07dfd75c..7aca622d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-02-13 Ralf Wildenhues + + * lib/autotest/general.m4 (AT_INIT): With --clean, return exit + status of rm so we know when it failed. + If cleaning of test dir failed before running the test, warn. + Output the line separator in verbose mode before the warning + to make clear the warning belongs to the following test. + 2007-02-08 Paul Eggert * doc/autoconf.texi (Parentheses): Mention problem with (( in diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 2ac95537..139ea432 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -1,8 +1,8 @@ # This file is part of Autoconf. -*- Autoconf -*- # M4 macros used in building test suites. -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. +# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free +# Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -314,7 +314,7 @@ do test -d "$at_suite_dir" && find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; rm -f -r "$at_suite_dir" "$at_suite_log" - exit 0 + exit $? ;; --debug | -d ) @@ -706,6 +706,9 @@ do # Be sure to come back to the top test directory. cd "$at_suite_dir" + # Clearly separate the test groups when verbose. + test $at_group_count != 0 && $at_verbose echo + case $at_group in banner-*) at_group_log=$at_suite_log @@ -720,7 +723,8 @@ do at_group_log=$at_group_dir/$as_me.log if test -d "$at_group_dir"; then find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; - rm -fr "$at_group_dir" + rm -fr "$at_group_dir" || + AS_WARN([test directory could not be cleaned.]) fi # Be tolerant if the above `rm' was not able to remove the directory. AS_MKDIR_P([$at_group_dir]) @@ -730,9 +734,6 @@ do echo 0 > "$at_status_file" - # Clearly separate the test groups when verbose. - test $at_group_count != 0 && $at_verbose echo - # In verbose mode, append to the log file *and* show on # the standard output; in quiet mode only write to the log if test -z "$at_verbose"; then