xfstests: honor comments in the test group file
authorAlex Elder <aelder@sgi.com>
Thu, 6 May 2010 17:26:07 +0000 (17:26 +0000)
committerAlex Elder <aelder@sgi.com>
Fri, 7 May 2010 15:32:13 +0000 (10:32 -0500)
There are some spots in the "group" file where test numbers have
groups listed after a '#' character, clearly intending for those
groups to be commented out.  But the way the group list gets
generated that commenting doesn't work, and in fact these tests
explicitly *are* included in such commented-out groups.

This patch fixes that, stripping out all comments (which start
with a '#' character and end with a newline) from the file before
building the set of test numbers for a group.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
common

diff --git a/common b/common
index 828563ded285d0d4cc1fdbfa20589161d1fbb71c..817c0039f830c1c778958b4afac12601d4be9cb3 100644 (file)
--- a/common
+++ b/common
@@ -58,9 +58,10 @@ do
     if $group
     then
        # arg after -g
-       group_list=`sed -n <group -e 's/$/ /' -e "/^[0-9][0-9][0-9].* $r /"'{
-s/ .*//p
-}'`
+       group_list=$(sed -n < group \
+                       -e 's/#.*//' \
+                       -e 's/$/ /' \
+                       -e "/^[0-9][0-9][0-9].* $r /"'{ s/ .*//p }')
        if [ -z "$group_list" ]
        then
            echo "Group \"$r\" is empty or not defined?"