[PATCH 4/7] get_group_list changed to more universal get_list_from_file

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



This patch changes name of get_group_list and adds one argument to
make it useful not only for groups, but also for environments.  It
works the same, just it takes the file name as an argument instead of
hardcoded 'group'.

Signed-off-by: Jan Ťulák <jtulak@xxxxxxxxxx>
---
 check | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/check b/check
index a246d92..bdfd877 100755
--- a/check
+++ b/check
@@ -88,12 +88,15 @@ testlist options
 	    exit 0
 }
 
-get_group_list()
+# Get all tests tagged with specified group/environment
+# from a specified file.
+get_list_from_file()
 {
 	grp=$1
+	file=$2
 
 	for d in $SRC_GROUPS $FSTYP; do
-		l=$(sed -n < $SRC_DIR/$d/group \
+		l=$(sed -n < $SRC_DIR/$d/$file \
 			-e 's/#.*//' \
 			-e 's/$/ /' \
 			-e "s;\(^[0-9][0-9][0-9]\).* $grp .*;$SRC_DIR/$d/\1;p")
@@ -162,7 +165,7 @@ _prepare_test_list()
 
 	# Specified groups to include
 	for group in $GROUP_LIST; do
-		list=$(get_group_list $group)
+		list=$(get_list_from_file $group "group")
 		if [ -z "$list" ]; then
 			echo "Group \"$group\" is empty or not defined?"
 			exit 1
@@ -181,7 +184,7 @@ _prepare_test_list()
 
 	# Specified groups to exclude
 	for xgroup in $XGROUP_LIST; do
-		list=$(get_group_list $xgroup)
+		list=$(get_list_from_file $xgroup "group")
 		if [ -z "$list" ]; then
 			echo "Group \"$xgroup\" is empty or not defined?"
 			exit 1
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux