This helper gets a list of tests that belong to a group
under a specific tests subdir.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
+get_sub_group_list()
+{
+ local d=$1
+ local grp=$2
+
+ test -s "$SRC_DIR/$d/group" || return 1
+
+ local grpl=$(sed -n < $SRC_DIR/$d/group \
+ -e 's/#.*//' \
+ -e 's/$/ /' \
+ -e "s;^\($VALID_TEST_NAME\).* $grp .*;$SRC_DIR/$d/\1;p")
+ echo $grpl
+}
+
+ local grp=$1
+ local grpl=""
for d in $SRC_GROUPS $FSTYP; do
if ! test -d "$SRC_DIR/$d" ; then
continue
fi
for d in $SRC_GROUPS $FSTYP; do
if ! test -d "$SRC_DIR/$d" ; then
continue
fi
- l=$(sed -n < $SRC_DIR/$d/group \
- -e 's/#.*//' \
- -e 's/$/ /' \
- -e "s;^\($VALID_TEST_NAME\).* $grp .*;$SRC_DIR/$d/\1;p")
- grpl="$grpl $l"
+ grpl="$grpl $(get_sub_group_list $d $grp)"