diff mbox series

[3/6] check: allow '-e testid' to exclude a single test

Message ID 161292579650.3504537.2704583548318437413.stgit@magnolia (mailing list archive)
State Accepted
Headers show
Series fstests: various improvements to the test framework | expand

Commit Message

Darrick J. Wong Feb. 10, 2021, 2:56 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

This enables us to mask off specific tests.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 check |    6 ++++++
 1 file changed, 6 insertions(+)

Comments

Brian Foster Feb. 11, 2021, 2 p.m. UTC | #1
On Tue, Feb 09, 2021 at 06:56:36PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> This enables us to mask off specific tests.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---

Seems reasonable:

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  check |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> 
> diff --git a/check b/check
> index c6ad1d6c..e51cbede 100755
> --- a/check
> +++ b/check
> @@ -79,6 +79,7 @@ testlist options
>      -g group[,group...]	include tests from these groups
>      -x group[,group...]	exclude tests from these groups
>      -X exclude_file	exclude individual tests
> +    -e testlist         exclude a specific list of tests
>      -E external_file	exclude individual tests
>      [testlist]		include tests matching names in testlist
>  
> @@ -287,6 +288,11 @@ while [ $# -gt 0 ]; do
>  
>  	-X)	subdir_xfile=$2; shift ;
>  		;;
> +	-e)
> +		xfile=$2; shift ;
> +		echo "$xfile" | tr ', ' '\n\n' >> $tmp.xlist
> +		;;
> +
>  	-E)	xfile=$2; shift ;
>  		if [ -f $xfile ]; then
>  			sed "s/#.*$//" "$xfile" >> $tmp.xlist
>
diff mbox series

Patch

diff --git a/check b/check
index c6ad1d6c..e51cbede 100755
--- a/check
+++ b/check
@@ -79,6 +79,7 @@  testlist options
     -g group[,group...]	include tests from these groups
     -x group[,group...]	exclude tests from these groups
     -X exclude_file	exclude individual tests
+    -e testlist         exclude a specific list of tests
     -E external_file	exclude individual tests
     [testlist]		include tests matching names in testlist
 
@@ -287,6 +288,11 @@  while [ $# -gt 0 ]; do
 
 	-X)	subdir_xfile=$2; shift ;
 		;;
+	-e)
+		xfile=$2; shift ;
+		echo "$xfile" | tr ', ' '\n\n' >> $tmp.xlist
+		;;
+
 	-E)	xfile=$2; shift ;
 		if [ -f $xfile ]; then
 			sed "s/#.*$//" "$xfile" >> $tmp.xlist