public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Eryu Guan <eguan@redhat.com>
Cc: fstests@vger.kernel.org
Subject: [PATCH 2/2] check: support include/exclude of sub groups
Date: Mon,  2 Jan 2017 15:22:59 +0200	[thread overview]
Message-ID: <1483363379-10210-2-git-send-email-amir73il@gmail.com> (raw)
In-Reply-To: <1483363379-10210-1-git-send-email-amir73il@gmail.com>

Allow including and/or excluding tests by test dir and group.
-g and -x command line arguments can take the form of
<subdir>/<group>.

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 <amir73il@gmail.com>
---
 check | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/check b/check
index faf6281..8d1ec71 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 <subdir>/<group> (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.7.4


  reply	other threads:[~2017-01-02 13:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-02 13:22 [PATCH 1/2] check: factor out get_sub_group_list() helper Amir Goldstein
2017-01-02 13:22 ` Amir Goldstein [this message]
2017-01-03  5:06   ` [PATCH 2/2] check: support include/exclude of sub groups Eryu Guan
2017-01-03  9:10     ` Amir Goldstein
2017-01-03  9:15   ` [PATCH 3/3] check: document tests include/exclude options Amir Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1483363379-10210-2-git-send-email-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox