automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, test-protocols, updated. v1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, test-protocols, updated. v1.11-1093-gc605c81
Date: Tue, 06 Sep 2011 21:52:15 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=c605c816f97609c6b55765a1c8916fdb082dccca

The branch, test-protocols has been updated
       via  c605c816f97609c6b55765a1c8916fdb082dccca (commit)
       via  e1177186ff44b11d6c14d74637bb2564b84151d0 (commit)
      from  371bdf6bf8b61c3b78c8915068b5b806ec2b62cf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                           |   11 +++++++++++
 tests/defs                          |    9 +++++++++
 tests/parallel-tests-interrupt.test |    4 ++++
 tests/self-check-cleanup.test       |   30 ++++++++++++++----------------
 tests/self-check-exit.test          |    4 ++++
 5 files changed, 42 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 480e64a..50d458c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-09-06  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failures due to ignored signals
+       * tests/defs (is_blocked_signal): New function.
+       * tests/parallel-tests-interrupt.test: Do not try to use/trap
+       signals that are ignored by the parent shell: they will be
+       ignored by all the child processes too.
+       * tests/self-check-exit.test: Likewise.
+       * tests/self-check-cleanup.test: Likewise, and do few minor
+       improvements and extensions since we are at it.
+
 2011-09-05  Peter Rosin  <address@hidden>
 
        * tests/amhello-binpkg.test: Add missing $EXEEXT usage.
diff --git a/tests/defs b/tests/defs
index 5f7a0a1..ad0490b 100644
--- a/tests/defs
+++ b/tests/defs
@@ -152,6 +152,15 @@ is_newest ()
   test -z "$is_newest_files"
 }
 
+# is_blocked_signal SIGNAL-NUMBER
+# --------------------------------
+# Return success if the given signal number is blocked in the shell,
+# return a non-zero exit status and print a proper diagnostic otherwise.
+is_blocked_signal ()
+{
+  $SHELL -c "kill -$1 \$\$; echo '$me: signal $1 seems blocked'"
+}
+
 # AUTOMAKE_run status [options...]
 # --------------------------------
 # Run Automake with OPTIONS, and fail if automake
diff --git a/tests/parallel-tests-interrupt.test 
b/tests/parallel-tests-interrupt.test
index ed40412..bf4f7f0 100755
--- a/tests/parallel-tests-interrupt.test
+++ b/tests/parallel-tests-interrupt.test
@@ -65,6 +65,10 @@ $AUTOMAKE
 trapped_signals='1 2 13 15'
 
 for signum in $trapped_signals; do
+  if is_blocked_signal $signum; then
+    echo "$me: signal $signum is blocked, skipping part of the test"
+    continue
+  fi
   rm -f pid fail *.log
   env signum=$signum $MAKE check && { ls -l; Exit 1; }
   ls -l
diff --git a/tests/self-check-cleanup.test b/tests/self-check-cleanup.test
index 945194f..9cfde1d 100755
--- a/tests/self-check-cleanup.test
+++ b/tests/self-check-cleanup.test
@@ -108,23 +108,21 @@ fi # $have_symlinks
 # Check that the cleanup trap does not remove the temporary
 # test directory in case of test failure, skip, hard-error,
 # or when receiving a signal.
-for bailout_command in \
-  'Exit 1' \
-  'Exit 2' \
-  'Exit 10' \
-  'Exit 77' \
-  'Exit 99' \
-  'Exit 126' \
-  'Exit 127' \
-  'Exit 255' \
-  'kill -1 $$' \
-  'kill -2 $$' \
-  'kill -9 $$' \
-  'kill -13 $$' \
-  'kill -15 $$' \
-; do
-  $SHELL -c  ". ./defs; : > foo; $bailout_command" dummy.test && Exit 1
+
+for st in 1 2 3 10 77 99 126 127 130 255; do
+  $SHELL -c  ". ./defs; : > foo; Exit $st" dummy.test && Exit 1
+  test -f dummy.dir/foo
+  rm -rf dummy.dir
+done
+
+for signum in 1 2 3 9 13 15; do
+  if is_blocked_signal $signum; then
+    echo "$me: signal $signum is blocked, skipping part of the test"
+    continue
+  fi
+  $SHELL -c  ". ./defs; : > foo; kill -$signum \$\$" dummy.test && Exit 1
   test -f dummy.dir/foo
+  rm -rf dummy.dir
 done
 
 :
diff --git a/tests/self-check-exit.test b/tests/self-check-exit.test
index ca1af9b..a07ba69 100755
--- a/tests/self-check-exit.test
+++ b/tests/self-check-exit.test
@@ -50,6 +50,10 @@ done
 
 for sig in 1 2 13 15; do
 
+  if $SHELL -c "kill -$sig \$\$"; then
+    echo "$me: signal $sig is blocked, skipping part of the test"
+    continue
+  fi
   echo "* Try: kill -$sig \$\$"
   if test $sig -eq 2; then
     # Some Korn shells might otherwise get a spurious SIGINT


hooks/post-receive
-- 
GNU Automake



reply via email to

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