tools: make convert-group ignore converted test files
authorDarrick J. Wong <djwong@kernel.org>
Sat, 3 Jul 2021 03:05:48 +0000 (20:05 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 4 Jul 2021 11:03:50 +0000 (19:03 +0800)
Teach the tool that rewrites tests files to use _begin_fstest group
tagging to ignore tests that have already been treated.  This will make
it easier for people to rebase their dev branches.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tools/convert-group

index 81ad993..981aa87 100755 (executable)
@@ -16,6 +16,8 @@ obliterate_group_file() {
                elif [ ! -e "$test" ]; then
                        echo "Ignoring unknown test file \"$test\"."
                        continue
+               elif grep -q '^_begin_fstest' "$test"; then
+                       continue
                fi
 
                # Replace all the open-coded test preparation code with a