]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
test: do not leave files as mode zero.
authorKarl Berry <karl@freefriends.org>
Sun, 24 Dec 2023 16:55:04 +0000 (08:55 -0800)
committerKarl Berry <karl@freefriends.org>
Sun, 24 Dec 2023 16:55:04 +0000 (08:55 -0800)
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
t/tap-bad-prog.tap

index 1adc4fd47116501b9eb842b3b486c13cf716d8d6..37881b163e1f29ae035065b841f2998c6952de76 100644 (file)
@@ -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
+
+:
index cb92a9b32ec177170aab0cb9ee50ec5dddc7dd1e..bb0187df923504dff9b18d46ea76b06d4d4e465c 100644 (file)
@@ -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
+
 :