]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
check: allow comments in exclude files
authorOmar Sandoval <osandov@fb.com>
Sun, 31 Jul 2016 21:53:44 +0000 (14:53 -0700)
committerEryu Guan <eguan@redhat.com>
Wed, 3 Aug 2016 02:52:17 +0000 (10:52 +0800)
Sometimes it's useful to keep track of why we're excluding a particular
test. Technically, we can include whatever explanation we want in the
exclude file since we just grep for the test names, but properly
supporting comments is a little more robust. This patch makes it so that
the rest of a line after a '#' is ignored.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
check

diff --git a/check b/check
index 9fbc305e90217310317be58be31595d31e94faa1..69341d8c4f72ba861f0ca35964d1a12fc4d5026c 100755 (executable)
--- a/check
+++ b/check
@@ -224,14 +224,14 @@ while [ $# -gt 0 ]; do
        -X)     xfile=$2; shift ;
                for d in $SRC_GROUPS $FSTYP; do
                        [ -f $SRC_DIR/$d/$xfile ] || continue
-                       for f in `cat $SRC_DIR/$d/$xfile`; do
+                       for f in `sed "s/#.*$//" $SRC_DIR/$d/$xfile`; do
                                echo $d/$f >> $tmp.xlist
                        done
                done
                ;;
        -E)     xfile=$2; shift ;
                if [ -f $xfile ]; then
-                       cat "$xfile" >> $tmp.xlist
+                       sed "s/#.*$//" "$xfile" >> $tmp.xlist
                fi
                ;;
        -s)     RUN_SECTION="$RUN_SECTION $2"; shift ;;