diff mbox series

[4/5] validation: add clean command

Message ID 20181101181117.3877-5-ben.dooks@codethink.co.uk (mailing list archive)
State Superseded, archived
Headers show
Series [1/5] ptrlist: add ptr_list_nth_entry() | expand

Commit Message

Ben Dooks Nov. 1, 2018, 6:11 p.m. UTC
Add command to clean the output files up post working.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 validation/test-suite | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Luc Van Oostenryck Nov. 1, 2018, 11:54 p.m. UTC | #1
On Thu, Nov 01, 2018 at 06:11:16PM +0000, Ben Dooks wrote:
> Add command to clean the output files up post working.

I don't see well why this is useful as these are overwritten
at each run and the diff is displayed in case of error. It's
not important but an explanation would be nice.

> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  validation/test-suite | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/validation/test-suite b/validation/test-suite
> index 5e10942..c5f726f 100755
> --- a/validation/test-suite
> +++ b/validation/test-suite
> @@ -157,6 +157,7 @@ echo "Usage: $prog_name [command] [command arguments]"
>  echo
>  echo "commands:"
>  echo "    none                       runs the whole test suite"
> +echo "	  clean			     clean all output files"
>  echo "    single file                runs the test in 'file'"
>  echo "    format file [name [cmd]]   helps writing a new test case using cmd"
>  echo
> @@ -372,6 +373,16 @@ arg_file()
>  case "$1" in
>  	'')
>  		do_test_suite
> +		;;
> +	clean)
> +		rm *.output.diff
> +		rm *.output.got
> +		rm *.output.expected
> +		rm *.error.diff
> +		rm *.error.got
> +		rm *.error.expected

The validation directory contains subdirectories ...

Kind regards,
-- Luc
diff mbox series

Patch

diff --git a/validation/test-suite b/validation/test-suite
index 5e10942..c5f726f 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -157,6 +157,7 @@  echo "Usage: $prog_name [command] [command arguments]"
 echo
 echo "commands:"
 echo "    none                       runs the whole test suite"
+echo "	  clean			     clean all output files"
 echo "    single file                runs the test in 'file'"
 echo "    format file [name [cmd]]   helps writing a new test case using cmd"
 echo
@@ -372,6 +373,16 @@  arg_file()
 case "$1" in
 	'')
 		do_test_suite
+		;;
+	clean)
+		rm *.output.diff
+		rm *.output.got
+		rm *.output.expected
+		rm *.error.diff
+		rm *.error.got
+		rm *.error.expected
+
+
 		;;
 	single)
 		arg_file "$2"