fstests: fix group list generation for whacky test names
[xfstests-dev.git] / tools / mkgroupfile
index 244358989774f9aca19d1b4de06472cc8b95ded7..414cb538c21a9ec91989b7a40371a3ff1a2ff669 100755 (executable)
@@ -19,6 +19,8 @@ if [ ! -x ../../check ]; then
        exit 1
 fi
 
+. ../../common/test_names
+
 cleanup()
 {
        rm -f $new_groups.check
@@ -60,7 +62,8 @@ ENDL
 
        # Aggregate the groups each test belongs to for the group file
        grep -I -R "^_begin_fstest" $test_dir/ | \
-               sed -e 's/^.*\/\([0-9]*\):_begin_fstest/\1/' >> $new_groups
+               sed -e "s/^.*\/\($VALID_TEST_NAME\):_begin_fstest/\1/" \
+               >> $new_groups
 
        # Create the list of unique groups for existence checking
        grep -I -R "^_begin_fstest" $test_dir/ | \