@@ -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
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@redhat.com> --- check | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)