[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, tap-testsuite-work, updated
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, tap-testsuite-work, updated. v1.11-1153-gc463a96 |
Date: |
Mon, 08 Aug 2011 18:26:26 +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=c463a964bec391ee9c2735801604e96941a1e33f
The branch, tap-testsuite-work has been updated
via c463a964bec391ee9c2735801604e96941a1e33f (commit)
via 53599ad1ee6877116c3ebda34489352cdd15ea24 (commit)
via ff1b47682742db4706a523ef90a6f9daec44058c (commit)
via 0b1c914b122575b00ba3943c57d91b0955581ad5 (commit)
from 8be644b8612ae1ab23bd9de646991c90e03cdea1 (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 -----------------------------------------------------------------
commit c463a964bec391ee9c2735801604e96941a1e33f
Author: Stefano Lattarini <address@hidden>
Date: Mon Aug 8 18:23:40 2011 +0200
testsuite: more uses of the `seq_' function
* tests/parallel-tests-exit-statuses.test: Use the `seq_' function
from `tests/defs', instead of duplicating its semantics by hand.
* tests/testsuite-summary-count.test: Likewise.
commit 53599ad1ee6877116c3ebda34489352cdd15ea24
Author: Stefano Lattarini <address@hidden>
Date: Mon Aug 8 18:10:55 2011 +0200
testsuite: drop redundant environment sanitization
* tests/Makefile.am (TESTS_ENVIRONMENT): Don't remove `planned'
from the environment.
* tests/defs-static.in: Don't complain if `planned' is set in
the environment.
* tests/self-check-env-sanitize.test: Update.
commit ff1b47682742db4706a523ef90a6f9daec44058c
Author: Stefano Lattarini <address@hidden>
Date: Mon Aug 8 16:41:42 2011 +0200
test defs: fix bug in plain version of `skip_all_'
* tests/plain-functions.sh (skip_all_): Call `skip_', not `skip'.
commit 0b1c914b122575b00ba3943c57d91b0955581ad5
Author: Stefano Lattarini <address@hidden>
Date: Mon Aug 8 16:37:36 2011 +0200
test defs: small cleanups and tweakings
* tests/defs: Where possible, prefer `framework_failure_' or
`fatal_' to `Exit 99'. Try to catch more possible hard errors
and setup failures. Do not hide expected error messages. Avoid
a couple of forks when copying files from `$(top_srcdir)/lib'.
($signal): Remove, no more needed.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 30 +++++++++++++++++++++++++++++
tests/Makefile.am | 1 -
tests/Makefile.in | 7 ++---
tests/defs | 32 ++++++++++++++++--------------
tests/defs-static.in | 1 -
tests/parallel-tests-exit-statuses.test | 8 +------
tests/plain-functions.sh | 2 +-
tests/self-check-env-sanitize.test | 1 -
tests/testsuite-summary-count.test | 15 --------------
9 files changed, 52 insertions(+), 45 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b3e9573..e0f922a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,35 @@
2011-08-08 Stefano Lattarini <address@hidden>
+ testsuite: more uses of the `seq_' function
+ * tests/parallel-tests-exit-statuses.test: Use the `seq_' function
+ from `tests/defs', instead of duplicating its semantics.
+ * tests/testsuite-summary-count.test: Likewise.
+
+2011-08-08 Stefano Lattarini <address@hidden>
+
+ testsuite: drop redundant environment sanitization
+ * tests/Makefile.am (TESTS_ENVIRONMENT): Don't remove `planned'
+ from the environment.
+ * tests/defs-static.in: Don't complain if `planned' is set in
+ the environment.
+ * tests/self-check-env-sanitize.test: Update.
+
+2011-08-08 Stefano Lattarini <address@hidden>
+
+ test defs: fix bug in plain version of `skip_all_'
+ * tests/plain-functions.sh (skip_all_): Call `skip_', not `skip'.
+
+2011-08-08 Stefano Lattarini <address@hidden>
+
+ test defs: small cleanups and tweakings
+ * tests/defs: Where possible, prefer `framework_failure_' or
+ `fatal_' to `Exit 99'. Try to catch more possible hard errors
+ and setup failures. Do not hide expected error messages. Avoid
+ a couple of forks when copying files from `$(top_srcdir)/lib'.
+ ($signal): Remove, no more needed.
+
+2011-08-08 Stefano Lattarini <address@hidden>
+
testsuite: improve interface for giving early TAP plan
Since commit `v1.11-976-g4740f56', an early TAP plan can also be
specified after input lines have already been seen, as long as
diff --git a/tests/Makefile.am b/tests/Makefile.am
index eb3fd51..c887155 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -89,7 +89,6 @@ $(config_shell_tests):
AM_TESTS_ENVIRONMENT = \
test x"$$me" = x || unset me; \
test x"$$required" = x || unset required; \
- test x"$$planned" = x || unset planned; \
test x"$$use_tap" = x || unset use_tap; \
test x"$$parallel_tests" = x || unset parallel_tests; \
test x"$$test_prefer_config_shell" || unset test_prefer_config_shell; \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 7dd6394..3520590 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -342,10 +342,9 @@ SHTST_LOG_COMPILER = $(LOG_COMPILER)
$(srcdir)/config-shell-tests.sh
# we are already running them under it explicitly in our setup (see e.g.
# the definition of TEST_LOG_COMPILER above).
AM_TESTS_ENVIRONMENT = test x"$$me" = x || unset me; test \
- x"$$required" = x || unset required; test x"$$planned" = x || \
- unset planned; test x"$$use_tap" = x || unset use_tap; test \
- x"$$parallel_tests" = x || unset parallel_tests; test \
- x"$$test_prefer_config_shell" || unset \
+ x"$$required" = x || unset required; test x"$$use_tap" = x || \
+ unset use_tap; test x"$$parallel_tests" = x || unset \
+ parallel_tests; test x"$$test_prefer_config_shell" || unset \
test_prefer_config_shell; test x"$$original_AUTOMAKE" = x || \
unset original_AUTOMAKE; test x"$$original_ACLOCAL" = x || \
unset original_ACLOCAL; AM_TESTS_REEXEC=no; export \
diff --git a/tests/defs b/tests/defs
index 8db1084..dc2fee7 100644
--- a/tests/defs
+++ b/tests/defs
@@ -281,8 +281,7 @@ using_gmake ()
return 1
fi;;
*)
- echo "invalid value for \$am__using_gmake: '$am__using_gmake'" >&2
- Exit 99;;
+ fatal_ "invalid value for \$am__using_gmake: '$am__using_gmake'";;
esac
}
am__using_gmake="" # Avoid interferences from the environment.
@@ -607,9 +606,11 @@ do
# Skip this test case if the user is root.
# We try to append to a read-only file to detect this.
priv_check_temp=priv-check.$$
- touch $priv_check_temp || exit 99
- chmod a-w $priv_check_temp || exit 99
- (echo foo >> $priv_check_temp) >/dev/null 2>&1
+ touch $priv_check_temp && chmod a-w $priv_check_temp \
+ || framework_failure_ "creating unwritable file $priv_check_temp"
+ # Not a useless use of subshell: lesser shells like Solaris /bin/sh
+ # can exit if a builtin fails.
+ (echo foo >> $priv_check_temp)
overwrite_status=$?
rm -f $priv_check_temp
if test $overwrite_status -eq 0; then
@@ -634,9 +635,11 @@ do
# Skip this test case if read-only directories aren't supported
# (e.g., under DOS.)
ro_dir_temp=ro_dir.$$
- mkdir $ro_dir_temp || exit 99
- chmod a-w $ro_dir_temp || exit 99
- (: > $ro_dir_temp/probe) >/dev/null 2>/dev/null
+ mkdir $ro_dir_temp && chmod a-w $ro_dir_temp \
+ || framework_failure_ "creating unwritable directory $ro_dir_temp"
+ # Not a useless use of subshell: lesser shells like Solaris /bin/sh
+ # can exit if a builtin fails.
+ (: > $ro_dir_temp/probe)
create_status=$?
rm -rf $ro_dir_temp
if test $create_status -eq 0; then
@@ -813,7 +816,7 @@ distdir=$me-1.0
testSubDir=$me.dir
test ! -d $testSubDir || rm_rf_ $testSubDir
-mkdir $testSubDir
+mkdir $testSubDir || framework_failure_ "creating test subdirectory"
cd ./$testSubDir
@@ -853,20 +856,19 @@ if test "$sh_errexit_works" = yes; then
fi
test $keep_testdirs = no && rm_rf_ $testSubDir
set +x
- test "$signal" != 0 && echo "$me: caught signal $signal"
echo "$me: exit $exit_status"
exit $exit_status
' 0
for signal in 1 2 13 15; do
- trap 'signal='$signal'; { Exit 99; }' $signal
+ trap "fatal_ 'caught signal $signal'" $signal
done
- signal=0
+ unset signal
fi
# Copy in some files we need.
-for file in install-sh missing depcomp; do
- cp "$top_testsrcdir/lib/$file" . || Exit 99
-done
+cp "$top_testsrcdir"/lib/install-sh "$top_testsrcdir"/lib/missing \
+ "$top_testsrcdir"/lib/depcomp . \
+ || framework_failure_ "fetching common files from lib/"
# Build appropriate environment in test directory. Eg create
# configure.in, touch all necessary files, etc.
diff --git a/tests/defs-static.in b/tests/defs-static.in
index 73eaad1..62f7486 100644
--- a/tests/defs-static.in
+++ b/tests/defs-static.in
@@ -73,7 +73,6 @@ fi
for var in \
me \
required \
- planned \
use_tap \
parallel_tests \
test_prefer_config_shell \
diff --git a/tests/parallel-tests-exit-statuses.test
b/tests/parallel-tests-exit-statuses.test
index 531526a..840a14a 100755
--- a/tests/parallel-tests-exit-statuses.test
+++ b/tests/parallel-tests-exit-statuses.test
@@ -26,13 +26,7 @@ END
# $failure_statuses should be defined to the list of all integers between
# 1 and 255 (inclusive), excluded 77 and 99.
-# Let's use `seq' if available, it's faster than the loop.
-failure_statuses=`seq 1 255 \
- || { i=1; while test $i -le 255; do echo $i; i=\`expr $i + 1\`; done; }`
-failure_statuses=`
- for i in $failure_statuses; do
- test $i -eq 77 || test $i -eq 99 || echo $i
- done | tr "$nl" ' '`
+failure_statuses=`seq_ 1 255 | $EGREP -v '^(77|99)$' | tr "$nl" ' '`
# For debugging.
echo "failure_statuses: $failure_statuses"
# Sanity check.
diff --git a/tests/plain-functions.sh b/tests/plain-functions.sh
index c95ff1f..233f65d 100644
--- a/tests/plain-functions.sh
+++ b/tests/plain-functions.sh
@@ -35,6 +35,6 @@ fatal_ () { warn_ "$me: hard error: $@"; Exit 99; }
framework_failure_ () { warn_ "$me: set-up failure: $@"; Exit 99; }
# For compatibility with TAP functions.
-skip_all_ () { skip "$@"; }
+skip_all_ () { skip_ "$@"; }
:
diff --git a/tests/self-check-env-sanitize.test
b/tests/self-check-env-sanitize.test
index 84c6b9f..e2d8f2a 100755
--- a/tests/self-check-env-sanitize.test
+++ b/tests/self-check-env-sanitize.test
@@ -27,7 +27,6 @@ vars='
me
parallel_tests
required
- planned
use_tap
test_prefer_config_shell
original_AUTOMAKE
diff --git a/tests/testsuite-summary-count.test
b/tests/testsuite-summary-count.test
index 3e24e3a..090fabb 100755
--- a/tests/testsuite-summary-count.test
+++ b/tests/testsuite-summary-count.test
@@ -23,21 +23,6 @@ use_vpath=no
. "$testsrcdir"/testsuite-summary-checks.sh || Exit 99
-seq_ ()
-{
- case $# in
- 2) l=$1 u=$2;;
- *) fatal_ "incorrect usage of 'seq_' function";;
- esac
- seq $1 $2 || {
- i=$l
- while test $i -le $u; do
- echo $i
- i=`expr $i + 1`
- done
- }
-}
-
./configure
header="\
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, tap-testsuite-work, updated. v1.11-1153-gc463a96,
Stefano Lattarini <=