automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[automake-commit] branch master updated: test: do not leave files as mod


From: Karl Berry
Subject: [automake-commit] branch master updated: test: do not leave files as mode zero.
Date: Sun, 24 Dec 2023 11:55:14 -0500

This is an automated email from the git hooks/post-receive script.

karl pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=448fd777fdbe4bebddcd14449748d72dab93336b

The following commit(s) were added to refs/heads/master by this push:
     new 448fd777f test: do not leave files as mode zero.
448fd777f is described below

commit 448fd777fdbe4bebddcd14449748d72dab93336b
Author: Karl Berry <karl@freefriends.org>
AuthorDate: Sun Dec 24 08:55:04 2023 -0800

    test: do not leave files as mode zero.
    
    Follows up on https://bugs.gnu.org/67868.
    
    * t/dist-with-unreadable-makefile-fails.sh: chmod u+rw at end.
    Also follow usual pattern of ending tests with :, not explicit exit.
    * t/tap-bad-prog.tap: chmod u+r at end (since only r removed).
---
 t/dist-with-unreadable-makefile-fails.sh | 11 ++++++-----
 t/tap-bad-prog.tap                       |  3 +++
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/t/dist-with-unreadable-makefile-fails.sh 
b/t/dist-with-unreadable-makefile-fails.sh
index 1adc4fd47..37881b163 100644
--- a/t/dist-with-unreadable-makefile-fails.sh
+++ b/t/dist-with-unreadable-makefile-fails.sh
@@ -45,8 +45,9 @@ test ! -r Makefile.am || skip_ "cannot drop file read 
permissions"
 ./configure
 
 # 'dist' should fail because we can't copy Makefile.am.
-if $MAKE dist; then
-  exit 1
-else
-  exit 0
-fi
+! $MAKE dist
+
+# restore sane permissions for future greps and finds.
+chmod u+rw Makefile.am
+
+:
diff --git a/t/tap-bad-prog.tap b/t/tap-bad-prog.tap
index cb92a9b32..bb0187df9 100644
--- a/t/tap-bad-prog.tap
+++ b/t/tap-bad-prog.tap
@@ -82,4 +82,7 @@ command_ok_ 'no spurious results' \
   -D TODO -r 'still get "missing plan"' \
   count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=3
 
+# restore sane permissions for future greps and finds.
+chmod u+r noread.test
+
 :



reply via email to

[Prev in Thread] Current Thread [Next in Thread]