diff mbox series

[vsp-tests,v2,2/2] scripts: Take all skipped tests into account

Message ID 20231114131211.24462-2-laurent.pinchart@ideasonboard.com (mailing list archive)
State New
Delegated to: Kieran Bingham
Headers show
Series [vsp-tests,v2,1/2] scripts: Fix computation of the total number of tests | expand

Commit Message

Laurent Pinchart Nov. 14, 2023, 1:12 p.m. UTC
Some skipped tests print a "skip" message, while other print "skipped".
This leads to some of them not being counted. Standardize on "skip".

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 scripts/vsp-lib.sh   | 2 +-
 scripts/vsp-tests.sh | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Kieran Bingham Nov. 22, 2023, 3:46 p.m. UTC | #1
Quoting Laurent Pinchart (2023-11-14 13:12:11)
> Some skipped tests print a "skip" message, while other print "skipped".
> This leads to some of them not being counted. Standardize on "skip".
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

That's probably the easier way ;-)

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  scripts/vsp-lib.sh   | 2 +-
>  scripts/vsp-tests.sh | 8 ++++----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh
> index a8898e80a879..114bc7200e6e 100755
> --- a/scripts/vsp-lib.sh
> +++ b/scripts/vsp-lib.sh
> @@ -1076,7 +1076,7 @@ test_init() {
>  
>         if [ -z $best_mdev ] ; then
>                 echo "No device found with feature set \`$features'" | ./logger.sh config >> $logfile
> -               echo "Test requires unavailable feature set \`$features': skipped" >&2
> +               echo "Test requires unavailable feature set \`$features': skip" >&2
>                 exit 1
>         fi
>  
> diff --git a/scripts/vsp-tests.sh b/scripts/vsp-tests.sh
> index 7805f1b7de1c..13e7ba4410b5 100755
> --- a/scripts/vsp-tests.sh
> +++ b/scripts/vsp-tests.sh
> @@ -31,16 +31,16 @@ run_test() {
>         for line in $output ; do
>                 local pass=0
>                 local fail=0
> -               local skipped=0
> +               local skip=0
>  
>                 (echo "$line" | grep -q ': fail$') && fail=1
>                 (echo "$line" | grep -q ': pass$') && pass=1
> -               (echo "$line" | grep -q ': skipped$') && skipped=1
> +               (echo "$line" | grep -q ': skip$') && skip=1
>  
>                 num_fail=$((num_fail+fail))
>                 num_pass=$((num_pass+pass))
> -               num_skipped=$((num_skipped+skipped))
> -               num_test=$((num_test+pass+fail+skipped))
> +               num_skip=$((num_skip+skip))
> +               num_test=$((num_test+pass+fail+skip))
>         done
>  
>         if [ $(ls *.bin 2>/dev/null | wc -l) != 0 ] ; then
> -- 
> Regards,
> 
> Laurent Pinchart
>
Kieran Bingham Nov. 22, 2023, 3:46 p.m. UTC | #2
Quoting Kieran Bingham (2023-11-22 15:46:01)
> Quoting Laurent Pinchart (2023-11-14 13:12:11)
> > Some skipped tests print a "skip" message, while other print "skipped".
> > This leads to some of them not being counted. Standardize on "skip".
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> That's probably the easier way ;-)
> 
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Or rather,

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>


> 
> > ---
> >  scripts/vsp-lib.sh   | 2 +-
> >  scripts/vsp-tests.sh | 8 ++++----
> >  2 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh
> > index a8898e80a879..114bc7200e6e 100755
> > --- a/scripts/vsp-lib.sh
> > +++ b/scripts/vsp-lib.sh
> > @@ -1076,7 +1076,7 @@ test_init() {
> >  
> >         if [ -z $best_mdev ] ; then
> >                 echo "No device found with feature set \`$features'" | ./logger.sh config >> $logfile
> > -               echo "Test requires unavailable feature set \`$features': skipped" >&2
> > +               echo "Test requires unavailable feature set \`$features': skip" >&2
> >                 exit 1
> >         fi
> >  
> > diff --git a/scripts/vsp-tests.sh b/scripts/vsp-tests.sh
> > index 7805f1b7de1c..13e7ba4410b5 100755
> > --- a/scripts/vsp-tests.sh
> > +++ b/scripts/vsp-tests.sh
> > @@ -31,16 +31,16 @@ run_test() {
> >         for line in $output ; do
> >                 local pass=0
> >                 local fail=0
> > -               local skipped=0
> > +               local skip=0
> >  
> >                 (echo "$line" | grep -q ': fail$') && fail=1
> >                 (echo "$line" | grep -q ': pass$') && pass=1
> > -               (echo "$line" | grep -q ': skipped$') && skipped=1
> > +               (echo "$line" | grep -q ': skip$') && skip=1
> >  
> >                 num_fail=$((num_fail+fail))
> >                 num_pass=$((num_pass+pass))
> > -               num_skipped=$((num_skipped+skipped))
> > -               num_test=$((num_test+pass+fail+skipped))
> > +               num_skip=$((num_skip+skip))
> > +               num_test=$((num_test+pass+fail+skip))
> >         done
> >  
> >         if [ $(ls *.bin 2>/dev/null | wc -l) != 0 ] ; then
> > -- 
> > Regards,
> > 
> > Laurent Pinchart
> >
diff mbox series

Patch

diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh
index a8898e80a879..114bc7200e6e 100755
--- a/scripts/vsp-lib.sh
+++ b/scripts/vsp-lib.sh
@@ -1076,7 +1076,7 @@  test_init() {
 
 	if [ -z $best_mdev ] ; then
 		echo "No device found with feature set \`$features'" | ./logger.sh config >> $logfile
-		echo "Test requires unavailable feature set \`$features': skipped" >&2
+		echo "Test requires unavailable feature set \`$features': skip" >&2
 		exit 1
 	fi
 
diff --git a/scripts/vsp-tests.sh b/scripts/vsp-tests.sh
index 7805f1b7de1c..13e7ba4410b5 100755
--- a/scripts/vsp-tests.sh
+++ b/scripts/vsp-tests.sh
@@ -31,16 +31,16 @@  run_test() {
 	for line in $output ; do
 		local pass=0
 		local fail=0
-		local skipped=0
+		local skip=0
 
 		(echo "$line" | grep -q ': fail$') && fail=1
 		(echo "$line" | grep -q ': pass$') && pass=1
-		(echo "$line" | grep -q ': skipped$') && skipped=1
+		(echo "$line" | grep -q ': skip$') && skip=1
 
 		num_fail=$((num_fail+fail))
 		num_pass=$((num_pass+pass))
-		num_skipped=$((num_skipped+skipped))
-		num_test=$((num_test+pass+fail+skipped))
+		num_skip=$((num_skip+skip))
+		num_test=$((num_test+pass+fail+skip))
 	done
 
 	if [ $(ls *.bin 2>/dev/null | wc -l) != 0 ] ; then