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

[SCM] Debian package checker branch, master, updated. 2.5.10-94-gddfb1ff



The following commit has been merged in the master branch:
commit ddfb1ff203d8d25bd739da5c8243915b1e487a73
Author: Niels Thykier <niels@thykier.net>
Date:   Tue Jul 24 21:05:56 2012 +0200

    t/runtests: Allow "tag:<tag>" as alternative to "-t <tag>"
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/doc/README.developers b/doc/README.developers
index ff3cb5a..20390ed 100644
--- a/doc/README.developers
+++ b/doc/README.developers
@@ -250,6 +250,10 @@ are run.
 To run all tests that has a "Test-For" or a "Test-Against" for a given
 tag, use:
 
+ $ debian/rules runtests onlyrun=tag:$tag
+
+Alternatively:
+
  $ debian/rules check-tag tag=$tag
 
 The legacy test suite will not be run in this case.
diff --git a/private/runtests b/private/runtests
index e7f184e..d306bfd 100755
--- a/private/runtests
+++ b/private/runtests
@@ -12,12 +12,17 @@ if [ "$1" = "-j" ] ; then
 fi
 
 NEW_SUITE=1
+OLD_SUITE=1
 
-if [ "$1" = "-t" ] ; then
-    TAG=yes
-elif [ "$1" = "--legacy-only" ] ; then
-    NEW_SUITE=0
-    shift
+if [ "$1" ] ; then
+    if [ "$1" = "-t" ] || echo "$1" | grep -q ':' ; then
+        # Only the new suite "gets" this, so skip the old one.
+        OLD_SUITE=0
+    elif [ "$1" = "--legacy-only" ] ; then
+        # We were asked only to run the old one
+        NEW_SUITE=0
+        shift
+    fi
 fi
 
 LC_ALL="C"
@@ -70,7 +75,7 @@ fi
 if [ "${NEW_SUITE}" = 1 ] ; then
     t/runtests --dump-logs -k $PARALLEL_ARGS t "$TEST_WORK_DIR" "$@"
 fi
-if [ "$TAG" = "" ] ; then
+if [ "${OLD_SUITE}" = 1 ] ; then
     echo " --- LEGACY TEST SUITE ---"
     testset/runtests -k testset "$TEST_WORK_DIR" "$@"
 fi
diff --git a/t/runtests b/t/runtests
index cd31000..1ea72da 100755
--- a/t/runtests
+++ b/t/runtests
@@ -193,7 +193,11 @@ my $prev;
 my $q = Thread::Queue->new();
 our $MSG_Q = Thread::Queue->new();
 
-if ($singletest && $singletest =~ m/^suite:(.++)/) {
+if ($singletest && $singletest =~ s/^tag://) {
+    $tag = $singletest;
+    # clear singletest to avoid find a "single" test.
+    $singletest = '';
+} elsif ($singletest && $singletest =~ m/^suite:(.++)/) {
     my $list = $1;
     %suites = ();
     foreach my $s (split m/\s*+,\s*+/, $list) {

-- 
Debian package checker


Reply to: