From 5d801985113e284b60fe1aa11bd73eef699900b9 Mon Sep 17 00:00:00 2001 From: Amir Goldstein Date: Mon, 2 Jan 2017 15:22:59 +0200 Subject: [PATCH] check: support include/exclude of sub groups Allow including and/or excluding tests by test dir and group. -g and -x command line arguments can take the form of /. For example: ./check -n -g xfs/quick ./check -n -g stress -x xfs/stress ./check -n -g xfs/punch -x dangerous_fuzzers Signed-off-by: Amir Goldstein Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- check | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/check b/check index faf6281c..8d1ec714 100755 --- a/check +++ b/check @@ -105,6 +105,14 @@ get_group_list() { local grp=$1 local grpl="" + local sub=$(dirname $grp) + + if [ -n "$sub" -a "$sub" != "." -a -d "$SRC_DIR/$sub" ]; then + # group is given as / (e.g. xfs/quick) + grp=$(basename $grp) + get_sub_group_list $sub $grp + return + fi for d in $SRC_GROUPS $FSTYP; do if ! test -d "$SRC_DIR/$d" ; then -- 2.47.3