automake-patches
[Top][All Lists]
Advanced

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

[FYI] {tap-testsuite-work} tests: allow depmod.tap to only run a subset


From: Stefano Lattarini
Subject: [FYI] {tap-testsuite-work} tests: allow depmod.tap to only run a subset of its tests
Date: Sun, 7 Aug 2011 21:38:02 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

* tests/depmod.tap: If command-line arguments are passed to the
tests, they are now taken as the list of depmodes for which the
checks are to be run.
---
 ChangeLog        |    7 +++++++
 tests/depmod.tap |   15 ++++++++++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4bff03b..9992913 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-08-07  Stefano Lattarini  <address@hidden>
 
+       tests: allow depmod.tap to only run a subset of its tests
+       * tests/depmod.tap: If command-line arguments are passed to the
+       tests, they are now taken as the list of depmodes for which the
+       checks are to be run.
+
+2011-08-07  Stefano Lattarini  <address@hidden>
+
        test defs: get name of TAP-using tests correctly
        This change fixes the names of the temporary directories used
        by the TAP-based tests (e.g., test `foo.tap' now uses `foo.dir'
diff --git a/tests/depmod.tap b/tests/depmod.tap
index 85bd972..1902830 100755
--- a/tests/depmod.tap
+++ b/tests/depmod.tap
@@ -69,6 +69,19 @@ all_depmodes=`\
   && test -n "$all_depmodes" \
   || fatal_ "can't extract list of valid depmodes"
 
+# Allow the user to select a subset of the tests.
+if test $# -gt 0; then
+  tested_depmodes=$*
+  for depmode in $tested_depmodes; do
+    case " $all_depmodes " in
+      *" $depmode "*);;
+      *) fatal_ "invalid user-specified depmode '$depmode'"
+    esac
+  done
+else
+  tested_depmodes=$all_depmodes
+fi
+
 srctree=depmod-1.0
 mkdir $srctree
 mv missing install-sh depcomp configure.in $srctree
@@ -128,7 +141,7 @@ cp -pR $srctree/* $longpath || fatal_ "cannot populate long 
path"
 cp -pR $srctree/* . || fatal_ "cannot populate top-level directory"
 
 for vpath in simple long absolute; do
-  for depmode in $all_depmodes; do
+  for depmode in $tested_depmodes; do
     case $vpath in
       simple)
         srcdir=..;;
-- 
1.7.2.3



reply via email to

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