automake-ng
[Top][All Lists]
Advanced

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

[Automake-NG] [PATCH 03/17] [ng] tests: get rid of an almost-obsolete te


From: Stefano Lattarini
Subject: [Automake-NG] [PATCH 03/17] [ng] tests: get rid of an almost-obsolete test case (parallel-tests related)
Date: Tue, 22 May 2012 22:48:41 +0200

* t/posixsubst-tests.sh: Remove this test, merging the still-relevant
parts of it ...
* t/parallel-tests-dynamic.sh: ... in here.  Since we are at it, make
existing grepping checks on "make check" output slightly stricter.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 t/parallel-tests-dynamic.sh |   51 +++++++++++++++++++++-----------
 t/posixsubst-tests.sh       |   68 -------------------------------------------
 2 files changed, 34 insertions(+), 85 deletions(-)
 delete mode 100755 t/posixsubst-tests.sh

diff --git a/t/parallel-tests-dynamic.sh b/t/parallel-tests-dynamic.sh
index c8b3b8f..625b5f6 100755
--- a/t/parallel-tests-dynamic.sh
+++ b/t/parallel-tests-dynamic.sh
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check that dynamic content for $(TESTS) is supported, both when set from
-# inside the Makefile.am and when overriddend from the command line.
+# inside the Makefile.am and when overridden from the command line.
 
 . ./defs || Exit 1
 
@@ -31,13 +31,18 @@ cat > ko <<'END'
 exit 1
 END
 
+cat > sk <<'END'
+#!/bin/sh
+exit 77
+END
+
 cat > er << 'END'
 #!/bin/sh
 echo $0 should not be run >&2
 exit 99
 END
 
-chmod a+x ko ok
+chmod a+x ko ok sk
 
 mkdir t
 cp ok t/nosuffix
@@ -58,6 +63,9 @@ cp er t1.sh
 cp er t9.sh
 cp er tx98.sh
 
+cp sk fu.sh
+cp sk mu
+
 cat > get-tests-list <<END
 #!/bin/sh
 echo "g1.sh  ${tab}g2.sh "
@@ -71,7 +79,14 @@ cat > Makefile.am << 'END'
 my_add_dirprefix = $(strip $(1))/$(strip $(2))
 EXTRA_DIST = $(TESTS) get-tests-list
 TEST_EXTENSIONS = .sh
-TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
+
+t1 = fu
+t2 = mux
+
+# Also try an empty match suffix, to ensure that the ':=' in there is
+# not confused by the parser with an immediate assignment operator.
+TESTS = $(t1:=.sh) $(t2:x=)
+TESTS += $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
 TESTS += $(shell $(srcdir)/get-tests-list)
 TESTS += $(call my_add_dirprefix, t, nosuffix)
 XFAIL_TESTS = $(wildcard $(srcdir)/t9[0-9]*.sh)
@@ -86,26 +101,28 @@ $AUTOMAKE -a
 $MAKE check > stdout || { cat stdout; Exit 1; }
 cat stdout
 
-count_test_results total=11 pass=9 fail=0 xpass=0 xfail=2 skip=0 error=0
-
-grep '^PASS: t/nosuffix$' stdout
-grep '^PASS: g1\.sh$'     stdout
-grep '^PASS: g2\.sh$'     stdout
-grep '^PASS: g3\.sh$'     stdout
-grep '^PASS: g4\.sh$'     stdout
-grep '^PASS: t00-foo\.sh' stdout
-grep '^PASS: t02\.sh'     stdout
-grep '^PASS: t57_mu\.sh'  stdout
-grep '^PASS: t7311\.sh'   stdout
-grep '^XFAIL: t98S\.sh'   stdout
-grep '^XFAIL: t99\.sh'    stdout
+count_test_results total=13 pass=9 fail=0 xpass=0 xfail=2 skip=2 error=0
+
+grep '^PASS: t/nosuffix$'  stdout
+grep '^PASS: g1\.sh$'      stdout
+grep '^PASS: g2\.sh$'      stdout
+grep '^PASS: g3\.sh$'      stdout
+grep '^PASS: g4\.sh$'      stdout
+grep '^PASS: t00-foo\.sh$' stdout
+grep '^PASS: t02\.sh$'     stdout
+grep '^PASS: t57_mu\.sh$'  stdout
+grep '^PASS: t7311\.sh$'   stdout
+grep '^XFAIL: t98S\.sh$'   stdout
+grep '^XFAIL: t99\.sh$'    stdout
+grep '^SKIP: fu\.sh$'      stdout
+grep '^SKIP: mu$'          stdout
 
 $MAKE mostlyclean
 test "`find . -name *.log`" = ./config.log
 
 $MAKE distcheck > stdout || { cat stdout; Exit 1; }
 cat stdout
-count_test_results total=11 pass=9 fail=0 xpass=0 xfail=2 skip=0 error=0
+count_test_results total=13 pass=9 fail=0 xpass=0 xfail=2 skip=2 error=0
 
 $MAKE check tests1='$(wildcard t00*.sh t98?.sh)' \
             tests2='$(shell ./get-tests-list | sed 1d)' \
diff --git a/t/posixsubst-tests.sh b/t/posixsubst-tests.sh
deleted file mode 100755
index 30d283a..0000000
--- a/t/posixsubst-tests.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test that POSIX variable expansion '$(var:str=rpl)' works when used
-# with the TESTS special variable.
-
-# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-t1 = foo1 foo2
-t2 = barx
-t3 = bar2
-
-foo2.test barz:
-       (echo '#!/bin/sh' && echo 'exit 0') > $@ && chmod a+x $@
-
-# Also try an empty match suffix, to ensure that the ':=' in there is
-# not confused by the parser with an unportable assignment operator.
-TESTS = $(t1:=.test) $(t2:x=y) $(t3:2=z)
-
-EXTRA_DIST = $(TESTS)
-MOSTLYCLEANFILES = *.out
-END
-
-cat > foo1.test <<'END'
-#!/bin/sh
-touch foo1.out
-test x"${TESTSUITE_OK-no}" = x"yes"
-END
-sed 's/foo1/bary/g' foo1.test > bary
-chmod +x foo1.test bary
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure
-$MAKE check >out 2>&1 && { cat out; Exit 1; }
-cat out
-ls -l
-grep '^FAIL: foo1\.test *$' out
-grep '^PASS: foo2\.test *$' out
-grep '^FAIL: bary *$' out
-grep '^PASS: barz *$' out
-test -f foo1.out
-test -f bary.out
-
-TESTSUITE_OK=yes $MAKE distcheck
-
-:
-- 
1.7.9.5




reply via email to

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